Przeglądaj źródła

Merge branch 'master' of http://git.ycjcjy.com/medical-plat/pc-admin

Your Name 4 lat temu
rodzic
commit
93032ebd85

+ 17
- 17
src/pages/Medical/Test/List/index.jsx Wyświetl plik

@@ -14,11 +14,11 @@ const VisitList = () => {
14 14
     history.push(id ? `/medical/Test/edit?id=${id}` : '/medical/Test/edit');
15 15
   }, []);
16 16
 
17
-  const actions = [   
18
-    <Button key="button" icon={<PlusOutlined />} type="primary" onClick={() => handleMedicalClick()}>
19
-      新建
20
-    </Button>,
21
-  ];
17
+  // const actions = [   
18
+  //   <Button key="button" icon={<PlusOutlined />} type="primary" onClick={() => handleMedicalClick()}>
19
+  //     新建
20
+  //   </Button>,
21
+  // ];
22 22
   const columns = [
23 23
     {
24 24
       title: '就诊编号',
@@ -35,43 +35,43 @@ const VisitList = () => {
35 35
 
36 36
     {
37 37
       title: '学号',
38
-      dataIndex: 'd',
38
+      dataIndex: 'studentNo',
39 39
       align: 'center',
40 40
      
41 41
     },
42 42
     {
43 43
       title: '姓名',
44
-      dataIndex: 'status',
44
+      dataIndex: 'name',
45 45
       align: 'center',
46 46
       hideInSearch: true,
47 47
       // hideInTable: true,
48 48
     },
49 49
     {
50 50
       title: '性别',
51
-      dataIndex: 'status',
51
+      dataIndex: 'sex',
52 52
       align: 'center',
53 53
       hideInSearch: true,
54 54
     },
55 55
     {
56 56
       title: '专业',
57
-      dataIndex: 'status',
57
+      dataIndex: 'specialtyName',
58 58
       align: 'center',
59 59
       // hideInTable: true,
60 60
     },
61 61
     {
62 62
       title: '医生',
63
-      dataIndex: 'createDate',
63
+      dataIndex: 'doctorName',
64 64
       align: 'center',
65 65
       hideInSearch: true,
66 66
       valueType: 'date',
67 67
     },
68
-    {
69
-      title: '就诊科室',
70
-      dataIndex: 'createDate',
71
-      align: 'center',
72
-      hideInSearch: true,
68
+    // {
69
+    //   title: '就诊科室',
70
+    //   dataIndex: 'createDate',
71
+    //   align: 'center',
72
+    //   hideInSearch: true,
73 73
 
74
-    },
74
+    // },
75 75
     {
76 76
       title: '创建时间',
77 77
       dataIndex: 'createDate',
@@ -105,7 +105,7 @@ const VisitList = () => {
105 105
         search={{
106 106
           labelWidth: '4em',
107 107
         }}
108
-        toolBarRender={() => actions}
108
+        // toolBarRender={() => actions}
109 109
       />
110 110
     </PageContainer>
111 111
   );

+ 29
- 8
src/pages/Medical/Visit/Edit/index.jsx Wyświetl plik

@@ -6,24 +6,28 @@ import Container from '@/components/Container';
6 6
 import { Input, Form, Button, notification } from 'antd';
7 7
 import ProForm, { ProFormText, ProFormTextArea, ProFormSelect } from '@ant-design/pro-form';
8 8
 import request from '@/utils/request';
9
+import School from '@/components/School';
9 10
 
10 11
 const { Search } = Input;
11 12
 const VisitEdit = (props) => {
12 13
   const { id, schoolId } = props.location.query;
13 14
 
14 15
   const [searchLoading, setSearchLoading] = useState(false);
15
-
16
+  const [school, setSchool] = useState();
16 17
   const [form] = Form.useForm();
17 18
 
19
+  // eslint-disable-next-line no-shadow
18 20
   const getData = (id) => {
19 21
     if (id) {
20
-      request(`/student-no/${id}`)
22
+      request(`/student-no/${id}`,{params:{schoolId:school}})
21 23
         .then((res) => {
22 24
           form.setFieldsValue(res);
23 25
           setSearchLoading(false);
24 26
         })
25 27
         .catch((e) => {
26 28
           setSearchLoading(false);
29
+          notification.error({ message: '未找到该学生' })
30
+          form.resetFields()
27 31
         });
28 32
     } else {
29 33
       // this.setState({ data: [] });
@@ -66,6 +70,20 @@ const VisitEdit = (props) => {
66 70
         notification.error({ message: e.message });
67 71
       });
68 72
   };
73
+
74
+  const handleSchoolChange = (value) => {
75
+    setSchool(value)
76
+    console.log(value)
77
+    // request('/medicalLog', { method: 'post', data: { schoolId, ...value } })
78
+    //   .then(() => {
79
+    //     notification.success({ message: '新建成功' });
80
+    //     history.go('-1');
81
+    //   })
82
+    //   .catch((e) => {
83
+    //     notification.error({ message: e.message });
84
+    //   });
85
+  };
86
+
69 87
   return (
70 88
     <PageContainer
71 89
       header={{
@@ -79,12 +97,15 @@ const VisitEdit = (props) => {
79 97
       <Container>
80 98
         <ProForm form={form} submitter={!id} onFinish={handleSubmit}>
81 99
           {!id && (
82
-            <Search
83
-              placeholder="请输入学号"
84
-              loading={searchLoading}
85
-              style={{ width: 200, marginBottom: '20px' }}
86
-              onSearch={onSearch}
87
-            />
100
+            <ProForm.Group layout="inline">
101
+              <School value={school} onChange={handleSchoolChange} style={{ width: 200, marginBottom: '20px' }} allowClear />
102
+              <Search
103
+                placeholder="请输入学号"
104
+                loading={searchLoading}
105
+                style={{ width: 200, marginBottom: '20px' }}
106
+                onSearch={onSearch}
107
+              />
108
+            </ProForm.Group>
88 109
           )}
89 110
           <ProForm.Group layout="inline" title="就诊信息">
90 111
             <ProFormText

+ 4
- 2
src/pages/Student/Student/Edit/index.jsx Wyświetl plik

@@ -45,7 +45,9 @@ const StudentEdit = (props) => {
45 45
 
46 46
             <Descriptions title="学生信息" style={{ marginBottom: 32 }}>
47 47
               <Descriptions.Item label="姓名">{data.name}</Descriptions.Item>
48
-              <Descriptions.Item label="性别">{data.sex === 1 ? '男':'女'}</Descriptions.Item>
48
+              <Descriptions.Item label="性别">
49
+                {data.sex === 1 ? '男' : (data.sex === 2  ?'女':'未知')}
50
+              </Descriptions.Item>
49 51
               <Descriptions.Item label="积分">{data.personData?.pointNum}</Descriptions.Item>
50 52
               <Descriptions.Item label="联系方式">{data.phone}</Descriptions.Item>
51 53
               <Descriptions.Item label="邮箱">{data.email}</Descriptions.Item>
@@ -57,7 +59,7 @@ const StudentEdit = (props) => {
57 59
             <Descriptions.Item label="学校">{data.schoolName}</Descriptions.Item>
58 60
             <Descriptions.Item label="专业">{data.specialtyName}</Descriptions.Item>
59 61
             <Descriptions.Item label="学界">{data.schoolBatch}</Descriptions.Item>
60
-            <Descriptions.Item label="学号">{data.studentId}</Descriptions.Item>
62
+            <Descriptions.Item label="学号">{data.studentNo}</Descriptions.Item>
61 63
           </Descriptions>
62 64
         </Card>
63 65
       </Container>

+ 3
- 3
src/pages/Student/Student/List/index.jsx Wyświetl plik

@@ -37,14 +37,14 @@ const StudentList = () => {
37 37
       title: '学校',
38 38
       dataIndex: 'schoolId',
39 39
       align: 'center',
40
-      render: (_, row) => row.schoolName,
40
+      render: (_, row) => row.schoolName||"-",
41 41
       renderFormItem: () => <School autoDefault={false} allowClear></School>,
42 42
     },
43 43
     {
44 44
       title: '专业',
45 45
       dataIndex: 'specialtyId',
46 46
       align: 'center',
47
-      render: (_, row) => row.specialtyName,
47
+      render: (_, row) => row.specialtyName||'-',
48 48
       renderFormItem: (item, config, form) => {
49 49
         const schoolId = form.getFieldValue('schoolId');
50 50
         return <Specialty schoolid={schoolId} disabled={!schoolId}></Specialty>;
@@ -52,7 +52,7 @@ const StudentList = () => {
52 52
     },
53 53
     {
54 54
       title: '学号',
55
-      dataIndex: 'studentId',
55
+      dataIndex: 'studentNo',
56 56
       align: 'center',
57 57
     },
58 58
     {