Browse Source

uas手机版
报表菜单接口对接

RaoMeng 5 years ago
parent
commit
e71b8d9364
23 changed files with 653 additions and 308 deletions
  1. 89 87
      uas-office-web/uas-mobile/src/components/common/formNew/formCommon.less
  2. 2 0
      uas-office-web/uas-mobile/src/components/common/func/FuncGroup.jsx
  3. 15 3
      uas-office-web/uas-mobile/src/components/common/func/FuncItem.jsx
  4. 10 0
      uas-office-web/uas-mobile/src/components/common/func/common-func.less
  5. 10 3
      uas-office-web/uas-mobile/src/configs/api.config.js
  6. 8 0
      uas-office-web/uas-mobile/src/configs/router.config.js
  7. 8 0
      uas-office-web/uas-mobile/src/configs/theme.config.less
  8. 32 2
      uas-office-web/uas-mobile/src/pages/common/currencyList/CurrencyList.jsx
  9. 25 2
      uas-office-web/uas-mobile/src/pages/common/currencyList/currency-list.less
  10. 142 0
      uas-office-web/uas-mobile/src/pages/common/currencyList/visitApplyBill.js
  11. 30 4
      uas-office-web/uas-mobile/src/pages/private/homePage/DocRoot.jsx
  12. 0 9
      uas-office-web/uas-mobile/src/pages/private/homePage/HomePage.jsx
  13. 2 1
      uas-office-web/uas-mobile/src/pages/private/homePage/MainRoot.jsx
  14. 48 8
      uas-office-web/uas-mobile/src/pages/private/homePage/ReportRoot.jsx
  15. 16 0
      uas-office-web/uas-mobile/src/pages/private/homePage/home-page.less
  16. 2 4
      uas-office-web/uas-mobile/src/pages/private/oftenFunc/OftenFuncManage.jsx
  17. 42 0
      uas-office-web/uas-mobile/src/pages/private/report/ReportSearch.jsx
  18. 8 0
      uas-office-web/uas-mobile/src/pages/private/report/report.less
  19. 0 45
      uas-office-web/uas-mobile/src/redux/actions/docState.js
  20. 31 0
      uas-office-web/uas-mobile/src/redux/actions/reportState.js
  21. 2 138
      uas-office-web/uas-mobile/src/redux/reducers/redReportState.js
  22. 77 0
      uas-office-web/uas-mobile/src/utils/private/report.request.js
  23. 54 2
      uas-office-web/uas-mobile/src/utils/private/services.request.js

+ 89 - 87
uas-office-web/uas-mobile/src/components/common/formNew/formCommon.less

