Quellcode durchsuchen

添加系统判断

1178232204@qq.com vor 3 Jahren
Ursprung
Commit
a025cf644f

+ 6 - 3
src/components/BlockLossManage/editBlock.js

@@ -1,11 +1,12 @@
 import React, {
     useState, useEffect, useContext
 } from 'react';
-import { Form, Col, DatePicker, Button, Radio, TreeSelect, message, Space, Input } from 'antd';
+import { Form, Col, DatePicker, Button, Radio, message, Space, Input } from 'antd';
 import apiObj from '@api/index';
 import BlockContext from './block-context';
 import moment from "moment";
 import "moment/locale/zh-cn"
+import { getCookie } from '@utils/index'
 const { RangePicker } = DatePicker;
 const { post, api, xPost } = apiObj;
 const { TextArea } = Input;
@@ -76,7 +77,8 @@ function EditBlock(props) {
         let params = {
             behospitalCode: values.behospitalCode,
             endDate: values.endDate,
-            startDate: values.startDate
+            startDate: values.startDate,
+            isPlacefile:getCookie('isPlacefile')
         }
         post(api.dataRepari, params).then((res) => {
             if (res.data.code === 200) {
@@ -95,7 +97,8 @@ function EditBlock(props) {
         let params = {
             behospitalCode: values.behospitalCode,
             endDate: values.endDate,
-            startDate: values.startDate
+            startDate: values.startDate,
+            isPlacefile:getCookie('isPlacefile')
         }
         post(api.dataCompare, params).then((res) => {
             if (res.data.code === 200) {

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

@@ -6,6 +6,7 @@ import apiObj from '@api/index';
 import BlockContext from './problem-context';
 import moment from "moment";
 import "moment/locale/zh-cn"
+import { getCookie } from '@utils/index'
 const { RangePicker } = DatePicker;
 const { post, api, xPost } = apiObj;
 const { TextArea } = Input;
@@ -55,7 +56,8 @@ function EditBlock(props) {
         let params = {
             behospitalCode: values.behospitalCode,
             dateEnd: values.endDate,
-            dateStart: values.startDate
+            dateStart: values.startDate,
+            isPlacefile:getCookie('isPlacefile')
         }
         post(api.dataCheck, params).then((res) => {
             if (res.data.code === 200) {

+ 6 - 5
src/components/FieldRules/addRules.js

@@ -109,7 +109,7 @@ function ContentForm(props) {
         seIsChange(false)
         setColList([...colList])
     }
-    function colchange(value, options){
+    function colchange(value, options) {
         const formData = form.getFieldsValue();
         let columnList = formData.columnList;
         columnList[options.index].id = options.key
@@ -142,7 +142,7 @@ function ContentForm(props) {
         let standardValueList = formData.standardValueList;
         if (i == 0) {
             standardValueList.push({
-                tit: ''
+                tit: null
             })
         } else {
             standardValueList.splice(i, 1)
@@ -171,12 +171,14 @@ function ContentForm(props) {
     }
     function addColumnVerify() {
         const formData = form.getFieldsValue();
-        console.log(formData);
         let arr = []
         let url
         formData.standardValueList.forEach(it => {
-            arr.push(it.tit)
+            if (it.tit) {
+                arr.push(it.tit)
+            }
         });
+        console.log(arr);
         formData.standardValueList = arr
         if (type == 1) {
             url = api.addColumnVerify
@@ -204,7 +206,6 @@ function ContentForm(props) {
             seIsChange(false)
             list.forEach((item, i) => {
                 detail.columnList.forEach(it => {
-                    console.log(456);
                     if (item.getTableNameDTO.tableCname == it.tableCname) {
                         let colList = list[i].getColumnNameDTOList
                         console.log(colList);

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

@@ -141,7 +141,7 @@ function FieldRules() {
                     id: undefined
                 }],
                 standardValueList: [{
-                    tit: ''
+                    tit: null
                 }]
             })
         } else {

+ 2 - 0
src/components/SysChoose/index.js

@@ -41,6 +41,7 @@ function SysChoose({history}) {
         const his =checkOrg.hospitals;
         setSysId(id);
         setHisList(his);
+        setCookie('isPlacefile',id == 2?0:1);
     }
     //获取组织列表
     function getOrgList(){
@@ -53,6 +54,7 @@ function SysChoose({history}) {
                 setSysId(software[0].id);
                 setCookie('userId',userInfo.id);
 			    setCookie('userName',userInfo.name);
+                setCookie('isPlacefile',userInfo.id == 2?0:1);
                 dispatch(setUser(userInfo));
                 localStorage.setItem('software', JSON.stringify(software));
                 //默认显示第一个系统的组织