فهرست منبع

菜单缩放、设置默认时间

1178232204@qq.com 3 سال پیش
والد
کامیت
ac1e372956

+ 1 - 0
src/App.less

@@ -5,6 +5,7 @@
   background: @primary-color;
   height: @header-height;
   line-height: @header-height;
+  padding: 0 50px 0 29px;
 }
 .page-sider{
   height: calc(100vh - @header-height - 10px );

+ 79 - 54
src/common/common.less

@@ -1,14 +1,14 @@
-@body-bg:#EBEEF4; /**body背景色***/
-@bg-color:#fff;  /**主题背景色**/
-@header-height:50px;  /***Header高度**/
-@table-th-color:#F2F4F6;  /***表头背景色***/
-@active-bg:#DEF1FF;   /***下拉项选中背景色***/
+@body-bg: #ebeef4; /**body背景色***/
+@bg-color: #fff; /**主题背景色**/
+@header-height: 50px; /***Header高度**/
+@table-th-color: #f2f4f6; /***表头背景色***/
+@active-bg: #def1ff; /***下拉项选中背景色***/
 
-body{
+body {
   background: @body-bg;
   overflow-y: hidden;
 }
-.clearfix:after{
+.clearfix:after {
   content: "";
   display: block;
   height: 0;
@@ -20,74 +20,81 @@ body{
   zoom: 1;
 }
 
-.ant-form-item-label > label{
+.ant-form-item-label > label {
   color: #000;
 }
-.ant-modal-body .ant-table-tbody > tr > td{
+.ant-modal-body .ant-table-tbody > tr > td {
   padding: 6px;
 }
 /*.ant-table-wrapper{
   height: calc(100vh - 240px);
   overflow-y: auto;
 }*/
-.wrapper{
+.wrapper {
   min-width: 1214px;
   padding: 15px 30px;
-  .filter-box{
+  .filter-box {
     border-bottom: 1px @border-color-base solid;
   }
-  .ant-form-item{
+  .ant-form-item {
     margin-bottom: 15px;
   }
-  .basic{
+  .basic {
     background: #fff;
     display: flex;
     justify-content: space-between;
     align-items: center;
     border-radius: 4px;
   }
-  .table{
-    .table-header{
+  .table {
+    .table-header {
       display: flex;
       justify-content: space-between;
       padding: 15px 0;
-      .table-title{
+      .table-title {
         font-size: 16px;
         font-weight: bold;
       }
     }
   }
 }
-.ant-table-pagination-right{
+.ant-table-pagination-right {
   justify-content: flex-start;
 }
 //面包屑样式覆盖
-.ant-breadcrumb{
+.ant-breadcrumb {
   margin: 20px 0 30px 30px;
 }
 //步骤条样式覆盖
-.ant-steps-item-icon{
+.ant-steps-item-icon {
   width: 44px;
   height: 44px;
   line-height: 44px;
 }
-.ant-steps-item-tail{
-  top:18px;
+.ant-steps-item-tail {
+  top: 18px;
   left: 4px;
 }
-.ant-steps-item-process > .ant-steps-item-container > .ant-steps-item-content > .ant-steps-item-title::after,
+.ant-steps-item-process
+  > .ant-steps-item-container
+  > .ant-steps-item-content
+  > .ant-steps-item-title::after,
 .ant-steps-item-title::after,
-.ant-steps-item-wait > .ant-steps-item-container > .ant-steps-item-content > .ant-steps-item-title::after{
-  background-color:#c2c2c2;
-}
-.ant-steps-item-icon, .ant-steps-item-content{
+.ant-steps-item-wait
+  > .ant-steps-item-container
+  > .ant-steps-item-content
+  > .ant-steps-item-title::after {
+  background-color: #c2c2c2;
+}
+.ant-steps-item-icon,
+.ant-steps-item-content {
   vertical-align: unset;
 }
-.ant-tabs-tabpane{
-  overflow-x:auto;
+.ant-tabs-tabpane {
+  overflow-x: auto;
 }
 //启用
-.Enable::before{
+.Enable::before {
   content: "";
   width: 5px;
   height: 5px;
@@ -99,7 +106,7 @@ body{
   border-radius: 50%;
 }
 //禁用
-.Disable::before{
+.Disable::before {
   content: "";
   width: 5px;
   height: 5px;
@@ -107,10 +114,10 @@ body{
   position: relative;
   left: -10px;
   top: 14px;
-  background: #FE9748;
+  background: #fe9748;
   border-radius: 50%;
 }
-.Delete::before{
+.Delete::before {
   content: "";
   width: 5px;
   height: 5px;
@@ -118,10 +125,10 @@ body{
   position: relative;
   left: -10px;
   top: 14px;
-  background: #FF4D4D;
+  background: #ff4d4d;
   border-radius: 50%;
 }
-.Adopt::before{
+.Adopt::before {
   content: "";
   width: 5px;
   height: 5px;
@@ -129,23 +136,23 @@ body{
   position: relative;
   left: -10px;
   top: 14px;
-  background: #FF4D4D;
+  background: #ff4d4d;
   border-radius: 50%;
 }
-.disable{
-  color: #FB8537 ;
+.disable {
+  color: #fb8537;
 }
-.delete{
-  color:#FF4D4D
+.delete {
+  color: #ff4d4d;
 }
-.adopt{
-  color:#22AC76
+.adopt {
+  color: #22ac76;
 }
-.menuItem:hover{
+.menuItem:hover {
   color: @primary-color;
-  background: #DBEEFF;
+  background: #dbeeff;
 }
-.record{
+.record {
   width: 150px;
   overflow: hidden;
   white-space: nowrap;
@@ -154,40 +161,58 @@ body{
 }
 
 //指定科室样式
-.treeContent{
+.treeContent {
   height: 408px;
   overflow-y: auto;
-  border: 1px solid #DEE2E9;
+  border: 1px solid #dee2e9;
   padding-bottom: 20px;
   position: relative;
-  .title{
+  .title {
     height: 30px;
     font-size: 14px;
     font-weight: 500;
     color: #333333;
     line-height: 30px;
-    background: #F2F4F6;
+    background: #f2f4f6;
     padding-left: 20px;
   }
-  .tree{
+  .tree {
     min-height: 100px;
     max-height: 342px;
     overflow-y: auto;
   }
-  .goTop{
+  .goTop {
     position: fixed;
     right: 11%;
     top: 67%;
     width: 30px;
     height: 30px;
-    border: 1px solid #D4D4D4;
+    border: 1px solid #d4d4d4;
     border-radius: 4px;
     vertical-align: middle;
     text-align: center;
   }
 }
-.user{
-  .ant-form-item{
+.user {
+  .ant-form-item {
     margin-bottom: 15px;
   }
-}
+}
+.toogle {
+  position: absolute;
+  bottom: 20px;
+  left: 26px;
+  .icon{
+    font-size: 20px;
+    color: #1690FF;
+  }
+}
+.logoT {
+  position: absolute;
+  bottom: 10px;
+  left: 25px;
+  font-size: 12px;
+  font-weight: 400;
+  color: #333333;
+  line-height: 17px;
+}

+ 13 - 2
src/components/BlockLossManage/index.js

@@ -28,7 +28,9 @@ function BlockLossManage() {
     const [params, setParams] = useState({
         pages: 1,
         current: 1,
-        size: 15
+        size: 15,
+        solveTimeStart: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
+        solveTimeEnd: getCurrentData().split('/').join('-') + ' 23:23:59'
     });
     const [form] = Form.useForm();
     let data = {
@@ -108,6 +110,15 @@ function BlockLossManage() {
         form.resetFields();
         getBlockLossPage(data);
     };
+    function getCurrentDataFront() {
+        let time = new Date((new Date() - 30 * 24 * 3600 * 1000)).toLocaleDateString()
+        return time
+    }
+    // 结束时间
+    function getCurrentData() {
+        let time = new Date().toLocaleDateString()
+        return time
+    }
     const columns = [
         { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
         { title: '住院序号', dataIndex: 'behospitalCode', key: 'behospitalCode' },
@@ -151,7 +162,7 @@ function BlockLossManage() {
                     form={form}
                     name="normal_login"
                     onFinish={onFinish}
-                    initialValues={{ lossType: '', lossWay: '', isAudited: '', status: '' }}
+                    initialValues={{ lossType: '', lossWay: '', isAudited: '', status: '', time: [moment(getCurrentDataFront()), moment(getCurrentData())] }}
                 >
                     <Row gutter={24}>
                         <Col span={6} key={0}>

+ 25 - 2
src/components/FieldProblem/index.js

@@ -15,6 +15,16 @@ function FieldProblem() {
     useEffect(() => {
         getColumnResultPage();
         getColumnResultNumber()
+        console.log(new Date((new Date() - 30 * 24 * 3600 * 1000)).toLocaleDateString());
+        // getCurrentDataFront() {
+        //     let time = new Date((new Date() - 30 * 24 * 3600 * 1000)).toLocaleDateString()
+        //     return time
+        // },
+        // // 结束时间
+        // getCurrentData() {
+        //     let time = new Date().toLocaleDateString()
+        //     return time
+        // },
     }, []);
     const [logList, setLogList] = useState([]);
     const [total, setTotal] = useState(0);
@@ -28,7 +38,9 @@ function FieldProblem() {
     const [params, setParams] = useState({
         pages: 1,
         current: 1,
-        size: 15
+        size: 15,
+        solveTimeStart: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
+        solveTimeEnd: getCurrentData().split('/').join('-') + ' 23:23:59'
     });
     const [form] = Form.useForm();
     let data = {
@@ -106,6 +118,15 @@ function FieldProblem() {
         form.resetFields();
         getColumnResultPage(data);
     };
+    function getCurrentDataFront() {
+        let time = new Date((new Date() - 30 * 24 * 3600 * 1000)).toLocaleDateString()
+        return time
+    }
+    // 结束时间
+    function getCurrentData() {
+        let time = new Date().toLocaleDateString()
+        return time
+    }
     const columns = [
         { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
         { title: '住院序号', dataIndex: 'behospitalCode', key: 'behospitalCode' },
@@ -145,7 +166,9 @@ function FieldProblem() {
                     form={form}
                     name="normal_login"
                     onFinish={onFinish}
-                    initialValues={{ isSolved: '', type: '' }}
+                    initialValues={{
+                        isSolved: '', type: '', time: [moment(getCurrentDataFront()), moment(getCurrentData())]
+                    }}
                 >
                     <Row gutter={24}>
                         <Col span={6} key={0}>

+ 19 - 19
src/components/FieldRules/index.js

@@ -1,5 +1,5 @@
 import React, { useState, useEffect, useRef } from 'react';
-import { Form, Input, Button, Table, Row, Col, Select, Modal, DatePicker, Space,message } from 'antd';
+import { Form, Input, Button, Table, Row, Col, Select, Modal, DatePicker, Space, message } from 'antd';
 import { DeleteOutlined, PlusOutlined } from '@ant-design/icons';
 import '@common/common.less';
 import apiObj from '@api/index';
@@ -128,42 +128,42 @@ function FieldRules() {
         setVisible(flag)
     }
     //新增修改跳转
-    function showModal(type,id) {
+    function showModal(type, id) {
         setAddVisible(true)
         setType(type)
-        if(type == 1){
+        if (type == 1) {
             setFiledDetail({
                 columnList: [{
                     columnCname: undefined,
                     columnEname: undefined,
                     ableCname: undefined,
                     tableEname: undefined,
-                    id:undefined
+                    id: undefined
                 }],
                 standardValueList: [{
                     tit: ''
                 }]
             })
-        }else{
+        } else {
             getByIdColumnVerify(id)
         }
-        
+
     }
     //详情
-    function getByIdColumnVerify(id){
+    function getByIdColumnVerify(id) {
         const param = {
             columnId: id,
         }
         post(api.getByIdColumnVerify, param).then((res) => {
             if (res.data.code === 200) {
                 const data = res.data.data;
-                const arr ={
+                const arr = {
                     columnList: [{
                         columnCname: data.columnCname,
                         columnEname: data.columnEname,
                         tableCname: data.tableCname,
                         tableEname: data.tableEname,
-                        id:data.id
+                        id: data.id
                     }],
                     standardValueList: [{
                         tit: data.standardvalue,
@@ -212,23 +212,23 @@ function FieldRules() {
         getColumnVerifyPage(data);
     };
     const columns = [
-        { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1,width: 60 },
-        { title: '表名称(中文)', dataIndex: 'tableCname', key: 'tableCname',width: 130, },
-        { title: '表名称(英文)', dataIndex: 'tableEname', key: 'tableEname',width: 130, },
-        { title: '字段名称(中文)', dataIndex: 'columnCname', key: 'columnCname',width: 145, },
-        { title: '字段名称(英文)', dataIndex: 'columnEname', key: 'columnEname',width: 145, },
+        { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1, width: 60 },
+        { title: '表名称(中文)', dataIndex: 'tableCname', key: 'tableCname', width: 130, },
+        { title: '表名称(英文)', dataIndex: 'tableEname', key: 'tableEname', width: 130, },
+        { title: '字段名称(中文)', dataIndex: 'columnCname', key: 'columnCname', width: 145, },
+        { title: '字段名称(英文)', dataIndex: 'columnEname', key: 'columnEname', width: 145, },
         {
             title: '是否必填', dataIndex: 'isRequired', key: 'isRequired', render: (text, record) => {
-                return record.isRequired == 1 ? "是" : "否";
+                return record.isRequired == 1 ? "是" : record.isRequired == 0 ? "否" : '';
             }
         },
-        { title: '标准值维护', dataIndex: 'standardvalue', key: 'standardvalue',width: 110 },
-        { title: '正则式名称', dataIndex: 'regular', key: 'regular',width: 110 },
+        { title: '标准值维护', dataIndex: 'standardvalue', key: 'standardvalue', width: 110 },
+        { title: '正则式名称', dataIndex: 'regular', key: 'regular', width: 110 },
         { title: '说明', dataIndex: 'description', key: 'description' },
         {
             title: '操作', dataIndex: 'key', render: (text, record) => (
                 <Space size="middle">
-                    <a onClick={() => showModal(2,record.columnId)}>修改</a>
+                    <a onClick={() => showModal(2, record.columnId)}>修改</a>
                 </Space>
             )
         }
@@ -251,7 +251,7 @@ function FieldRules() {
                     form={form}
                     name="normal_login"
                     onFinish={onFinish}
-                    initialValues={{ lossType: '', lossWay: '', isRequired: ''}}
+                    initialValues={{ lossType: '', lossWay: '', isRequired: '' }}
                 >
                     <Row gutter={24}>
                         <Col span={6} key={0}>

+ 20 - 11
src/components/PageLayout/index.js

@@ -1,20 +1,22 @@
-import {useEffect,useState} from 'react';
-import { useDispatch,useSelector } from 'react-redux'
-import { Layout } from 'antd';
+import { useEffect, useState } from 'react';
+import { useDispatch, useSelector } from 'react-redux'
+import { MenuUnfoldOutlined,MenuFoldOutlined } from '@ant-design/icons';
+import { Layout, Button } from 'antd';
 import AHeader from '../AHeader'
 import AMenu from '../AMenu'
 import ATabs from '../ATabs'
 import apiObj from '@api/index';
-import { setStatusList, setHisTypeList, setTitleList, setDataList,setMsgTypeList, setMsgStatusList} from '@reducers/staticInfo';
+import { setStatusList, setHisTypeList, setTitleList, setDataList, setMsgTypeList, setMsgStatusList } from '@reducers/staticInfo';
 
-const {  Content, Sider } = Layout;
-const {post,api,xPost} = apiObj;
+const { Content, Sider } = Layout;
+const { post, api, xPost } = apiObj;
 const propTypes = {
 
 }
 const defaultProps = {};
 
-function PageLayout(){
+function PageLayout() {
+    const [collapsed, setCollapsed] = useState(false);
     const dispatch = useDispatch();
     /*const staticInfo =useSelector(state => {
         return state.staticInfo;
@@ -27,7 +29,7 @@ function PageLayout(){
         post(api.getManagerBoxInfo).then((res) => {
             if (res.data.code === 200) {
                 const data = res.data.data;
-                dispatch(setHisTypeList(data[43]||data[45]));       //非单家医院为医院类型43,单家医院为病区45
+                dispatch(setHisTypeList(data[43] || data[45]));       //非单家医院为医院类型43,单家医院为病区45
                 dispatch(setStatusList(data[47]));
                 dispatch(setTitleList(data[40]));
                 dispatch(setDataList(data[48]));
@@ -36,15 +38,22 @@ function PageLayout(){
             }
         })
     }
-    useEffect(()=>{
+    function toggleCollapsed() {
+        setCollapsed(!collapsed)
+    }
+    useEffect(() => {
         getStaticInfos()
-    },[]);
+    }, []);
     return (
         <Layout>
             <AHeader></AHeader>
             <Layout>
-                <Sider className='page-sider'>
+                <Sider className='page-sider' collapsed={collapsed} >
                     <AMenu></AMenu>
+                    <span onClick={toggleCollapsed} style={{ marginBottom: 16 }} className='toogle'>
+                        {collapsed ? <MenuUnfoldOutlined className='icon'/> : <MenuFoldOutlined className='icon'/>}
+                    </span>
+                    <span className='logoT'>©杭州朗通信息技术有限公司</span>
                 </Sider>
                 <Content className='page-content'>
                     <ATabs></ATabs>