@@ -1,176 +1,178 @@
 .form-common-layout {
-    width: 100%;
-    display: flex;
-    flex-direction: row;
-    padding: 6px;
-    background: white;
-    border-bottom: 1px solid #eeeeee;
-    align-items: center;
+  width: 100%;
+  display: flex;
+  flex-direction: row;
+  padding: 6px;
+  background: white;
+  border-bottom: 1px solid #eeeeee;
+  align-items: center;
 }
 
 .form-common-layout .form-input-value.am-list-item.am-textarea-item {
-    min-height: 32px;
-    padding-left: 4px;
-    padding-right: 4px;
-    display: flex;
-    flex-direction: row;
-    align-items: center;
+  min-height: 32px;
+  padding-left: 4px;
+  padding-right: 4px;
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+  justify-content: center;
 }
 
 .form-common-layout .am-list-item.am-input-item {
-    min-height: 32px;
-    height: 32px;
+  min-height: 32px;
+  height: 32px;
 }
 
 .form-common-layout .am-textarea-control {
-    padding: 4px;
+  padding: 4px;
 }
 
 .form-common-layout .am-textarea-control textarea {
-    font-size: 14px;
-    text-align: right;
-    padding-right: 4px;
+  font-size: 14px;
+  text-align: right;
+  padding-right: 4px;
 }
 
 .form-common-layout .am-textarea-clear {
-    margin-top: 0;
+  margin-top: 0;
 }
 
 .form-common-layout .am-list-item {
-    min-height: 32px;
+  min-height: 32px;
+  margin-bottom: 0px;
 }
 
 .form-common-layout .am-list-line {
-    padding-right: 8px;
-    border-bottom: none !important;
+  padding-right: 8px;
+  border-bottom: none !important;
 }
 
 .form-common-layout .am-list-line::after {
-    /*去掉数字输入框的底部横线*/
-    display: none !important;
+  /*去掉数字输入框的底部横线*/
+  display: none !important;
 }
 
 .form-common-layout .am-list .am-list-item.am-textarea-item {
-    min-height: 32px;
-    height: 100%;
-    padding-left: 8px;
-    align-items: center;
+  min-height: 32px;
+  height: 100%;
+  padding-left: 8px;
+  align-items: center;
 }
 
 .form-common-layout .am-list-item .am-input-control {
-    font-size: 14px;
+  font-size: 14px;
 }
 
 .form-common-layout .am-list-item .am-input-control input {
-    font-size: 14px;
-    text-align: right;
-    padding-right: 4px;
+  font-size: 14px;
+  text-align: right;
+  padding-right: 4px;
 }
 
 /***********************************************************************************/
 .form-textarea-layout {
-    border-bottom: 1px solid #eeeeee;
+  border-bottom: 1px solid #eeeeee;
 }
 
 .form-textarea-layout .am-textarea-control {
-    padding: 2px;
+  padding: 2px;
 }
 
 .form-textarea-layout .am-textarea-control textarea {
-    font-size: 14px;
-    text-align: left;
-    padding-left: 2px;
+  font-size: 14px;
+  text-align: left;
+  padding-left: 2px;
 }
 
 .form-textarea-layout .am-list .am-list-item.am-textarea-item {
-    min-height: 32px;
-    height: 100%;
-    padding-left: 4px;
-    align-items: center;
+  min-height: 32px;
+  height: 100%;
+  padding-left: 4px;
+  align-items: center;
 }
 
 .form-textarea-layout .form-input-value.am-list-item.am-textarea-item {
-    min-height: 80px;
-    max-height: 300px;
-    padding-left: 4px;
-    padding-right: 4px;
-    overflow-y: scroll;
+  min-height: 80px;
+  max-height: 300px;
+  padding-left: 4px;
+  padding-right: 4px;
+  overflow-y: scroll;
 }
 
 .form-textarea-layout .form-input-value.am-list-item.am-textarea-item::-webkit-scrollbar {
-    display: none;
+  display: none;
 }
 
 .form-textarea-layout i.anticon.anticon-download {
-    display: none !important;
+  display: none !important;
 }
 
 /************************************************************************************/
 
 .form-title-text {
-    font-size: 14px;
-    color: #2F95DD;
-    flex: 1;
-    font-weight: bold;
+  font-size: 14px;
+  color: #2F95DD;
+  flex: 1;
+  font-weight: bold;
 }
 
 .form-title-delete {
-    font-size: 14px;
-    color: red;
-    padding-left: 10px;
+  font-size: 14px;
+  color: red;
+  padding-left: 10px;
 }
 
 .form-input-caption {
-    font-size: 14px;
-    color: #333333;
-    width: 90px;
+  font-size: 14px;
+  color: #333333;
+  width: 90px;
 }
 
 .form-input-fill {
-    font-size: 14px;
-    color: red;
-    padding: 4px;
-    font-weight: bold;
+  font-size: 14px;
+  color: red;
+  padding: 4px;
+  font-weight: bold;
 }
 
 .form-input-value {
-    flex: 1;
-    font-size: 14px;
-    color: #333333;
-    text-align: right;
+  flex: 1;
+  font-size: 14px;
+  color: #333333;
+  text-align: right;
 }
 
 .form-add-text {
-    width: 100%;
-    height: 36px;
-    text-align: center;
-    line-height: 36px;
-    font-size: 14px;
-    color: #2F95DD;
-    font-weight: bold;
-    background: #efefef;
+  width: 100%;
+  height: 36px;
+  text-align: center;
+  line-height: 36px;
+  font-size: 14px;
+  color: #2F95DD;
+  font-weight: bold;
+  background: #efefef;
 }
 
 .form-common-modal-root {
-    min-height: 280px;
-    max-height: 76vh;
-    overflow: auto;
+  min-height: 280px;
+  max-height: 76vh;
+  overflow: auto;
 }
 
 .upload-list-inline .ant-upload-list-item {
-    /*附件列表格式*/
+  /*附件列表格式*/
 }
 
 .uploadBtn {
-    background: #4197FC;
-    border-radius: 4px;
-    padding: 4px 8px;
-    color: white;
+  background: #4197FC;
+  border-radius: 4px;
+  padding: 4px 8px;
+  color: white;
 }
 
 .uploadBtn-disable {
-    background: #e4e4e4;
-    border-radius: 3px;
-    padding: 4px;
-    color: gray;
+  background: #e4e4e4;
+  border-radius: 3px;
+  padding: 4px;
+  color: gray;
 }

+ 2 - 0
uas-office-web/uas-mobile/src/components/common/func/FuncGroup.jsx

@@ -40,6 +40,7 @@ export default class FuncGroup extends Component {
       operable,
       onOperationClick,
       onFuncDataChange,
+      lineCount,
     } = this.props
 
     let funcItems = []
@@ -59,6 +60,7 @@ export default class FuncGroup extends Component {
             onFuncClick={onFuncClick}
             onOperationClick={onOperationClick}
             onFuncDataChange={onFuncDataChange}
+            lineCount={lineCount}
             key={'funcChild' + funcIndex}/>,
         )
       })

+ 15 - 3
uas-office-web/uas-mobile/src/components/common/func/FuncItem.jsx

