Browse Source

字段限制

1178232204@qq.com 3 years ago
parent
commit
d235c20bf0

+ 20 - 0
package-lock.json

@@ -9,6 +9,7 @@
       "version": "0.1.0",
       "dependencies": {
         "@craco/craco": "^6.2.0",
+        "@icon-park/react": "^1.3.5",
         "@reduxjs/toolkit": "^1.6.1",
         "@testing-library/jest-dom": "^5.11.4",
         "@testing-library/react": "^11.1.0",
@@ -2094,6 +2095,19 @@
         "@hapi/hoek": "^8.3.0"
       }
     },
+    "node_modules/@icon-park/react": {
+      "version": "1.3.5",
+      "resolved": "https://registry.npmjs.org/@icon-park/react/-/react-1.3.5.tgz",
+      "integrity": "sha512-FL3+BcYfFbRRl6DA6V2yA/QEoRRrhaDvMXLbFz0uW9lIsstQB6au/8aQxthB1G+eiqLxcw6yVULbmbBySn4Paw==",
+      "engines": {
+        "node": ">= 8.0.0",
+        "npm": ">= 5.0.0"
+      },
+      "peerDependencies": {
+        "react": ">=16.9",
+        "react-dom": ">=16.9"
+      }
+    },
     "node_modules/@istanbuljs/load-nyc-config": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",
@@ -22426,6 +22440,12 @@
         "@hapi/hoek": "^8.3.0"
       }
     },
+    "@icon-park/react": {
+      "version": "1.3.5",
+      "resolved": "https://registry.npmjs.org/@icon-park/react/-/react-1.3.5.tgz",
+      "integrity": "sha512-FL3+BcYfFbRRl6DA6V2yA/QEoRRrhaDvMXLbFz0uW9lIsstQB6au/8aQxthB1G+eiqLxcw6yVULbmbBySn4Paw==",
+      "requires": {}
+    },
     "@istanbuljs/load-nyc-config": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz",

+ 1 - 0
package.json