@@ -48,7 +48,7 @@ export default class FuncItem extends Component {
   }
 
   render () {
-    let { funcObj, operation, sup } = this.props
+    let { funcObj, operation, sup, lineCount } = this.props
     return (
       funcObj &&
       <div
@@ -57,7 +57,20 @@ export default class FuncItem extends Component {
         <div className='func-func-layout'>
           <img className='func-func-icon'
                src={funcObj.img}/>
-          <span className='func-func-text'>{funcObj.name}</span>
+          <span
+            className='func-func-text'
+            // style={
+            //   lineCount ? {
+            //     whiteSpace: 'normal',
+            //     display: '-webkit-box',
+            //     webkitLineClamp: lineCount,
+            //     webkitBoxOrient: 'vertical',
+            //     columnCount: lineCount,
+            //     webkitColumnCount: lineCount,
+            //     mozColumnCount: lineCount,
+            //   } : {}
+            // }
+          >{funcObj.name}</span>
           {
             (sup || funcObj.sup) ?
               <sup
@@ -75,7 +88,6 @@ export default class FuncItem extends Component {
             onClick={this.onOperationClick.bind(this)}
           />
         }
-
       </div>
     )
   }

+ 10 - 0
uas-office-web/uas-mobile/src/components/common/func/common-func.less

@@ -78,12 +78,22 @@
 }
 
 .func-func-text {
+  width: 100%;
   font-family: PingFangSC-Regular;
   font-size: 12px;
   color: #333333;
   letter-spacing: 1.6px;
   padding-top: 4px;
   text-align: center;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  //overflow: hidden;
+  //text-overflow: ellipsis;
+  //display: -webkit-box;
+  //-webkit-line-clamp: 2;
+  //column-count: 2;
+  //-webkit-box-orient: vertical;
 }
 
 .func-operation-icon {

+ 10 - 3
uas-office-web/uas-mobile/src/configs/api.config.js

@@ -4,9 +4,9 @@
  */
 
 export const _host = window.location.origin
+  && 'http://10.1.7.104:8080/ERP'//吴炳
   && 'http://usoft.f3322.net:10007/uas'
   && 'http://10.1.7.44:8081/erp'//吴雨骁
-  && 'http://10.1.7.104:8080/ERP'//吴炳
 
 export const _baseURL = _host + (process.env.REACT_APP_ROUTER_BASE_NAME || '')
 
@@ -16,9 +16,16 @@ export const API = {
   COMMON_LOGIN: _baseURL + '/common/login.action',
   //应用红点数
   APPCOMMON_COUNT: _baseURL + '/mobile/appcommon/count/',
+
   /*******************************应用*************************************/
   //应用菜单列表
-  APPCOMMON_GETSERVICE: _baseURL + '/mobile/appcommon/getServices.action',
+  APPCOMMON_GETSERVICE: _baseURL + '/mobile/appweb/services/getServices.action',
   //保存常用应用
-  APPCOMMON_SAVESERVICES: _baseURL + '/mobile/appcommon/saveServices.action',
+  APPCOMMON_SAVESERVICES: _baseURL +
+    '/mobile/appweb/services/saveServices.action',
+
+  /*******************************报表*************************************/
+  //获取报表菜单
+  REPORT_QUERYREPORTLIST: _baseURL +
+    '/mobile/appweb/report/queryReportList.action',
 }

+ 8 - 0
uas-office-web/uas-mobile/src/configs/router.config.js

@@ -45,6 +45,10 @@ const SubscribeManage = PageLoadable(
 const TaskTodo = PageLoadable(
   import(/* webpackChunkName:'tasktodo' */'@/pages/private/taskTodo/TaskTodo'))
 
+/**************************************************报表**************************************************/
+const ReportSearch = PageLoadable(
+  import(/* webpackChunkName:'tasktodo' */'@/pages/private/report/ReportSearch'))
+
 /**************************************************应用**************************************************/
 const OftenFuncManage = PageLoadable(
   import(/* webpackChunkName:'subscribe' */'@/pages/private/oftenFunc/OftenFuncManage'))
@@ -109,6 +113,10 @@ class Routes extends React.Component {
           {/*待办列表*/}
           <Route path='/taskTodo' component={TaskTodo}/>
 
+          {/***************************************报表******************************************/}
+          {/*报表搜索*/}
+          <Route path='/reportSearch' component={ReportSearch}/>
+
           {/***************************************应用*******************************************/}
           {/*常用应用管理*/}
           <Route path='/oftenFuncManage' component={OftenFuncManage}/>

+ 8 - 0
uas-office-web/uas-mobile/src/configs/theme.config.less

@@ -62,3 +62,11 @@
   right: 22px;
   z-index: 2;
 }
+
+.displayNone {
+  display: none;
+}
+
+.visibleHidden {
+  visibility: hidden;
+}

+ 32 - 2
uas-office-web/uas-mobile/src/pages/common/currencyList/CurrencyList.jsx

@@ -7,12 +7,21 @@ import React, { Component } from 'react'
 import { connect } from 'react-redux'
 import CurrencyListItem
   from '../../../components/common/currencyListItem/CurrencyListItem'
-import { SearchBar, PullToRefresh, ListView, Drawer } from 'antd-mobile'
+import {
+  SearchBar,
+  PullToRefresh,
+  ListView,
+  Drawer,
+  List,
+  Button,
+} from 'antd-mobile'
 import './currency-list.less'
 import UasIcon from '../../../configs/iconfont.conig'
 import LoadingMore from '../../../components/common/loading/LoadingMore'
 import ReactDOM from 'react-dom'
 import { Prompt } from 'react-router-dom'
+import { visitApplyBill } from './visitApplyBill'
+import { getFormItems } from '../../../utils/common/form.util'
 
 const currencyArray = [
   [{}, {}, {}, {}, {}, {}],
@@ -40,6 +49,7 @@ class CurrencyList extends Component {
       listDataSource: new ListView.DataSource({
         rowHasChanged: (row1, row2) => row1 !== row2,
       }),
+      filterConfigList: [],
     }
   }
 
@@ -53,6 +63,11 @@ class CurrencyList extends Component {
       listDataSource: this.state.listDataSource.cloneWithRows(
         currencyArray),
     })
+
+    const filterTest = new visitApplyBill()
+    this.setState({
+      filterConfigList: filterTest,
+    })
   }
 
   componentWillUnmount () {
@@ -130,10 +145,25 @@ class CurrencyList extends Component {
   }
 
   getFilterLayout = () => {
+    const formItems = getFormItems(this.state.filterConfigList)
     return (
       <div
         className='currency-list-content-filter-content'>
-        <div>筛选条件</div>
+        <List
+          className='currency-list-content-filter-config'>
+          {formItems}
+        </List>
+        <div className='currency-list-content-filter-func'>
+          <Button
+            className='currency-list-content-filter-func-button'
+            type="primary"
+            inline>确认</Button>
+          <Button
+            className='currency-list-content-filter-func-button'
+            type="ghost"
+            onClick={this.onFilterOpen}
+            inline>取消</Button>
+        </div>
       </div>
     )
   }

+ 25 - 2
uas-office-web/uas-mobile/src/pages/common/currencyList/currency-list.less

@@ -33,8 +33,31 @@
         background-color: white;
         display: flex;
         flex-direction: column;
-        overflow: auto;
-        -webkit-overflow-scrolling: touch;
+
+        .currency-list-content-filter-config {
+          overflow: auto;
+          -webkit-overflow-scrolling: touch;
+          flex: 1;
+          width: 100%;
+        }
+
+        .currency-list-content-filter-func {
+          display: flex;
+          flex-direction: row;
+          background: whitesmoke;
+          align-items: center;
+          justify-content: center;
+
+          .currency-list-content-filter-func-button {
+            flex: 1;
+            margin: 16px;
+            border: 1px solid #108ee9;
+
+            &:before {
+              border: none !important;
+            }
+          }
+        }
       }
     }
   }

+ 142 - 0
uas-office-web/uas-mobile/src/pages/common/currencyList/visitApplyBill.js

@@ -0,0 +1,142 @@
+import BillGroupModel from '../../../model/common/BillGroupModel'
+import BillModel from '../../../model/common/BillModel'
+
+export function visitApplyBill () {
+  let billGroup = new BillGroupModel()
+  let billModel = new BillModel()
+  let now = new Date()
+  return ([
+    {
+      ...billGroup,
+      isForm: true,
+      group: '筛选条件',
+      showBillFields: [
+        {
+          ...billModel,
+          type: 'S',
+          caption: '姓名',
+          field: 'name',
+          readOnly: 'F',
+          value: '',
+          display: '',
+          defValue: '',
+          allowBlank: 'F',
+        },
+        {
+          ...billModel,
+          type: 'N',
+          caption: '身份证号',
+          field: 'idCard',
+          readOnly: 'F',
+          value: '',
+          display: '',
+          defValue: '',
+          allowBlank: 'F',
+        },
+        {
+          ...billModel,
+          type: 'N',
+          caption: '手机号',
+          field: 'mobile',
+          readOnly: 'F',
+          value: '',
+          display: '',
+          defValue: '',
+          allowBlank: 'F',
+          // inputType: 'phone',
+        },
+        {
+          ...billModel,
+          type: 'S',
+          caption: '被拜访人',
+          field: 'objectName',
+          readOnly: 'F',
+          value: '',
+          display: '',
+          defValue: '',
+          allowBlank: 'F',
+        },
+        {
+          ...billModel,
+          type: 'D',
+          caption: '拜访日期',
+          field: 'visitTime',
+          readOnly: 'F',
+          value: now.getFullYear() + '-' + (now.getMonth() + 1) + '-' +
+            now.getDate(),
+          display: now.getTime(),
+          defValue: '',
+          allowBlank: 'F',
+        },
+      ],
+      hideBillFields: [
+        {
+          ...billModel,
+          type: 'S',
+          caption: '拜访者ID',
+          field: 'visitorId',
+          readOnly: 'T',
+          value: '',
+          display: '',
+          defValue: '',
+          allowBlank: 'T',
+        },
+        {
+          ...billModel,
+          type: 'S',
+          caption: '被拜访对象ID',
+          field: 'objectId',
+          readOnly: 'T',
+          value: '',
+          display: '',
+          defValue: '',
+          allowBlank: 'T',
+        },
+        {
+          ...billModel,
+          type: 'S',
+          caption: '微信openid',
+          field: 'openid',
+          readOnly: 'T',
+          value: '',
+          display: '',
+          defValue: '',
+          allowBlank: 'T',
+        },
+        {
+          ...billModel,
+          type: 'S',
+          caption: '学校ID',
+          field: 'schoolId',
+          readOnly: 'T',
+          value: '',
+          display: '',
+          defValue: '',
+          allowBlank: 'T',
+        },
+        {
+          ...billModel,
+          type: 'S',
+          caption: '公众号ID',
+          field: 'appId',
+          readOnly: 'T',
+          value: '',
+          display: '',
+          defValue: '',
+          allowBlank: 'T',
+        },
+        {
+          ...billModel,
+          type: 'S',
+          caption: '截止拜访时间',
+          field: 'visitEndTime',
+          readOnly: 'T',
+          value: null,
+          display: null,
+          defValue: null,
+          allowBlank: 'T',
+        },
+      ],
+    },
+  ])
+}