@@ -4,6 +4,7 @@
   "private": true,
   "dependencies": {
     "@craco/craco": "^6.2.0",
+    "@icon-park/react": "^1.3.5",
     "@reduxjs/toolkit": "^1.6.1",
     "@testing-library/jest-dom": "^5.11.4",
     "@testing-library/react": "^11.1.0",

+ 5 - 0
src/common/common.less

@@ -216,3 +216,8 @@ body {
   color: #333333;
   line-height: 17px;
 }
+.ant-layout-sider-collapsed{
+  .logoT{
+    display: none;
+  }
+}

File diff suppressed because it is too large
+ 56 - 46
src/components/AMenu/index.js


+ 2 - 1
src/components/BlockLossManage/editBlock.js

@@ -197,6 +197,7 @@ function EditBlock(props) {
                     >
                         <TextArea
                             autoSize={{ minRows: 5, maxRows: 5 }}
+                            maxLength='200'
                         />
                     </Form.Item>
                 </Col>
@@ -215,7 +216,7 @@ function EditBlock(props) {
                 </Col>
                 <Col span={24} hidden={type == 3} style={{ marginTop: 15 }}>
                     <Form.Item label="住院序号" name="behospitalCode">
-                        <Input placeholder="请输入" autoComplete='off' onChange={change} />
+                        <Input placeholder="请输入" autoComplete='off' onChange={change} maxLength='30'/>
                     </Form.Item>
                 </Col>
                 {

+ 3 - 3
src/components/BlockLossManage/index.js

@@ -175,17 +175,17 @@ function BlockLossManage() {
                         </Col>
                         <Col span={5} key={1}>
                             <Form.Item label="住院序号" name="behospitalCode">
-                                <Input placeholder="住院序号" autoComplete='off' />
+                                <Input placeholder="住院序号" autoComplete='off' maxLength='30'/>
                             </Form.Item>
                         </Col>
                         <Col span={5} key={2}>
                             <Form.Item label="文书编号" name="recId">
-                                <Input placeholder="文书编号" autoComplete='off' />
+                                <Input placeholder="文书编号" autoComplete='off' maxLength='30'/>
                             </Form.Item>
                         </Col>
                         <Col span={5} key={3}>
                             <Form.Item label="文书标题" name="recTitle">
-                                <Input placeholder="文书标题" autoComplete='off' />
+                                <Input placeholder="文书标题" autoComplete='off' maxLength='30'/>
                             </Form.Item>
                         </Col>
                         <Col span={5} key={4}>

+ 2 - 1
src/components/FieldProblem/editProblem.js

@@ -201,6 +201,7 @@ function EditBlock(props) {
                     >
                         <TextArea
                             autoSize={{ minRows: 5, maxRows: 5 }}
+                            maxLength='200'
                         />
                     </Form.Item>
                 </Col>
@@ -217,7 +218,7 @@ function EditBlock(props) {
                 </Col>
                 <Col span={24} hidden={type == 3} style={{ marginTop: 15 }}>
                     <Form.Item label="住院序号" name="behospitalCode">
-                        <Input placeholder="请输入" autoComplete='off' onChange={change} />
+                        <Input placeholder="请输入" autoComplete='off' onChange={change} maxLength='30'/>
                     </Form.Item>
                 </Col>
                 {

+ 17 - 17
src/components/FieldProblem/index.js

@@ -14,17 +14,7 @@ const { Option } = Select;
 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
-        // },
+        getColumnResultNumber(date)
     }, []);
     const [logList, setLogList] = useState([]);
     const [total, setTotal] = useState(0);
@@ -42,6 +32,10 @@ function FieldProblem() {
         solveTimeStart: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
         solveTimeEnd: getCurrentData().split('/').join('-') + ' 23:23:59'
     });
+    const [date, setDate] = useState({
+        solveTimeStart: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
+        solveTimeEnd: getCurrentData().split('/').join('-') + ' 23:23:59'
+    });
     const [form] = Form.useForm();
     let data = {
         pages: 1,
@@ -58,8 +52,11 @@ function FieldProblem() {
             }
         })
     }
-    function getColumnResultNumber() {
-        post(api.getColumnResultNumber, { hospitalId: getCookie('hospitalId') }).then((res) => {
+    function getColumnResultNumber(param) {
+        post(api.getColumnResultNumber, {
+            hospitalId: getCookie('hospitalId'),
+            ...param
+        }).then((res) => {
             if (res.data.code === 200) {
                 const data = res.data.data || [];
                 setProbleData(data)
@@ -82,6 +79,7 @@ function FieldProblem() {
     function userChange() {
         setVisible(false)
         getColumnResultPage();
+        getColumnResultNumber(date)
     }
     function onSizeChange(current, pageSize) {
         params.current = current
@@ -108,9 +106,11 @@ function FieldProblem() {
             ...data,
             ...value,
         }
+        setDate({solveTimeStart:value.solveTimeStart,solveTimeEnd:value.solveTimeEnd})
         setCurrent(1)
         setParams(param)
         getColumnResultPage(param);
+        getColumnResultNumber({solveTimeStart:value.solveTimeStart,solveTimeEnd:value.solveTimeEnd})
     };
     const onReset = () => {
         setCurrent(1)
@@ -181,22 +181,22 @@ function FieldProblem() {
                         </Col>
                         <Col span={5} key={1}>
                             <Form.Item label="住院序号" name="behospitalCode">
-                                <Input placeholder="住院序号" autoComplete='off' />
+                                <Input placeholder="住院序号" autoComplete='off' maxLength='30'/>
                             </Form.Item>
                         </Col>
                         <Col span={5} key={2}>
                             <Form.Item label="文书编号" name="recId">
-                                <Input placeholder="文书编号" autoComplete='off' />
+                                <Input placeholder="文书编号" autoComplete='off' maxLength='30'/>
                             </Form.Item>
                         </Col>
                         <Col span={5} key={3}>
                             <Form.Item label="文书标题" name="recTitle">
-                                <Input placeholder="文书标题" autoComplete='off' />
+                                <Input placeholder="文书标题" autoComplete='off' maxLength='30'/>
                             </Form.Item>
                         </Col>
                         <Col span={5} key={4}>
                             <Form.Item label="质控模块名称" name="modeName">
-                                <Input placeholder="质控模块名称" autoComplete='off' />
+                                <Input placeholder="质控模块名称" autoComplete='off' maxLength='30'/>
                             </Form.Item>
                         </Col>
                         <Col span={5} key={5}>

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

@@ -312,7 +312,7 @@ function FieldRules() {
                         </Col>
                         <Col span={5} key={5}>
                             <Form.Item label="标准值" name="standardValue">
-                                <Input placeholder="标准值" autoComplete='off' />
+                                <Input placeholder="标准值" autoComplete='off' maxLength='30'/>
                             </Form.Item>
                         </Col>
                         <Col span={5} key={6}>

+ 2 - 0
src/components/RegularManage/addRegular.js

@@ -60,11 +60,13 @@ function EditBlock(props) {
                 <Form.Item label="正则式值" name="val" rules={[{ required: true }]}>
                     <TextArea
                         autoSize={{ minRows: 5, maxRows: 5 }}
+                        maxLength='30'
                     />
                 </Form.Item>
                 <Form.Item label="说明" name="description">
                     <TextArea
                         autoSize={{ minRows: 5, maxRows: 5 }}
+                        maxLength='200'
                     />
                 </Form.Item>
                 <Form.Item wrapperCol={{ offset: 8, span: 16 }} style={{ marginTop: 15 }}>

+ 7 - 2
yarn.lock

@@ -1302,6 +1302,11 @@
   dependencies:
     "@hapi/hoek" "^8.3.0"
 
+"@icon-park/react@^1.3.5":
+  "integrity" "sha512-FL3+BcYfFbRRl6DA6V2yA/QEoRRrhaDvMXLbFz0uW9lIsstQB6au/8aQxthB1G+eiqLxcw6yVULbmbBySn4Paw=="
+  "resolved" "https://registry.npmjs.org/@icon-park/react/-/react-1.3.5.tgz"
+  "version" "1.3.5"
+
 "@istanbuljs/load-nyc-config@^1.0.0":
   "integrity" "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ=="
   "resolved" "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz"
@@ -9939,7 +9944,7 @@
     "strip-ansi" "6.0.0"
     "text-table" "0.2.0"
 
-"react-dom@*", "react-dom@^17.0.2", "react-dom@>= 16.9.0", "react-dom@>=16.9.0":
+"react-dom@*", "react-dom@^17.0.2", "react-dom@>= 16.9.0", "react-dom@>=16.9", "react-dom@>=16.9.0":
   "integrity" "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA=="
   "resolved" "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz"
   "version" "17.0.2"
@@ -10075,7 +10080,7 @@
   optionalDependencies:
     "fsevents" "^2.1.3"
 
-"react@*", "react@^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", "react@^0.14.9 || ^15.3.0 || ^16.0.0", "react@^16.14.0 || ^17.0.0", "react@^16.8.3 || ^17", "react@^17.0.2", "react@>= 16", "react@>= 16.9.0", "react@>=15", "react@>=16.0.0", "react@>=16.9.0", "react@17.0.2":
+"react@*", "react@^0.14.0 || ^15.0.0 || ^16.0.0 || ^17.0.0", "react@^0.14.9 || ^15.3.0 || ^16.0.0", "react@^16.14.0 || ^17.0.0", "react@^16.8.3 || ^17", "react@^17.0.2", "react@>= 16", "react@>= 16.9.0", "react@>=15", "react@>=16.0.0", "react@>=16.9", "react@>=16.9.0", "react@17.0.2":
   "integrity" "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA=="
   "resolved" "https://registry.npmjs.org/react/-/react-17.0.2.tgz"
   "version" "17.0.2"