+ 30 - 4
uas-office-web/uas-mobile/src/pages/private/homePage/DocRoot.jsx

@@ -7,17 +7,23 @@ import React, { Component } from 'react'
 import { connect } from 'react-redux'
 import { isObjEmpty } from '../../../utils/common/common.util'
 import FuncGroup from '../../../components/common/func/FuncGroup'
+import { requestServices } from '../../../utils/private/services.request'
+import RefreshLayout
+  from '../../../components/common/refreshLayout/RefreshLayout'
 
 class DocRoot extends Component {
 
   constructor () {
     super()
 
-    this.state = {}
+    this.state = {
+      refreshing: false,
+    }
   }
 
   componentDidMount () {
-    console.log('DocRoot')
+    //获取应用列表
+    requestServices()
   }
 
   componentWillUnmount () {
@@ -40,11 +46,31 @@ class DocRoot extends Component {
     }
 
     return (
-      <div>
+      <RefreshLayout
+        direction={'down'}
+        height={'100%'}
+        refreshing={this.state.refreshing}
+        onRefresh={this.refreshFunc}
+        className='doc-root'>
         {funcGroupItems}
-      </div>
+      </RefreshLayout>
     )
   }
+
+  refreshFunc = () => {
+    this.setState({
+      refreshing: true,
+    })
+    requestServices().then(response => {
+      this.setState({
+        refreshing: false,
+      })
+    }).catch(error => {
+      this.setState({
+        refreshing: false,
+      })
+    })
+  }
 }
 
 let mapStateToProps = (state) => ({

+ 0 - 9
uas-office-web/uas-mobile/src/pages/private/homePage/HomePage.jsx

@@ -37,15 +37,6 @@ class HomePage extends Component {
     document.title = 'UAS系统'
     clearListState()
 
-    // fetchGet(API.COMMON_LOGIN, {
-    //   username: 'U0815',
-    //   password: 'wyx12345',
-    //   sob: 'UAS',
-    // }).then(response => {
-    //获取应用列表
-    requestServices()
-    // })
-
     //刷新应用红点
     GlobalEvent.on(EVENT_DOC_FUNC_COUNT, onDocFuncCountRefresh, this)
   }

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

@@ -24,7 +24,8 @@ class MainRoot extends Component {
 
   componentDidMount () {
     document.title = 'UAS系统'
-    console.log('MainRoot')
+    //获取应用列表
+    requestServices()
   }
 
   componentWillUnmount () {

+ 48 - 8
uas-office-web/uas-mobile/src/pages/private/homePage/ReportRoot.jsx

@@ -4,21 +4,28 @@
  */
 
 import React, { Component } from 'react'
+import { withRouter } from 'react-router-dom'
 import { connect } from 'react-redux'
 import FuncGroup from '../../../components/common/func/FuncGroup'
 import { isObjEmpty } from '../../../utils/common/common.util'
+import { SearchBar, PullToRefresh } from 'antd-mobile'
+import { requestReportFunc } from '../../../utils/private/report.request'
+import RefreshLayout
+  from '../../../components/common/refreshLayout/RefreshLayout'
+import { requestServices } from '../../../utils/private/services.request'
 
 class ReportRoot extends Component {
 
   constructor () {
     super()
 
-    this.state = {}
+    this.state = {
+      refreshing: false,
+    }
   }
 
   componentDidMount () {
-    console.log('ReportRoot')
-
+    requestReportFunc()
   }
 
   componentWillUnmount () {
@@ -28,12 +35,13 @@ class ReportRoot extends Component {
   render () {
     const { reportState } = this.props
     const funcGroupItems = []
-    if (!isObjEmpty(reportState, reportState.reportFuncList)) {
-      reportState.reportFuncList.forEach((item, index) => {
+    if (!isObjEmpty(reportState, reportState.reportFuncGroupList)) {
+      reportState.reportFuncGroupList.forEach((item, index) => {
         funcGroupItems.push(
           <FuncGroup
             funcGroup={item}
             line
+            lineCount={2}
             key={'reportFuncGroup' + index}
           />,
         )
@@ -41,15 +49,47 @@ class ReportRoot extends Component {
     }
 
     return (
-      <div>
-        {funcGroupItems}
+      <div className='report-root'>
+        <div
+          onClick={this.onSearchClick}>
+          <SearchBar
+            disabled
+            placeholder={'搜索'}/>
+        </div>
+        <RefreshLayout
+          direction={'down'}
+          height={'100%'}
+          refreshing={this.state.refreshing}
+          onRefresh={this.refreshFunc}
+          className='report-func-root'
+        >
+          {funcGroupItems}
+        </RefreshLayout>
       </div>
     )
   }
+
+  onSearchClick = () => {
+    this.props.history.push('/reportSearch')
+  }
+  refreshFunc = () => {
+    this.setState({
+      refreshing: true,
+    })
+    requestReportFunc().then(response => {
+      this.setState({
+        refreshing: false,
+      })
+    }).catch(error => {
+      this.setState({
+        refreshing: false,
+      })
+    })
+  }
 }
 
 let mapStateToProps = (state) => ({
   reportState: state.reportState,
 })
 
-export default connect(mapStateToProps)(ReportRoot)
+export default connect(mapStateToProps)(withRouter(ReportRoot))

+ 16 - 0
uas-office-web/uas-mobile/src/pages/private/homePage/home-page.less

@@ -3,3 +3,19 @@
   height: 100vh;
   .com-column-flex
 }
+
+.doc-root {
+  height: 100%;
+}
+
+.report-root {
+  .com-column-flex;
+  height: 100%;
+
+  .report-func-root {
+    flex: 1;
+    overflow: auto;
+    width: 100%;
+  }
+}
+

+ 2 - 4
uas-office-web/uas-mobile/src/pages/private/oftenFunc/OftenFuncManage.jsx

@@ -12,14 +12,12 @@ import {
 } from '../../../configs/constans.config'
 import FuncGroup from '../../../components/common/func/FuncGroup'
 import { isObjEmpty, isObjNull } from '../../../utils/common/common.util'
-import {
-  analysisDocList,
-  refreshDocList,
-} from '../../../redux/actions/docState'
+import { refreshDocList } from '../../../redux/actions/docState'
 import { message } from 'antd'
 import { Toast } from 'antd-mobile'
 import { fetchPostObj } from '../../../utils/common/fetchRequest'
 import { API } from '../../../configs/api.config'
+import { analysisDocList } from '../../../utils/private/services.request'
 
 class OftenFuncManage extends Component {
 

+ 42 - 0
uas-office-web/uas-mobile/src/pages/private/report/ReportSearch.jsx

@@ -0,0 +1,42 @@
+/**
+ * Created by RaoMeng on 2020/12/3
+ * Desc: 报表搜索
+ */
+
+import React, { Component } from 'react'
+import { connect } from 'react-redux'
+import './report.less'
+import { SearchBar } from 'antd-mobile'
+
+class ReportSearch extends Component {
+
+  constructor () {
+    super()
+
+    this.state = {}
+  }
+
+  componentDidMount () {
+    document.title = '报表搜索'
+  }
+
+  componentWillUnmount () {
+
+  }
+
+  render () {
+    return (
+      <div
+        className='report-search-root'>
+        <SearchBar
+          placeholder={'搜索'}/>
+        <div
+          className='report-search-content'></div>
+      </div>
+    )
+  }
+}
+
+let mapStateToProps = (state) => ({})
+
+export default connect(mapStateToProps)(ReportSearch)

+ 8 - 0
uas-office-web/uas-mobile/src/pages/private/report/report.less

@@ -0,0 +1,8 @@
+.report-search-root {
+  .com-column-flex;
+
+  .report-search-content {
+    flex: 1;
+    overflow: auto;
+  }
+}

+ 0 - 45
uas-office-web/uas-mobile/src/redux/actions/docState.js

@@ -29,48 +29,3 @@ export const clearDocState = () => {
     type: CLEAR_DOC_STATE,
   })
 }
-
-/**
- * 解析并缓存应用列表数据
- * @param response
- */
-export const analysisDocList = (response) => {
-  const data = response.data
-  const docFuncGroupList = []
-  if (!isObjEmpty(data)) {
-    const responseList = data.list
-    if (!isObjEmpty(responseList)) {
-      responseList.forEach((groupItem, groupIndex) => {
-        let docFuncGroup = {
-          groupTitle: groupItem.groupTitle,
-          groupIndex: groupIndex,
-        }
-        const funcList = groupItem.funcList
-        if (!isObjEmpty(funcList)) {
-          let docFuncList = []
-          funcList.forEach((childItem, childIndex) => {
-            const docFunc = {
-              id: childItem.fid,
-              name: childItem.name,
-              caller: childItem.caller,
-              img: childItem.icon && childItem.icon.exticon,
-              often: childItem.often,
-              url: childItem.url && childItem.url.skipurl,
-              countUrl: childItem.url && childItem.url.counturl,
-              groupIndex: groupIndex,
-              childIndex: childIndex,
-              funcType: FUNC_TYPE_DOC,
-            }
-            docFuncList.push(docFunc)
-          })
-          docFuncGroup.funcList = docFuncList
-        }
-        docFuncGroupList.push(docFuncGroup)
-      })
-    }
-  }
-
-  refreshDocList({
-    docFuncGroupList,
-  })
-}

+ 31 - 0
uas-office-web/uas-mobile/src/redux/actions/reportState.js

@@ -0,0 +1,31 @@
+/**
+ * Created by RaoMeng on 2020/12/3
+ * Desc: 操作报表缓存数据
+ */
+import store from '../store/store'
+import {
+  REFRESH_REPORT_LIST,
+  CLEAR_REPORT_STATE,
+} from '../constants/actionTypes'
+
+/**
+ * 保存报表数据
+ * @param data
+ * @returns {Function}
+ */
+export const refreshReportList = (data) => {
+  return store.dispatch({
+    type: REFRESH_REPORT_LIST,
+    ...data,
+  })
+}
+
+/**
+ * 清除报表数据
+ * @returns {Function}
+ */
+export const clearReporttate = () => {
+  return store.dispatch({
+    type: CLEAR_REPORT_STATE,
+  })
+}

+ 2 - 138
uas-office-web/uas-mobile/src/redux/reducers/redReportState.js

@@ -9,144 +9,8 @@ import {
  */
 
 const initReportState = {
-  reportFuncList: [
-    {
-      groupTitle: '考勤报表',
-      groupIndex: 0,
-      funcList: [
-        {
-          name: '请假',
-          caller: '',
-          img: '',
-          groupIndex: 0,
-          often: false,
-          url: '',
-        },
-        {
-          name: '出差',
-          caller: '',
-          groupIndex: 0,
-          img: '',
-          often: true,
-          url: '',
-        },
-        {
-          name: '加班',
-          caller: '',
-          groupIndex: 0,
-          img: '',
-          often: false,
-          url: '',
-        },
-        {
-          name: '补卡',
-          caller: '',
-          groupIndex: 0,
-          img: '',
-          often: false,
-          url: '',
-        },
-      ],
-    },
-    {
-      groupTitle: '行政报表',
-      groupIndex: 1,
-      funcList: [
-        {
-          name: '销售日报',
-          caller: '',
-          img: '',
-          groupIndex: 1,
-          often: false,
-          url: '',
-        },
-        {
-          name: '周报',
-          caller: '',
-          img: '',
-          groupIndex: 1,
-          often: true,
-          url: '',
-        },
-        {
-          name: '月报',
-          caller: '',
-          groupIndex: 1,
-          img: '',
-          often: true,
-          url: '',
-        },
-        {
-          name: '季报',
-          caller: '',
-          groupIndex: 1,
-          img: '',
-          often: false,
-          url: '',
-        },
-        {
-          name: '半年报',
-          caller: '',
-          groupIndex: 1,
-          img: '',
-          often: true,
-          url: '',
-        },
-        {
-          name: '会议申请',
-          caller: '',
-          img: '',
-          groupIndex: 1,
-          often: false,
-          url: '',
-        },
-      ],
-    },
-    {
-      groupTitle: '采购报表',
-      groupIndex: 2,
-      funcList: [
-        {
-          name: '供应商',
-          caller: '',
-          img: '',
-          often: false,
-          groupIndex: 2,
-          url: '',
-        },
-        {
-          name: '物料资料',
-          caller: '',
-          img: '',
-          often: true,
-          groupIndex: 2,
-          url: '',
-        },
-      ],
-    },
-    {
-      groupTitle: '销售报表',
-      groupIndex: 3,
-      funcList: [
-        {
-          name: '客户资料',
-          caller: '',
-          groupIndex: 3,
-          img: '',
-          often: true,
-          url: '',
-        },
-        {
-          name: '客户拜访',
-          caller: '',
-          img: '',
-          groupIndex: 3,
-          often: false,
-          url: '',
-        },
-      ],
-    },
-  ],
+  reportFuncGroupList: [],//报表菜单
+  recentUse: [],//最近使用
 }
 
 const redReportState = (state = initReportState, action) => {

+ 77 - 0
uas-office-web/uas-mobile/src/utils/private/report.request.js

@@ -0,0 +1,77 @@
+/**
+ * Created by RaoMeng on 2020/12/3
+ * Desc: 报表模块通用方法类
+ */
+
+import { Toast } from 'antd-mobile'
+import { fetchGet } from '../common/fetchRequest'
+import { API } from '../../configs/api.config'
+import { message } from 'antd'
+import { refreshReportList } from '../../redux/actions/reportState'
+import { isObjEmpty } from '../common/common.util'
+import { FUNC_TYPE_REPORT } from '../../configs/constans.config'
+
+/**
+ * 获取报表菜单
+ */
+export function requestReportFunc () {
+  Toast.loading('正在获取报表列表', 0)
+  return fetchGet(API.REPORT_QUERYREPORTLIST).then(response => {
+    Toast.hide()
+    analysisReportList(response)
+  }).catch(error => {
+    Toast.hide()
+    refreshReportList({
+      reportFuncGroupList: [],
+    })
+    if (typeof error === 'string') {
+      message.error(error)
+    } else {
+      message.error('报表列表获取失败')
+    }
+  })
+}
+
+/**
+ * 解析并缓存报表菜单数据
+ * @param response
+ */
+export const analysisReportList = (response) => {
+  const data = response.data
+  const reportFuncGroupList = []
+  if (!isObjEmpty(data)) {
+    const responseList = data.list
+    if (!isObjEmpty(responseList)) {
+      responseList.forEach((groupItem, groupIndex) => {
+        let reportFuncGroup = {
+          groupTitle: groupItem.groupTitle,
+          groupIndex: groupIndex,
+        }
+        const funcList = groupItem.list
+        if (!isObjEmpty(funcList)) {
+          let reportFuncList = []
+          funcList.forEach((childItem, childIndex) => {
+            const reportFunc = {
+              id: childItem.schemeId,
+              name: childItem.title,
+              parentTitle: childItem.parentTitle,
+              caller: childItem.caller,
+              img: childItem.img,
+              url: childItem.url,
+              groupIndex: groupIndex,
+              childIndex: childIndex,
+              funcType: FUNC_TYPE_REPORT,
+            }
+            reportFuncList.push(reportFunc)
+          })
+          reportFuncGroup.funcList = reportFuncList
+        }
+        reportFuncGroupList.push(reportFuncGroup)
+      })
+    }
+  }
+
+  refreshReportList({
+    reportFuncGroupList,
+  })
+}

+ 54 - 2
uas-office-web/uas-mobile/src/utils/private/services.request.js

@@ -1,15 +1,22 @@
 import { Toast } from 'antd-mobile'
 import { fetchPostObj } from '../common/fetchRequest'
 import { API } from '../../configs/api.config'
-import { analysisDocList, refreshDocList } from '../../redux/actions/docState'
+import { refreshDocList } from '../../redux/actions/docState'
 import { message } from 'antd'
+import { isObjEmpty } from '../common/common.util'
+import { FUNC_TYPE_DOC } from '../../configs/constans.config'
+
+/**
+ * Created by RaoMeng on 2020/12/3
+ * Desc: 应用模块通用方法类
+ */
 
 /**
  * 获取应用列表
  */
 export function requestServices () {
   Toast.loading('正在获取应用列表', 0)
-  fetchPostObj(API.APPCOMMON_GETSERVICE, {
+  return fetchPostObj(API.APPCOMMON_GETSERVICE, {
     kind: 'uasapp',
   }).then(response => {
     Toast.hide()
@@ -26,3 +33,48 @@ export function requestServices () {
     }
   })
 }
+
+/**
+ * 解析并缓存应用列表数据
+ * @param response
+ */
+export const analysisDocList = (response) => {
+  const data = response.data
+  const docFuncGroupList = []
+  if (!isObjEmpty(data)) {
+    const responseList = data.list
+    if (!isObjEmpty(responseList)) {
+      responseList.forEach((groupItem, groupIndex) => {
+        let docFuncGroup = {
+          groupTitle: groupItem.groupTitle,
+          groupIndex: groupIndex,
+        }
+        const funcList = groupItem.funcList
+        if (!isObjEmpty(funcList)) {
+          let docFuncList = []
+          funcList.forEach((childItem, childIndex) => {
+            const docFunc = {
+              id: childItem.fid,
+              name: childItem.name,
+              caller: childItem.caller,
+              img: childItem.icon && childItem.icon.exticon,
+              often: childItem.often,
+              url: childItem.url && childItem.url.skipurl,
+              countUrl: childItem.url && childItem.url.counturl,
+              groupIndex: groupIndex,
+              childIndex: childIndex,
+              funcType: FUNC_TYPE_DOC,
+            }
+            docFuncList.push(docFunc)
+          })
+          docFuncGroup.funcList = docFuncList
+        }
+        docFuncGroupList.push(docFuncGroup)
+      })
+    }
+  }
+
+  refreshDocList({
+    docFuncGroupList,
+  })
+}