Ver código fonte

输入框文字修改

1178232204@qq.com 3 anos atrás
pai
commit
fbfa6bd1ba

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

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

+ 156 - 156
src/components/DiagManager/index.js

@@ -1,5 +1,5 @@
 import React, { useState, useEffect, useRef } from 'react';
-import { Form, Input, Button, Table, Select, Pagination, Space, Modal,  message, Row, Col, Upload } from 'antd';
+import { Form, Input, Button, Table, Select, Pagination, Space, Modal, message, Row, Col, Upload } from 'antd';
 import { PlusOutlined } from '@ant-design/icons';
 import AddDiag from './addDiag'
 import MatchDiag from './MatchDiag.js'
@@ -30,18 +30,18 @@ function DiagManager() {
   const [total, setTotal] = useState(0);
   const [current, setCurrent] = useState(1);//当前页
   const [uploadStatus, setUploadStatus] = useState(0);//导入状态,0初始,1成功,2格式错误,3导入数据错误
-  const [uploadTip,setUploadTip] = useState("");		//导入状态提示语
+  const [uploadTip, setUploadTip] = useState("");		//导入状态提示语
   const [saveParams, setSaveParams] = useState({});		//匹配诊断选中
   const [params, setParams] = useState({
     pages: 1,
-	current: 1,
+    current: 1,
     size: 15
   });
   const [form] = Form.useForm();
-  const tipMap={
-    0:'提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。',
-	2:"模板格式错误,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取",
-	3:'模板导入失败,失败原因已在Excel中标识并自动下载,请检查后重新导入',
+  const tipMap = {
+    0: '提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。',
+    2: "模板格式错误,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取",
+    3: '模板导入失败,失败原因已在Excel中标识并自动下载,请检查后重新导入',
   };
 
   let data = {
@@ -60,9 +60,9 @@ function DiagManager() {
       })
     }
     if (flag == 3) {
-		setFormData(Diagrow)
-		getDiseasePage()
-		}
+      setFormData(Diagrow)
+      getDiseasePage()
+    }
   }
   //表格数据
   function getDiseasePage(param) {
@@ -77,17 +77,17 @@ function DiagManager() {
 
   //删除
   function delDiseaseById() {
-    post(api.delDiseaseById,{ids:Diagid}).then((res) => {
-	  setMsvisible(false);
+    post(api.delDiseaseById, { ids: Diagid }).then((res) => {
+      setMsvisible(false);
       if (res.data.code === 200) {
         getDiseasePage();
-		setDiagid([])
+        setDiagid([])
         message.success("删除成功");
       } else {
         message.warning(res.data.msg || '操作失败');
       }
     }).catch(() => {
-	  setMsvisible(false);
+      setMsvisible(false);
       message.error("接口出错");
     });
   }
@@ -130,121 +130,121 @@ function DiagManager() {
   }
   //导入弹窗取消或关闭
   function handleCancel1() {
-      setvisible1(false);
-		setUploadStatus(0);
+    setvisible1(false);
+    setUploadStatus(0);
   }
   //打开匹配弹窗
-  function match(row){
+  function match(row) {
     setvisible2(true)
-	setFormData(row)
+    setFormData(row)
   }
   //导入弹窗取消或关闭
   function handleCancel2() {
-      setvisible2(false);
+    setvisible2(false);
   }
   const messageBox = () => {
-	if(!Diagid.length){
-	  message.warning("请先选择要删除的记录~",1);
-	  return;
-	}
+    if (!Diagid.length) {
+      message.warning("请先选择要删除的记录~", 1);
+      return;
+    }
     setMsvisible(true)
   }
-//删除 提示框取消或关闭
+  //删除 提示框取消或关闭
   function handleCancel() {
     setMsvisible(false);
   }
-  
+
   //新增修改 取消或关闭
   function cancel() {
-	if(revise){
-		setUnsaved(true)
-	}else{
-		setVisible(false)
-		setFormData(null)
-	}
+    if (revise) {
+      setUnsaved(true)
+    } else {
+      setVisible(false)
+      setFormData(null)
+    }
   }
-  
+
   function isChange(a) {
-  	setRevise(a)
+    setRevise(a)
   }
-  
+
   function addCancel() {
-	setRevise(false)
-	setVisible(false)
-	setUnsaved(false)
-	setFormData(null)
+    setRevise(false)
+    setVisible(false)
+    setUnsaved(false)
+    setFormData(null)
   }
-  
+
   function unsavedCancel() {
     setUnsaved(false)
   }
 
   //新增修改 保存
   function DiagChange() {
-	setRevise(false)
+    setRevise(false)
     setVisible(false)
-	getDiseasePage();
+    getDiseasePage();
   }
-  function saveMatching(){
-	post(api.matchingDisease, saveParams).then((res) => {
-	  setvisible2(false);
-	  if (res.data.code === 200) {
-		message.success("匹配成功");
-		getDiseasePage();
-	  }else{
-		message.warning(res.data.message||"匹配失败,请重试");
-	  }
-	}).catch((error)=>{
-	  message.warning(error.message||"接口出错,请重试",);
-	})
+  function saveMatching() {
+    post(api.matchingDisease, saveParams).then((res) => {
+      setvisible2(false);
+      if (res.data.code === 200) {
+        message.success("匹配成功");
+        getDiseasePage();
+      } else {
+        message.warning(res.data.message || "匹配失败,请重试");
+      }
+    }).catch((error) => {
+      message.warning(error.message || "接口出错,请重试",);
+    })
   }
   const rowSelection = {
     onChange: (selectedRowKeys, selectedRows) => {
       console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
-	  setDiagid(selectedRowKeys)
+      setDiagid(selectedRowKeys)
     }
   };
   //导入模板
   const props = {
     name: 'file',
-	accept:".xls",
-	showUploadList:false,
+    accept: ".xls",
+    showUploadList: false,
     action: api.importDisease,
     headers: {
       authorization: 'authorization-text',
     },
     onChange(info) {
-	  const {response,status} = info.file;
-    if(status === 'done'){
-	  if (response.code === 200) {
-		getDiseasePage();		//刷新列表
-		//setvisible1(false);			//关闭导入弹窗
-		//message.success(`${info.file.name} 导入成功`);
-		setUploadStatus(1);
-		setUploadTip(response.data);
-	  } else{
-		//message.error(`${info.file.name} 导入失败.`);
-		setUploadStatus(2);
-	  }
-	}else if(status === 'error'){
-	  setUploadStatus(3);
-	}
+      const { response, status } = info.file;
+      if (status === 'done') {
+        if (response.code === 200) {
+          getDiseasePage();		//刷新列表
+          //setvisible1(false);			//关闭导入弹窗
+          //message.success(`${info.file.name} 导入成功`);
+          setUploadStatus(1);
+          setUploadTip(response.data);
+        } else {
+          //message.error(`${info.file.name} 导入失败.`);
+          setUploadStatus(2);
+        }
+      } else if (status === 'error') {
+        setUploadStatus(3);
+      }
     },
   };
-  function matchChange(data){
-	setSaveParams(data);
+  function matchChange(data) {
+    setSaveParams(data);
   }
   const columns = [
-    { title: '序号', dataIndex: 'index',render: (text, record,index) => (current-1)*params.size+index+1},
-    { title: '医院诊断名称', dataIndex: 'name',},
-    { title: 'ICD-10编码', dataIndex: 'icd10',},
-    { title: '标准诊断名称', dataIndex: 'standard',},
-    { title: '是否匹配', dataIndex: 'isMapping',},
+    { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
+    { title: '医院诊断名称', dataIndex: 'name', },
+    { title: 'ICD-10编码', dataIndex: 'icd10', },
+    { title: '标准诊断名称', dataIndex: 'standard', },
+    { title: '是否匹配', dataIndex: 'isMapping', },
     {
       title: '操作', dataIndex: 'key', render: (text, record) => (
         <Space size="middle">
           <a onClick={e => showModal('修改字典', true, 3, record)}>修改</a>
-		  <a onClick={e => match(record)}>匹配</a>
+          <a onClick={e => match(record)}>匹配</a>
         </Space>
       )
     }
@@ -256,36 +256,36 @@ function DiagManager() {
           form={form}
           name="normal_login"
           onFinish={onFinish}
-          initialValues={{ status: '' }}
+          initialValues={{ isMapping: '' }}
         >
           <Row gutter={24}>
-		  <Col span={5} key={0}>
-		    <Form.Item label="医院诊断名称" name="name">
-		      <Input placeholder="医院诊断名称" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
-		  <Col span={5} key={1}>
-		    <Form.Item label="ICD-10编码" name="icd10">
-		      <Input placeholder="ICD-10编码" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
-		  <Col span={5} key={2}>
-		    <Form.Item label="标准诊断名称" name="standard">
-		      <Input placeholder="标准诊断名称" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
+            <Col span={5} key={0}>
+              <Form.Item label="医院诊断名称" name="name">
+                <Input placeholder="医院诊断名称" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={1}>
+              <Form.Item label="ICD-10编码" name="icd10">
+                <Input placeholder="ICD-10编码" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={2}>
+              <Form.Item label="标准诊断名称" name="standard">
+                <Input placeholder="标准诊断名称" autoComplete='off' />
+              </Form.Item>
+            </Col>
             <Col span={4} key={3}>
               <Form.Item id="groupTypeval" label="是否匹配" name="isMapping">
                 <Select
                   showSearch
-                      optionFilterProp="children"
-					  // onSearch={onSearch}
-					  // onFocus={onFocus}
-					  placeholder="全部"
+                  optionFilterProp="children"
+                  // onSearch={onSearch}
+                  // onFocus={onFocus}
+                  placeholder="全部"
                 >
-				  	<Option value={-1} key={-1}>全部</Option>
-                    <Option value={0} key={0}>未匹配</Option>
-					<Option value={1} key={1}>已匹配</Option>
+                  <Option value={''} key={-1}>全部</Option>
+                  <Option value={0} key={0}>未匹配</Option>
+                  <Option value={1} key={1}>已匹配</Option>
                 </Select>
               </Form.Item>
             </Col>
@@ -306,21 +306,21 @@ function DiagManager() {
       <div className="table">
         <div className="table-header">
           <h2 className="table-title">诊断信息维护</h2>
-		  <Row gutter={12}>
-		    <Col key={0}>
+          <Row gutter={12}>
+            <Col key={0}>
               <Button type="primary" icon={<PlusOutlined />} onClick={e => showModal('新增', true, 1)}>新增</Button>
-		    </Col>
-			<Col key={1}>
-		      <Button  onClick={e => messageBox()} className="delete" >删除</Button>
-		    </Col>
-			<Col key={2}>
-			  <Button type="primary"  onClick={e => ImportBox()}>导入</Button>
-			</Col>
-		  </Row>
+            </Col>
+            <Col key={1}>
+              <Button onClick={e => messageBox()} className="delete" >删除</Button>
+            </Col>
+            <Col key={2}>
+              <Button type="primary" onClick={e => ImportBox()}>导入</Button>
+            </Col>
+          </Row>
         </div>
 
         <Table
-		  rowSelection={{type: 'checkbox',...rowSelection,}}
+          rowSelection={{ type: 'checkbox', ...rowSelection, }}
           columns={columns}
           scroll={{ y: 'calc(100vh - 320px)' }}
           dataSource={DiagList}
@@ -348,25 +348,25 @@ function DiagManager() {
           footer={null}
           forceRender={true}
         >
-          <DiagContext.Provider value={{type, formData}}>
-            <AddDiag DiagChange={DiagChange} cancel={cancel} isChange={isChange}/>
+          <DiagContext.Provider value={{ type, formData }}>
+            <AddDiag DiagChange={DiagChange} cancel={cancel} isChange={isChange} />
           </DiagContext.Provider>
-				<Modal
-				maskClosable={false}
-				title="提示"
-				okText='确定'
-				cancelText='关闭'
-				width={400}
-				visible={unsaved}
-				onOk={addCancel}
-				onCancel={unsavedCancel}
-				 >
-				<p>当前数据未保存 是否确认关闭?</p>
-				</Modal>
+          <Modal
+            maskClosable={false}
+            title="提示"
+            okText='确定'
+            cancelText='关闭'
+            width={400}
+            visible={unsaved}
+            onOk={addCancel}
+            onCancel={unsavedCancel}
+          >
+            <p>当前数据未保存 是否确认关闭?</p>
+          </Modal>
         </Modal>
         : ''}
       <Modal
-		maskClosable={false}
+        maskClosable={false}
         title="提示"
         okText='确定'
         cancelText='关闭'
@@ -377,34 +377,34 @@ function DiagManager() {
       >
         <p>诊断信息删除后将无法恢复,确认删除这{Diagid.length}条信息。</p>
       </Modal>
-	  <Modal
-		maskClosable={false}
-		destroyOnClose={true}
-	    title="提示"
-	    width={400}
-	    visible={visible1}
-	    onCancel={handleCancel1}
-		footer={<Button key="back" onClick={handleCancel1}>关闭</Button>}
-	  >
-	    <div style={{marginBottom: 10 + 'px'}}>
-			<span>诊断信息导入:</span>
-		  <Upload {...props}><Button type="primary" >导入目录</Button></Upload>
-		</div>
-		{uploadStatus===1?(<span style={{color: '#00AF71'}}>{uploadTip}</span>):(<span style={{color: '#E3505B'}}>{tipMap[uploadStatus]}</span>)}
-	  </Modal>
-	  <Modal
-		maskClosable={false}
-		destroyOnClose={true}
-	    title="提示"
-	    okText='保存'
-		cancelText='关闭'
-	    width={800}
-	    visible={visible2}
-	    onCancel={handleCancel2}
-		onOk={saveMatching}
-	  >
-	    <MatchDiag row={formData} onChange={matchChange}></MatchDiag>
-	  </Modal>
+      <Modal
+        maskClosable={false}
+        destroyOnClose={true}
+        title="提示"
+        width={400}
+        visible={visible1}
+        onCancel={handleCancel1}
+        footer={<Button key="back" onClick={handleCancel1}>关闭</Button>}
+      >
+        <div style={{ marginBottom: 10 + 'px' }}>
+          <span>诊断信息导入:</span>
+          <Upload {...props}><Button type="primary" >导入目录</Button></Upload>
+        </div>
+        {uploadStatus === 1 ? (<span style={{ color: '#00AF71' }}>{uploadTip}</span>) : (<span style={{ color: '#E3505B' }}>{tipMap[uploadStatus]}</span>)}
+      </Modal>
+      <Modal
+        maskClosable={false}
+        destroyOnClose={true}
+        title="提示"
+        okText='保存'
+        cancelText='关闭'
+        width={800}
+        visible={visible2}
+        onCancel={handleCancel2}
+        onOk={saveMatching}
+      >
+        <MatchDiag row={formData} onChange={matchChange}></MatchDiag>
+      </Modal>
     </div>
   )
 }

+ 5 - 5
src/components/DocTemplate/index.js

@@ -116,25 +116,25 @@ function DocTemplate() {
 			<Row gutter={24}>
 			  <Col span={5} key={0}>
 				<Form.Item label="医院模板ID" name="code">
-				  <Input placeholder="请输入" autoComplete='off'/>
+				  <Input placeholder="医院模板ID" autoComplete='off'/>
 				</Form.Item>
 			  </Col>
 			  <Col span={5} key={1}>
 				<Form.Item label="医院模板名称" name="name">
-				  <Input placeholder="请输入" autoComplete='off'/>
+				  <Input placeholder="医院模板名称" autoComplete='off'/>
 				</Form.Item>
 			  </Col>
 			  <Col span={5} key={2}>
 				<Form.Item label="医院父类模板ID" name="parentCode">
-				  <Input placeholder="请输入" autoComplete='off'/>
+				  <Input placeholder="医院父类模板ID" autoComplete='off'/>
 				</Form.Item>
 			  </Col>
 			  <Col span={5} key={4}>
 				<Form.Item label="医院父类模板名称" name="parentName">
-				  <Input placeholder="请输入" autoComplete='off'/>
+				  <Input placeholder="医院父类模板名称" autoComplete='off'/>
 				</Form.Item>
 			  </Col>
-			  <Col span={6} key={5}>
+			  <Col span={4} key={5}>
 				<Form.Item>
 				  <Button type="primary" htmlType="submit">
 					查询

+ 162 - 162
src/components/DrugManager/index.js

@@ -1,5 +1,5 @@
 import React, { useState, useEffect } from 'react';
-import { Form, Input, Button, Table, Select, Space, Modal,  message, Row, Col, Upload } from 'antd';
+import { Form, Input, Button, Table, Select, Space, Modal, message, Row, Col, Upload } from 'antd';
 import { PlusOutlined } from '@ant-design/icons';
 import AddDrug from './addDrug'
 import MatchDrug from './MatchDrug.js'
@@ -29,18 +29,18 @@ function DrugManager() {
   const [total, setTotal] = useState(0);
   const [current, setCurrent] = useState(1);//当前页
   const [uploadStatus, setUploadStatus] = useState(0);//导入状态,0初始,1成功,2格式错误,3导入数据错误
-  const [uploadTip,setUploadTip] = useState("");		//导入状态提示语
+  const [uploadTip, setUploadTip] = useState("");		//导入状态提示语
   const [saveParams, setSaveParams] = useState({});		//匹配药品选中
   const [params, setParams] = useState({
     pages: 1,
-	current: 1,
+    current: 1,
     size: 15
   });
   const [form] = Form.useForm();
-  const tipMap={
-    0:'提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。',
-	2:"模板格式错误,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取",
-	3:'模板导入失败,失败原因已在Excel中标识并自动下载,请检查后重新导入',
+  const tipMap = {
+    0: '提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。',
+    2: "模板格式错误,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取",
+    3: '模板导入失败,失败原因已在Excel中标识并自动下载,请检查后重新导入',
   };
 
   let data = {
@@ -59,9 +59,9 @@ function DrugManager() {
       })
     }
     if (flag == 3) {
-		setFormData(Drugrow)
-		getDrugPage()
-		}
+      setFormData(Drugrow)
+      getDrugPage()
+    }
   }
   //表格数据
   function getDrugPage(param) {
@@ -76,17 +76,17 @@ function DrugManager() {
 
   //删除
   function delDrugById() {
-    post(api.delDrugById,{ids:Drugid}).then((res) => {
-	  setMsvisible(false);
+    post(api.delDrugById, { ids: Drugid }).then((res) => {
+      setMsvisible(false);
       if (res.data.code === 200) {
         getDrugPage();
-		setDrugid([])
+        setDrugid([])
         message.success("删除成功");
       } else {
         message.warning(res.data.msg || '操作失败');
       }
     }).catch(() => {
-	  setMsvisible(false);
+      setMsvisible(false);
       message.error("接口出错");
     });
   }
@@ -129,122 +129,122 @@ function DrugManager() {
   }
   //导入弹窗取消或关闭
   function handleCancel1() {
-      setvisible1(false);
-		setUploadStatus(0);
+    setvisible1(false);
+    setUploadStatus(0);
   }
   //打开匹配弹窗
-  function match(row){
+  function match(row) {
     setvisible2(true)
-	setFormData(row)
+    setFormData(row)
   }
   //导入弹窗取消或关闭
   function handleCancel2() {
-      setvisible2(false);
+    setvisible2(false);
   }
   const messageBox = () => {
-	if(!Drugid.length){
-	  message.warning("请先选择要删除的记录~",1);
-	  return;
-	}
+    if (!Drugid.length) {
+      message.warning("请先选择要删除的记录~", 1);
+      return;
+    }
     setMsvisible(true)
   }
-//删除 提示框取消或关闭
+  //删除 提示框取消或关闭
   function handleCancel() {
     setMsvisible(false);
   }
-  
+
   //新增修改 取消或关闭
   function cancel() {
-	if(revise){
-		setUnsaved(true)
-	}else{
-		setVisible(false)
-		setFormData(null)
-	}
+    if (revise) {
+      setUnsaved(true)
+    } else {
+      setVisible(false)
+      setFormData(null)
+    }
   }
-  
+
   function isChange(a) {
-  	setRevise(a)
+    setRevise(a)
   }
-  
+
   function addCancel() {
-	setRevise(false)
-	setVisible(false)
-	setUnsaved(false)
-	setFormData(null)
+    setRevise(false)
+    setVisible(false)
+    setUnsaved(false)
+    setFormData(null)
   }
-  
+
   function unsavedCancel() {
     setUnsaved(false)
   }
 
   //新增修改 保存
   function DrugChange() {
-	setRevise(false)
+    setRevise(false)
     setVisible(false)
-	getDrugPage();
+    getDrugPage();
   }
-  function saveMatching(){
-	post(api.matchingDrug, saveParams).then((res) => {
-	  setvisible2(false);
-	  if (res.data.code === 200) {
-		message.success("匹配成功");
-		getDrugPage();
-	  }else{
-		message.warning(res.data.message||"匹配失败,请重试");
-	  }
-	}).catch((error)=>{
-	  message.warning(error.message||"接口出错,请重试",);
-	})
+  function saveMatching() {
+    post(api.matchingDrug, saveParams).then((res) => {
+      setvisible2(false);
+      if (res.data.code === 200) {
+        message.success("匹配成功");
+        getDrugPage();
+      } else {
+        message.warning(res.data.message || "匹配失败,请重试");
+      }
+    }).catch((error) => {
+      message.warning(error.message || "接口出错,请重试",);
+    })
   }
   const rowSelection = {
     onChange: (selectedRowKeys, selectedRows) => {
       console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
-	  setDrugid(selectedRowKeys)
+      setDrugid(selectedRowKeys)
     }
   };
   //导入模板
   const props = {
     name: 'file',
-	accept:".xls",
-	showUploadList:false,
+    accept: ".xls",
+    showUploadList: false,
     action: api.importDrug,
     headers: {
       authorization: 'authorization-text',
     },
     onChange(info) {
-	  const {response,status} = info.file;
-    if(status === 'done'){
-	  if (response.code === 200) {
-		getDrugPage();		//刷新列表
-		//setvisible1(false);			//关闭导入弹窗
-		//message.success(`${info.file.name} 导入成功`);
-		setUploadStatus(1);
-		setUploadTip(response.data);
-	  } else{
-		//message.error(`${info.file.name} 导入失败.`);
-		setUploadStatus(2);
-	  }
-	}else if(status === 'error'){
-	  setUploadStatus(3);
-	}
+      const { response, status } = info.file;
+      if (status === 'done') {
+        if (response.code === 200) {
+          getDrugPage();		//刷新列表
+          //setvisible1(false);			//关闭导入弹窗
+          //message.success(`${info.file.name} 导入成功`);
+          setUploadStatus(1);
+          setUploadTip(response.data);
+        } else {
+          //message.error(`${info.file.name} 导入失败.`);
+          setUploadStatus(2);
+        }
+      } else if (status === 'error') {
+        setUploadStatus(3);
+      }
     },
   };
-  function matchChange(data){
-	setSaveParams(data);
+  function matchChange(data) {
+    setSaveParams(data);
   }
   const columns = [
-    { title: '序号', dataIndex: 'index',render: (text, record,index) => (current-1)*params.size+index+1},
-    { title: '医院药品名称', dataIndex: 'name',},
-	{ title: '国药准字', dataIndex: 'approvalNum',},
-    { title: '药品剂型', dataIndex: 'dosageForm',},
-    { title: '标准药品名称', dataIndex: 'standard',},
-    { title: '是否匹配', dataIndex: 'isMapping',},
+    { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
+    { title: '医院药品名称', dataIndex: 'name', },
+    { title: '国药准字', dataIndex: 'approvalNum', },
+    { title: '药品剂型', dataIndex: 'dosageForm', },
+    { title: '标准药品名称', dataIndex: 'standard', },
+    { title: '是否匹配', dataIndex: 'isMapping', },
     {
       title: '操作', dataIndex: 'key', render: (text, record) => (
         <Space size="middle">
           <a onClick={e => showModal('修改字典', true, 3, record)}>修改</a>
-		  <a onClick={e => match(record)}>匹配</a>
+          <a onClick={e => match(record)}>匹配</a>
         </Space>
       )
     }
@@ -256,41 +256,41 @@ function DrugManager() {
           form={form}
           name="normal_login"
           onFinish={onFinish}
-          initialValues={{ status: '' }}
+          initialValues={{ isMapping: '' }}
         >
           <Row gutter={24}>
-		  <Col span={5} key={0}>
-		    <Form.Item label="医院药品名称" name="name">
-		      <Input placeholder="请输入" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
-			<Col span={5} key={1}>
-			  <Form.Item label="国药准字" name="approvalNum">
-				<Input placeholder="请输入" autoComplete='off'/>
-			  </Form.Item>
-			</Col>
-		  <Col span={5} key={2}>
-		    <Form.Item label="药品剂型" name="dosageForm">
-		      <Input placeholder="请选择" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
-		  <Col span={5} key={3}>
-		    <Form.Item label="标准药品名称" name="standard">
-		      <Input placeholder="标准药品名称" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
+            <Col span={5} key={0}>
+              <Form.Item label="医院药品名称" name="name">
+                <Input placeholder="医院药品名称" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={1}>
+              <Form.Item label="国药准字" name="approvalNum">
+                <Input placeholder="国药准字" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={2}>
+              <Form.Item label="药品剂型" name="dosageForm">
+                <Input placeholder="请选择" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={3}>
+              <Form.Item label="标准药品名称" name="standard">
+                <Input placeholder="标准药品名称" autoComplete='off' />
+              </Form.Item>
+            </Col>
             <Col span={4} key={4}>
               <Form.Item id="groupTypeval" label="是否匹配" name="isMapping">
                 <Select
                   showSearch
-                      optionFilterProp="children"
-					  // onSearch={onSearch}
-					  // onFocus={onFocus}
-					  placeholder="全部"
+                  optionFilterProp="children"
+                  // onSearch={onSearch}
+                  // onFocus={onFocus}
+                  placeholder="全部"
                 >
-				  	<Option value={-1} key={-1}>全部</Option>
-                    <Option value={0} key={0}>未匹配</Option>
-					<Option value={1} key={1}>已匹配</Option>
+                  <Option value={''} key={-1}>全部</Option>
+                  <Option value={0} key={0}>未匹配</Option>
+                  <Option value={1} key={1}>已匹配</Option>
                 </Select>
               </Form.Item>
             </Col>
@@ -311,21 +311,21 @@ function DrugManager() {
       <div className="table">
         <div className="table-header">
           <h2 className="table-title">药品信息维护</h2>
-		  <Row gutter={12}>
-		    <Col key={0}>
+          <Row gutter={12}>
+            <Col key={0}>
               <Button type="primary" icon={<PlusOutlined />} onClick={e => showModal('新增', true, 1)}>新增</Button>
-		    </Col>
-			<Col key={1}>
-		      <Button  onClick={e => messageBox()} className="delete" >删除</Button>
-		    </Col>
-			<Col key={2}>
-			  <Button type="primary"  onClick={e => ImportBox()}>导入</Button>
-			</Col>
-		  </Row>
+            </Col>
+            <Col key={1}>
+              <Button onClick={e => messageBox()} className="delete" >删除</Button>
+            </Col>
+            <Col key={2}>
+              <Button type="primary" onClick={e => ImportBox()}>导入</Button>
+            </Col>
+          </Row>
         </div>
 
         <Table
-		  rowSelection={{type: 'checkbox',...rowSelection,}}
+          rowSelection={{ type: 'checkbox', ...rowSelection, }}
           columns={columns}
           scroll={{ y: 'calc(100vh - 400px)' }}
           dataSource={DrugList}
@@ -353,25 +353,25 @@ function DrugManager() {
           footer={null}
           forceRender={true}
         >
-          <DrugContext.Provider value={{type, formData}}>
-            <AddDrug DrugChange={DrugChange} cancel={cancel} isChange={isChange}/>
+          <DrugContext.Provider value={{ type, formData }}>
+            <AddDrug DrugChange={DrugChange} cancel={cancel} isChange={isChange} />
           </DrugContext.Provider>
-				<Modal
-				maskClosable={false}
-				title="提示"
-				okText='确定'
-				cancelText='关闭'
-				width={400}
-				visible={unsaved}
-				onOk={addCancel}
-				onCancel={unsavedCancel}
-				 >
-				<p>当前数据未保存 是否确认关闭?</p>
-				</Modal>
+          <Modal
+            maskClosable={false}
+            title="提示"
+            okText='确定'
+            cancelText='关闭'
+            width={400}
+            visible={unsaved}
+            onOk={addCancel}
+            onCancel={unsavedCancel}
+          >
+            <p>当前数据未保存 是否确认关闭?</p>
+          </Modal>
         </Modal>
         : ''}
       <Modal
-		maskClosable={false}
+        maskClosable={false}
         title="提示"
         okText='确定'
         cancelText='关闭'
@@ -382,34 +382,34 @@ function DrugManager() {
       >
         <p>药品信息删除后将无法恢复,确认删除这{Drugid.length}条信息。</p>
       </Modal>
-	  <Modal
-		maskClosable={false}
-		destroyOnClose={true}
-	    title="提示"
-	    width={400}
-	    visible={visible1}
-	    onCancel={handleCancel1}
-		footer={<Button key="back" onClick={handleCancel1}>关闭</Button>}
-	  >
-	    <div style={{marginBottom: 10 + 'px'}}>
-			<span>药品信息导入:</span>
-		  <Upload {...props}><Button type="primary" >导入目录</Button></Upload>
-		</div>
-		{uploadStatus===1?(<span style={{color: '#00AF71'}}>{uploadTip}</span>):(<span style={{color: '#E3505B'}}>{tipMap[uploadStatus]}</span>)}
-	  </Modal>
-	  <Modal
-		maskClosable={false}
-		destroyOnClose={true}
-	    title="提示"
-	    okText='保存'
-		cancelText='关闭'
-	    width={800}
-	    visible={visible2}
-	    onCancel={handleCancel2}
-		onOk={saveMatching}
-	  >
-	    <MatchDrug row={formData} onChange={matchChange}></MatchDrug>
-	  </Modal>
+      <Modal
+        maskClosable={false}
+        destroyOnClose={true}
+        title="提示"
+        width={400}
+        visible={visible1}
+        onCancel={handleCancel1}
+        footer={<Button key="back" onClick={handleCancel1}>关闭</Button>}
+      >
+        <div style={{ marginBottom: 10 + 'px' }}>
+          <span>药品信息导入:</span>
+          <Upload {...props}><Button type="primary" >导入目录</Button></Upload>
+        </div>
+        {uploadStatus === 1 ? (<span style={{ color: '#00AF71' }}>{uploadTip}</span>) : (<span style={{ color: '#E3505B' }}>{tipMap[uploadStatus]}</span>)}
+      </Modal>
+      <Modal
+        maskClosable={false}
+        destroyOnClose={true}
+        title="提示"
+        okText='保存'
+        cancelText='关闭'
+        width={800}
+        visible={visible2}
+        onCancel={handleCancel2}
+        onOk={saveMatching}
+      >
+        <MatchDrug row={formData} onChange={matchChange}></MatchDrug>
+      </Modal>
     </div>
   )
 }

+ 5 - 4
src/components/DutyRecord/index.js

@@ -129,26 +129,27 @@ function DutyRecord() {
 					form={form}
 					name="normal_login"
 					onFinish={onFinish}
+					initialValues={{ type: '0' }}
 				>
 					<Row gutter={24}>
 						<Col span={5} key={0}>
 							<Form.Item label="医生姓名" name="doctorName">
-								<Input placeholder="请输入" autoComplete='off' />
+								<Input placeholder="医生姓名" autoComplete='off' />
 							</Form.Item>
 						</Col>
 						<Col span={5} key={1}>
 							<Form.Item label="科室" name="deptName">
-								<Input placeholder="请输入" autoComplete='off' />
+								<Input placeholder="科室" autoComplete='off' />
 							</Form.Item>
 						</Col>
 						<Col span={5} key={2}>
 							<Form.Item label="工号" name="doctorCode">
-								<Input placeholder="请输入" autoComplete='off' />
+								<Input placeholder="工号" autoComplete='off' />
 							</Form.Item>
 						</Col>
 						<Col span={5} key={3}>
 							<Form.Item label="职务/职称名称" name="name">
-								<Input placeholder="请输入" autoComplete='off' />
+								<Input placeholder="职务/职称名称" autoComplete='off' />
 							</Form.Item>
 						</Col>
 						<Col span={5} key={4}>

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

@@ -158,22 +158,22 @@ function FieldProblem() {
                         </Col>
                         <Col span={5} key={1}>
                             <Form.Item label="住院序号" name="behospitalCode">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="住院序号" autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={2}>
                             <Form.Item label="文书编号" name="recId">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="文书编号" autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={3}>
                             <Form.Item label="文书标题" name="recTitle">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="文书标题" autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={4}>
                             <Form.Item label="质控模块名称" name="modeName">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="质控模块名称" autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={5}>

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

@@ -251,7 +251,7 @@ function FieldRules() {
                     form={form}
                     name="normal_login"
                     onFinish={onFinish}
-                    initialValues={{ lossType: '', lossWay: '', isRequired: '', regularName: '' }}
+                    initialValues={{ lossType: '', lossWay: '', isRequired: ''}}
                 >
                     <Row gutter={24}>
                         <Col span={6} key={0}>
@@ -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' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={6}>

+ 61 - 61
src/components/MyMessage/index.js

@@ -4,7 +4,7 @@ import { Table, Modal, message, Menu, Breadcrumb, Dropdown, Space, Form, Input,
 import { DownOutlined, PlusOutlined } from '@ant-design/icons';
 import './index.less';
 import apiObj from '@api/index';
-import { setUnReadNum} from '@reducers/userInfo.js';
+import { setUnReadNum } from '@reducers/userInfo.js';
 const { post, api, xPost } = apiObj;
 const { Option } = Select;
 function MyMessage() {
@@ -18,9 +18,9 @@ function MyMessage() {
     const [size, setSize] = useState(15);       //每页显示条数
     const [current, setCurrent] = useState(1);//当前页
     const [params, setParams] = useState({
-      pages: 1,
-      current: 1,
-      size: 15
+        pages: 1,
+        current: 1,
+        size: 15
     });
     const [total, setTotal] = useState(0);       //每页显示条数
     const [dataSource, setDataSource] = useState([]);   //列表数据
@@ -54,11 +54,11 @@ function MyMessage() {
         setVisible(false);
     }
     //获取未读消息数量
-    function getNotNoticeCount(){
+    function getNotNoticeCount() {
         xPost(api.getNotNoticeCount).then((res) => {
             if (res.data.code === 200) {
                 let count = res.data.data.count;
-                count = count>99?'99+':count;
+                count = count > 99 ? '99+' : count;
                 dispatch(setUnReadNum(count));
             } else {
                 //message.warning(res.data.msg || '请求失败');
@@ -78,74 +78,74 @@ function MyMessage() {
                 setMsgDetail(data);
                 //更新未读消息数量
                 getNotNoticeCount();
-			    getTableData(params);//刷新列表
+                getTableData(params);//刷新列表
             } else {
                 message.warning(res.data.message || '获取详情失败')
             }
         });
     }
     //每页显示条数切换
-    function onSizeChange(current, pageSize){
-	  params.current = current
-	  params.size = pageSize
-	  setSize(pageSize)
-	  setCurrent(current)
-	  setParams(params)
-	  getTableData(params)
+    function onSizeChange(current, pageSize) {
+        params.current = current
+        params.size = pageSize
+        setSize(pageSize)
+        setCurrent(current)
+        setParams(params)
+        getTableData(params)
     }
     //翻页
-    function onPageChange(page, pageSize){
-	  params.current = page
-	  params.size = pageSize
-	  setCurrent(page)
-	  setParams(params)
-	  getTableData(params)
+    function onPageChange(page, pageSize) {
+        params.current = page
+        params.size = pageSize
+        setCurrent(page)
+        setParams(params)
+        getTableData(params)
     }
     //表格渲染
     function RenderTable() {
-            const columns = [
-                { title: '标题', dataIndex: 'title', key: 'title' },
-                {
-                    title: '类型', width: 150, dataIndex: 'typeName', key:'typeName'
-                },
-                { title: '发送者', dataIndex: 'sender', key: 'sender' },
-                { title: '发送时间', width: 240, dataIndex: 'gmtCreate', key: 'gmtCreate' },
-                {
-                    title: '阅读状态', key: 'statusName', dataIndex:'statusName'
-                },
-                {
-                    title: '操作', key: 'operation', render: (row) => {
-                        return (<Space size="middle">
-                            <a onClick={() => showMessage(row.id)}>查看</a>
-                        </Space>)
-                    }
-                },
-            ];
-            return (
-                <Table
-                    rowKey={record => record.id}
-                    scroll={{ y: 'calc(100vh - 360px)' }}
-                    columns={columns}
-                    dataSource={dataSource}
-                    pagination={{
-                        showSizeChanger:true,
-                        pageSizeOptions:[15,30,60,120],
-                        defaultPageSize:size,
-                        pageNo: 1,
-					    current:current,
-                        size:'small',
-                        total: total,
-                        showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条数据`,
-                        onShowSizeChange: (current, pageSize) => onSizeChange(current, pageSize), // 改变每页数量时更新显示
-					    onChange: (page, pageSize) => onPageChange(page, pageSize),//点击页码事件
-                    }}
-                />
-            )
+        const columns = [
+            { title: '标题', dataIndex: 'title', key: 'title' },
+            {
+                title: '类型', width: 150, dataIndex: 'typeName', key: 'typeName'
+            },
+            { title: '发送者', dataIndex: 'sender', key: 'sender' },
+            { title: '发送时间', width: 240, dataIndex: 'gmtCreate', key: 'gmtCreate' },
+            {
+                title: '阅读状态', key: 'statusName', dataIndex: 'statusName'
+            },
+            {
+                title: '操作', key: 'operation', render: (row) => {
+                    return (<Space size="middle">
+                        <a onClick={() => showMessage(row.id)}>查看</a>
+                    </Space>)
+                }
+            },
+        ];
+        return (
+            <Table
+                rowKey={record => record.id}
+                scroll={{ y: 'calc(100vh - 360px)' }}
+                columns={columns}
+                dataSource={dataSource}
+                pagination={{
+                    showSizeChanger: true,
+                    pageSizeOptions: [15, 30, 60, 120],
+                    defaultPageSize: size,
+                    pageNo: 1,
+                    current: current,
+                    size: 'small',
+                    total: total,
+                    showTotal: (total, range) => `第${range[0]}-${range[1]} 条/共 ${total} 条数据`,
+                    onShowSizeChange: (current, pageSize) => onSizeChange(current, pageSize), // 改变每页数量时更新显示
+                    onChange: (page, pageSize) => onPageChange(page, pageSize),//点击页码事件
+                }}
+            />
+        )
 
     }
     //筛选项渲染
     const [form] = Form.useForm();
-    const initialValues = {status:toUnRead?'0':''};
+    const initialValues = { status: toUnRead ? '0' : '' };
     const onFinish = (values) => {
         getTableData(values);
         console.log('筛选项:', values);
@@ -210,11 +210,11 @@ function MyMessage() {
                 width={724}
                 visible={visible}
                 confirmLoading={confirmLoading}
-                onCancel={()=>setVisible(false)}
+                onCancel={() => setVisible(false)}
             >
                 <div className="message-box">
                     <p className='msg-title'>{msgDetail.title}</p>
-                    <div className="msg-content" dangerouslySetInnerHTML = {{__html:msgDetail.content}}></div>
+                    <div className="msg-content" dangerouslySetInnerHTML={{ __html: msgDetail.content }}></div>
                     <div className="msg-footer">
                         <span className="msg-type">类型:{msgDetail.typeName}</span>
                         <span className="msg-sender">发送者:{msgDetail.creatorName}</span>

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

@@ -102,7 +102,7 @@ function OperationLog() {
                 <Input placeholder="用户名" autoComplete='off' />
               </Form.Item>
             </Col>
-            <Col span={5} key={1}>
+            <Col span={7} key={1}>
               <Form.Item name="time" label="操作日期">
                 <RangePicker
                   disabledDate={disabledDate}

+ 7 - 7
src/components/OrgManager/index.js

@@ -6,7 +6,7 @@ import AddSubOrg from './AddSubOrg';
 import './index.less';
 import apiObj from '@api/index';
 import OrgContext from './org-context';
-import { pickCheckedTreeIds, getValueFromEvent,getCookie } from '@utils/index'
+import { pickCheckedTreeIds, getValueFromEvent, getCookie } from '@utils/index'
 
 const { post, api, xPost } = apiObj;
 const { Option } = Select;
@@ -204,22 +204,22 @@ function OrgManager() {
         if (orgType == 4) {
             param.type = 5
             param.addHospitalUserVO = {
-                username:'122',
-                password:'111'
+                username: '122',
+                password: '111'
             }
             param.softwares = [{
                 id: 1,
                 softwareMenuIds: ['1'],
                 softwareResourceIds: ['2'],
             }]
-        }else{
+        } else {
             formData.softwares = arr;
         }
         if (type == 2) {
             url = api.updateHospital
             param.id = operId
         }
-        
+
         post(url, param).then((res) => {
             if (res.data.code === 200) {
                 getTableData();
@@ -386,11 +386,11 @@ function OrgManager() {
     return (
         <div className='wrapper'>
             <div className="filter-box">
-                <Form form={form} name="control-hooks" onFinish={onFinish}>
+                <Form form={form} name="control-hooks" onFinish={onFinish} initialValues={{ type:'',status: '' }}>
                     <Row gutter={24}>
                         <Col span={5} key={0}>
                             <Form.Item name="hospitalName" label="组织名称" getValueFromEvent={getValueFromEvent}>
-                                <Input placeholder='组织名称' autoComplete="off"/>
+                                <Input placeholder='组织名称' autoComplete="off" />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={1}>

+ 23 - 7
src/components/RegularManage/addRegular.js

@@ -1,7 +1,7 @@
 import React, {
     useState, useEffect, useContext
 } from 'react';
-import { Form, Col, DatePicker, Button, Radio, TreeSelect, message, Space, Input } from 'antd';
+import { Form, Modal, Button, message, Space, Input } from 'antd';
 import apiObj from '@api/index';
 import RegularContext from './regular-context';
 const { post, api, xPost } = apiObj;
@@ -10,19 +10,24 @@ function EditBlock(props) {
     useEffect(() => {
     }, []);
     const [form] = Form.useForm();
-    const { regularDetail, type } = useContext(RegularContext);
+    const [delvisible, setDelVisible] = useState(false);
+    const { regularDetail, type, flag } = useContext(RegularContext);
     const initialValues = regularDetail;
     const onFinish = values => {
-        addRegular(values)
+        if (flag == 1) {
+            setDelVisible(true)
+        } else {
+            addRegular(values)
+        }
     };
     //添加
     function addRegular(params) {
         let url
-        if(type == 1){
+        if (type == 1) {
             url = api.addRegular
-        }else{
+        } else {
             url = api.upRegularById
-            params.id= regularDetail.id
+            params.id = regularDetail.id
         }
         post(url, params).then((res) => {
             if (res.data.code === 200) {
@@ -72,8 +77,19 @@ function EditBlock(props) {
                         </Button>
                     </Space>
                 </Form.Item>
-
             </Form>
+            <Modal
+                title="提示"
+                okText='确定'
+                cancelText='取消'
+                width={400}
+                visible={delvisible}
+                onOk={addRegular}
+                /*confirmLoading={confirmLoading}*/
+                onCancel={() => cancel()}
+            >
+                <p>该正则式关联字段校验规则,修改后将同步更新,确认修改?</p>
+            </Modal>
         </>
     );
 }

+ 5 - 4
src/components/RegularManage/index.js

@@ -18,6 +18,7 @@ function RegularManage() {
     const [total, setTotal] = useState(0);
     const [title, setTitle] = useState();
     const [tip, setTip] = useState();
+    const [flag, setFlag] = useState(0);
     const [type, setType] = useState(0);//1新增 2修改
     const [visible, setVisible] = useState(false);
     const [delvisible, setDelVisible] = useState(false);
@@ -106,10 +107,10 @@ function RegularManage() {
             arr.push(it.split('-')[1])
         });
         if (arr.indexOf('1') > 0) {
-            console.log(123);
+            setFlag(1)
             setTip('正则式关联字段校验规则,删除后将取消关联且无法恢复,确认删除这' + selectedRowKeys.length + '条正则式?')
         } else {
-            console.log(456);
+            setFlag(0)
             setTip('正则式删除后将无法恢复,确认删除这' + selectedRowKeys.length + '条正则式?')
         }
 
@@ -155,7 +156,7 @@ function RegularManage() {
                     <Row gutter={24}>
                         <Col span={5} key={0}>
                             <Form.Item label="正则式名称" name="name">
-                                <Input placeholder="请输入" autoComplete='off' />
+                                <Input placeholder="正则式名称" autoComplete='off' />
                             </Form.Item>
                         </Col>
 
@@ -213,7 +214,7 @@ function RegularManage() {
                     footer={null}
                     forceRender={true}
                 >
-                    <RegularContext.Provider value={{ regularDetail, type }}>
+                    <RegularContext.Provider value={{ regularDetail, type,flag }}>
                         <AddRegular userChange={userChange} cancel={cancel} />
                     </RegularContext.Provider>
 

+ 84 - 79
src/components/RoleManager/index.js

@@ -1,29 +1,29 @@
-import {useEffect,useState} from 'react';
+import { useEffect, useState } from 'react';
 import { useSelector } from 'react-redux'
 /*import { useDispatch,useSelector } from 'react-redux'*/
-import { Table,Modal, message,Space, Form, Input, Button, Row, Col, Select } from 'antd';
+import { Table, Modal, message, Space, Form, Input, Button, Row, Col, Select } from 'antd';
 import { PlusOutlined } from '@ant-design/icons';
 import AddRole from './AddRole';
 import './index.less';
 import apiObj from '@api/index';
 import RoleContext from './role-context';
 import { pickCheckedTreeIds, getValueFromEvent } from '@utils/index'
-const {post,api,xPost} = apiObj;
+const { post, api, xPost } = apiObj;
 
 const { Option } = Select;
-function RoleManager(){
+function RoleManager() {
     useEffect(() => {
         getTableData();
-    },[]);
+    }, []);
 
     const [dataSource, setDataSource] = useState([]);   //列表数据
     const [roleDetail, setRoleDetail] = useState(null);   //角色详情数据
-    const [visible,setVisible] = useState(false);   //删除禁用确认弹窗显示
-    const [addVisible,setAddVisible] = useState(false);         //新增页面显示
+    const [visible, setVisible] = useState(false);   //删除禁用确认弹窗显示
+    const [addVisible, setAddVisible] = useState(false);         //新增页面显示
     const [confirmLoading, setConfirmLoading] = useState(false);
     //弹窗类型:1删除 2有用户删除 3禁用 4有用户禁用
-    const [modalType,setModalType] = useState(1);
-    const [operId,setOperId] = useState('');    //当前操作的角色id
+    const [modalType, setModalType] = useState(1);
+    const [operId, setOperId] = useState('');    //当前操作的角色id
     const [total, setTotal] = useState(0);
     const [size, setSize] = useState(15);
     const [current, setCurrent] = useState(1);
@@ -33,15 +33,15 @@ function RoleManager(){
         size: 15
     });
     //从state中取出状态、类型列表
-    const staticInfo =useSelector(state => {
+    const staticInfo = useSelector(state => {
         return state.staticInfo;
     });
-    const {statusList} = staticInfo;
-    const tipText={
-        1:'确定要删除该角色?',
-        2:'当前角色存在用户,删除后用户将一并被删除',
-        3:'确定要禁用该角色?',
-        4:'当前角色存在用户,禁用后用户将一并被禁用',
+    const { statusList } = staticInfo;
+    const tipText = {
+        1: '确定要删除该角色?',
+        2: '当前角色存在用户,删除后用户将一并被删除',
+        3: '确定要禁用该角色?',
+        4: '当前角色存在用户,禁用后用户将一并被禁用',
     };
     let data = {
         pages: 1,
@@ -49,9 +49,9 @@ function RoleManager(){
         size: size
     }
     //获取表格数据
-    function getTableData(param){
-        post(api.getRolePage, param || params).then((res)=>{
-            if(res.data.code===200){
+    function getTableData(param) {
+        post(api.getRolePage, param || params).then((res) => {
+            if (res.data.code === 200) {
                 const data = res.data.data;
                 setDataSource(data.records);
                 setTotal(data.total)
@@ -60,71 +60,71 @@ function RoleManager(){
         })
     }
     //启用/禁用
-    function enable(flag,id) {
-        const param = {roleId:id||operId,status:flag};
-        xPost(api.disableRole,param).then((res)=>{
-            if(res.data.code===200){
+    function enable(flag, id) {
+        const param = { roleId: id || operId, status: flag };
+        xPost(api.disableRole, param).then((res) => {
+            if (res.data.code === 200) {
                 getTableData();
                 setVisible(false);
-                message.success((flag?'启用':'禁用')+"成功");
-            }else{
-                message.warning(res.data.message||'操作失败');
+                message.success((flag ? '启用' : '禁用') + "成功");
+            } else {
+                message.warning(res.data.message || '操作失败');
             }
-        }).catch(()=>{
+        }).catch(() => {
             message.error("接口出错");
         });
     }
     //删除
-    function onDelete(){
-        const param = {roleId:operId};
-        xPost(api.deleteRole,param).then((res)=>{
-            if(res.data.code===200){
+    function onDelete() {
+        const param = { roleId: operId };
+        xPost(api.deleteRole, param).then((res) => {
+            if (res.data.code === 200) {
                 getTableData();
                 setVisible(false);
                 message.success("删除成功");
-            }else{
-                message.warning(res.data.message||'操作失败');
+            } else {
+                message.warning(res.data.message || '操作失败');
             }
-        }).catch(()=>{
+        }).catch(() => {
             message.error("接口出错");
         });
     }
     //显示弹窗
-    function showModal(type,id){
+    function showModal(type, id) {
         setModalType(type);
         setOperId(id);
         setVisible(true);
     }
     //弹窗确认事件
-    function handleOk(){
-        if("1,2".indexOf(modalType)>-1){
+    function handleOk() {
+        if ("1,2".indexOf(modalType) > -1) {
             onDelete();
-        }else if("3,4".indexOf(modalType)>-1){
+        } else if ("3,4".indexOf(modalType) > -1) {
             enable(0);
         }
     }
     //弹窗取消
-    function handleCancel(){
+    function handleCancel() {
         setVisible(false);
         setAddVisible(false);
     }
     //新增角色弹窗
-    function showAddRole(){
+    function showAddRole() {
         setAddVisible(true);
     }
-    function getRoleDetail(id){
-        return xPost(api.getRoleById,{roleId:id});
+    function getRoleDetail(id) {
+        return xPost(api.getRoleById, { roleId: id });
     }
     //修改角色
-    async function editRole(id){
+    async function editRole(id) {
         const data = await getRoleDetail(id);
         const detail = data.data;
-        if(detail.code===200){
-            const content= detail.data;
+        if (detail.code === 200) {
+            const content = detail.data;
             const menuData = content.loginUserMenuResourceTree;
             const loginSoftwares = content.loginSoftwares;
-            let softwares=[],sids=[];
-            for(let i=0;i<menuData.length;i++){
+            let softwares = [], sids = [];
+            for (let i = 0; i < menuData.length; i++) {
                 const obj = pickCheckedTreeIds(menuData[i]);
                 softwares.push(obj);
             }
@@ -134,43 +134,43 @@ function RoleManager(){
                     sids.push(obj.id);
                 }
             }
-            const fData = Object.assign({},content,{sids,softwares});
+            const fData = Object.assign({}, content, { sids, softwares });
             setRoleDetail(fData);
         }
         setAddVisible(true);
     }
 
     //保存
-    function addRole(formData){
+    function addRole(formData) {
         let url = api.addRole;
-        const arr = formData.softwares.filter((it)=>{
-            if(Object.keys(it).length&&it.softwareMenuIds&&it.softwareMenuIds.length){
+        const arr = formData.softwares.filter((it) => {
+            if (Object.keys(it).length && it.softwareMenuIds && it.softwareMenuIds.length) {
                 return it;
             }
         });
-        if(roleDetail){     //修改角色
-            formData.id=roleDetail.id;
-            url=api.updateRole;
+        if (roleDetail) {     //修改角色
+            formData.id = roleDetail.id;
+            url = api.updateRole;
         }
-        formData.softwares=arr;
-        post(url,formData).then((res)=>{
-            if(res.data.code===200){
+        formData.softwares = arr;
+        post(url, formData).then((res) => {
+            if (res.data.code === 200) {
                 getTableData();
                 setAddVisible(false);
                 setRoleDetail(null)
                 message.success("添加成功");
-            }else{
-                message.warning(res.data.message||'操作失败');
+            } else {
+                message.warning(res.data.message || '操作失败');
             }
-        }).catch(()=>{
+        }).catch(() => {
             message.error("接口出错");
         });
     }
-    function goBack(){
+    function goBack() {
         setAddVisible(false);
         setRoleDetail(null)
         getTableData();
-    } 
+    }
     function onSizeChange(current, pageSize) {
         params.current = current
         params.size = pageSize
@@ -187,24 +187,29 @@ function RoleManager(){
         getTableData()
     }
     //表格渲染
-    function RenderTable(){
+    function RenderTable() {
         const columns = [
             { title: '角色名称', dataIndex: 'name', key: 'name' },
             { title: '角色描述', dataIndex: 'remark', key: 'remark' },
-            { title: '状态', key: 'statusName',render:(row) => {
-                    return (<span className={ (row.status==='1')?'Enable':'Disable' }>{row.statusName}</span>)
-                        }},
+            {
+                title: '状态', key: 'statusName', render: (row) => {
+                    return (<span className={(row.status === '1') ? 'Enable' : 'Disable'}>{row.statusName}</span>)
+                }
+            },
             /*{ title: '创建时间', dataIndex: 'gmtCreate', key: 'gmtCreate' },*/
-            { title: '操作', key: 'operation', render: (row,i) => {
+            {
+                title: '操作', key: 'operation', render: (row, i) => {
                     //console.log(21,row)
-                    if(row.rootFlag){
+                    if (row.rootFlag) {
                         return '-'
                     }
                     return (<Space size="middle">
-                        <a onClick={()=>editRole(row.id)}>修改</a>
-                        {row.status === '1' ? (<a className="disable" onClick={()=>showModal(row.hasUserFlag?4:3,row.id)}>禁用</a>):(<a onClick={()=>enable(1,row.id)}>启用</a>)}
-                        <a className="delete" onClick={()=>showModal(row.hasUserFlag?2:1,row.id)}>删除</a>
-                    </Space>) }},
+                        <a onClick={() => editRole(row.id)}>修改</a>
+                        {row.status === '1' ? (<a className="disable" onClick={() => showModal(row.hasUserFlag ? 4 : 3, row.id)}>禁用</a>) : (<a onClick={() => enable(1, row.id)}>启用</a>)}
+                        <a className="delete" onClick={() => showModal(row.hasUserFlag ? 2 : 1, row.id)}>删除</a>
+                    </Space>)
+                }
+            },
         ];
         return (
             <Table
@@ -244,21 +249,21 @@ function RoleManager(){
         form.resetFields();
         getTableData(data);
     };
-    if(addVisible){
+    if (addVisible) {
         return (
-            <RoleContext.Provider value={{save:addRole,detail:roleDetail}}>
-                <AddRole back={goBack}/>
+            <RoleContext.Provider value={{ save: addRole, detail: roleDetail }}>
+                <AddRole back={goBack} />
             </RoleContext.Provider>
         )
     }
     return (
         <div className='wrapper'>
             <div className="filter-box">
-                <Form form={form} name="control-hooks" onFinish={onFinish}>
+                <Form form={form} name="control-hooks" onFinish={onFinish} initialValues={{ status: '' }}>
                     <Row gutter={24}>
                         <Col span={5} key={0}>
                             <Form.Item name="name" label="角色名称" getValueFromEvent={getValueFromEvent}>
-                                <Input placeholder='角色名称' autoComplete='off'/>
+                                <Input placeholder='角色名称' autoComplete='off' />
                             </Form.Item>
                         </Col>
                         <Col span={5} key={2}>
@@ -266,7 +271,7 @@ function RoleManager(){
                                 <Select
                                     allowClear
                                 >
-                                    {statusList.map((item)=>{
+                                    {statusList.map((item) => {
                                         return (
                                             <Option value={item.name} key={item.name}>{item.val}</Option>
                                         )
@@ -290,7 +295,7 @@ function RoleManager(){
             <div className="table">
                 <div className="table-header">
                     <h2 className="table-title">组织管理</h2>
-                    <Button type="primary" icon={<PlusOutlined />} onClick={()=> showAddRole()}>新增角色</Button>
+                    <Button type="primary" icon={<PlusOutlined />} onClick={() => showAddRole()}>新增角色</Button>
                 </div>
                 <RenderTable />
             </div>

+ 155 - 155
src/components/SurgeryManager/index.js

@@ -1,5 +1,5 @@
 import React, { useState, useEffect } from 'react';
-import { Form, Input, Button, Table, Select, Pagination, Space, Modal,  message, Row, Col, Upload } from 'antd';
+import { Form, Input, Button, Table, Select, Pagination, Space, Modal, message, Row, Col, Upload } from 'antd';
 import { PlusOutlined } from '@ant-design/icons';
 import AddSurg from './addSurg'
 import MatchSurg from './MatchSurg.js'
@@ -29,18 +29,18 @@ function SurgManager() {
   const [total, setTotal] = useState(0);
   const [current, setCurrent] = useState(1);//当前页
   const [uploadStatus, setUploadStatus] = useState(0);//导入状态,0初始,1成功,2格式错误,3导入数据错误
-  const [uploadTip,setUploadTip] = useState("");		//导入状态提示语
+  const [uploadTip, setUploadTip] = useState("");		//导入状态提示语
   const [saveParams, setSaveParams] = useState({});		//匹配诊断选中
   const [params, setParams] = useState({
     pages: 1,
-	current: 1,
+    current: 1,
     size: 15
   });
   const [form] = Form.useForm();
-  const tipMap={
-    0:'提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。',
-	2:"模板格式错误,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取",
-	3:'模板导入失败,失败原因已在Excel中标识并自动下载,请检查后重新导入',
+  const tipMap = {
+    0: '提示:EXCEL导入,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取。',
+    2: "模板格式错误,模板样式及数据请在【朗通云平台-CDSS数据维护-医学术语关联维护】中导出获取",
+    3: '模板导入失败,失败原因已在Excel中标识并自动下载,请检查后重新导入',
   };
 
   let data = {
@@ -59,9 +59,9 @@ function SurgManager() {
       })
     }
     if (flag == 3) {
-		setFormData(Surgrow)
-		getOperationPage()
-		}
+      setFormData(Surgrow)
+      getOperationPage()
+    }
   }
   //表格数据
   function getOperationPage(param) {
@@ -76,17 +76,17 @@ function SurgManager() {
 
   //删除
   function delOperationById() {
-    post(api.delOperationById,{ids:Surgid}).then((res) => {
-	  setMsvisible(false);
+    post(api.delOperationById, { ids: Surgid }).then((res) => {
+      setMsvisible(false);
       if (res.data.code === 200) {
         getOperationPage();
-		setSurgid([])
+        setSurgid([])
         message.success("删除成功");
       } else {
         message.warning(res.data.msg || '操作失败');
       }
     }).catch(() => {
-	  setMsvisible(false);
+      setMsvisible(false);
       message.error("接口出错");
     });
   }
@@ -129,122 +129,122 @@ function SurgManager() {
   }
   //导入弹窗取消或关闭
   function handleCancel1() {
-      setvisible1(false);
-		setUploadStatus(0);
+    setvisible1(false);
+    setUploadStatus(0);
   }
   //打开匹配弹窗
-  function match(row){
+  function match(row) {
     setvisible2(true)
-	setFormData(row)
+    setFormData(row)
   }
   //导入弹窗取消或关闭
   function handleCancel2() {
-      setvisible2(false);
+    setvisible2(false);
   }
   const messageBox = () => {
-	if(!Surgid.length){
-	  message.warning("请先选择要删除的记录~",1);
-	  return;
-	}
+    if (!Surgid.length) {
+      message.warning("请先选择要删除的记录~", 1);
+      return;
+    }
     setMsvisible(true)
   }
-//删除 提示框取消或关闭
+  //删除 提示框取消或关闭
   function handleCancel() {
     setMsvisible(false);
   }
-  
+
   //新增修改 取消或关闭
   function cancel() {
-	if(revise){
-		setUnsaved(true)
-	}else{
-		setVisible(false)
-		setFormData(null)
-	}
+    if (revise) {
+      setUnsaved(true)
+    } else {
+      setVisible(false)
+      setFormData(null)
+    }
   }
-  
+
   function isChange(a) {
-  	setRevise(a)
+    setRevise(a)
   }
-  
+
   function addCancel() {
-	setRevise(false)
-	setVisible(false)
-	setUnsaved(false)
-	setFormData(null)
+    setRevise(false)
+    setVisible(false)
+    setUnsaved(false)
+    setFormData(null)
   }
-  
+
   function unsavedCancel() {
     setUnsaved(false)
   }
 
   //新增修改 保存
   function SurgChange() {
-	setRevise(false)
+    setRevise(false)
     setVisible(false)
-	getOperationPage();
+    getOperationPage();
   }
   const rowSelection = {
     onChange: (selectedRowKeys, selectedRows) => {
       console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
-	  setSurgid(selectedRowKeys)
+      setSurgid(selectedRowKeys)
     }
   };
   //导入模板
   const props = {
     name: 'file',
-	accept:".xls",
-	showUploadList:false,
+    accept: ".xls",
+    showUploadList: false,
     action: api.importOperation,
     headers: {
       authorization: 'authorization-text',
     },
     onChange(info) {
-	  const {response,status} = info.file;
-    if(status === 'done'){
-	  if (response.code === 200) {
-		getOperationPage();		//刷新列表
-		//setvisible1(false);			//关闭导入弹窗
-		//message.success(`${info.file.name} 导入成功`);
-		setUploadStatus(1);
-		setUploadTip(response.data);
-	  } else{
-		//message.error(`${info.file.name} 导入失败.`);
-		setUploadStatus(2);
-	  }
-	}else if(status === 'error'){
-	  setUploadStatus(3);
-	}
+      const { response, status } = info.file;
+      if (status === 'done') {
+        if (response.code === 200) {
+          getOperationPage();		//刷新列表
+          //setvisible1(false);			//关闭导入弹窗
+          //message.success(`${info.file.name} 导入成功`);
+          setUploadStatus(1);
+          setUploadTip(response.data);
+        } else {
+          //message.error(`${info.file.name} 导入失败.`);
+          setUploadStatus(2);
+        }
+      } else if (status === 'error') {
+        setUploadStatus(3);
+      }
     },
   };
 
-  function saveMatching(){
-	post(api.matchingOperation, saveParams).then((res) => {
-	  setvisible2(false);
-	  if (res.data.code === 200) {
-		message.success("匹配成功");
-		getOperationPage();
-	  }else{
-		message.warning(res.data.message||"匹配失败,请重试");
-	  }
-	}).catch((error)=>{
-	  message.warning(error.message||"接口出错,请重试",);
-	})
+  function saveMatching() {
+    post(api.matchingOperation, saveParams).then((res) => {
+      setvisible2(false);
+      if (res.data.code === 200) {
+        message.success("匹配成功");
+        getOperationPage();
+      } else {
+        message.warning(res.data.message || "匹配失败,请重试");
+      }
+    }).catch((error) => {
+      message.warning(error.message || "接口出错,请重试",);
+    })
   }
-  function matchChange(data){
-	setSaveParams(data);
+  function matchChange(data) {
+    setSaveParams(data);
   }
   const columns = [
-    { title: '序号', dataIndex: 'index',render: (text, record,index) => (current-1)*params.size+index+1},
-    { title: '医院手术/操作名称', dataIndex: 'name',},
-    { title: '手术和操作代码', dataIndex: 'code',},
-    { title: '标准手术/操作名称', dataIndex: 'standard',},
-    { title: '是否匹配', dataIndex: 'isMapping',},
+    { title: '序号', dataIndex: 'index', render: (text, record, index) => (current - 1) * params.size + index + 1 },
+    { title: '医院手术/操作名称', dataIndex: 'name', },
+    { title: '手术和操作代码', dataIndex: 'code', },
+    { title: '标准手术/操作名称', dataIndex: 'standard', },
+    { title: '是否匹配', dataIndex: 'isMapping', },
     {
       title: '操作', dataIndex: 'key', render: (text, record) => (
         <Space size="middle">
           <a onClick={e => showModal('修改字典', true, 3, record)}>修改</a>
-		  <a onClick={e => match(record)}>匹配</a>
+          <a onClick={e => match(record)}>匹配</a>
         </Space>
       )
     }
@@ -256,36 +256,36 @@ function SurgManager() {
           form={form}
           name="normal_login"
           onFinish={onFinish}
-          initialValues={{ status: '' }}
+          initialValues={{ isMapping: '' }}
         >
           <Row gutter={24}>
-		  <Col span={5} key={0}>
-		    <Form.Item label="医院手术/操作名称" name="name">
-		      <Input placeholder="请输入" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
-		  <Col span={5} key={1}>
-		    <Form.Item label="手术和操作代码" name="code">
-		      <Input placeholder="请输入" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
-		  <Col span={5} key={2}>
-		    <Form.Item label="标准手术/操作名称" name="standard">
-		      <Input placeholder="请输入" autoComplete='off'/>
-		    </Form.Item>
-		  </Col>
+            <Col span={5} key={0}>
+              <Form.Item label="医院手术/操作名称" name="name">
+                <Input placeholder="医院手术/操作名称" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={1}>
+              <Form.Item label="手术和操作代码" name="code">
+                <Input placeholder="手术和操作代码" autoComplete='off' />
+              </Form.Item>
+            </Col>
+            <Col span={5} key={2}>
+              <Form.Item label="标准手术/操作名称" name="standard">
+                <Input placeholder="标准手术/操作名称" autoComplete='off' />
+              </Form.Item>
+            </Col>
             <Col span={4} key={3}>
               <Form.Item id="groupTypeval" label="是否匹配" name="isMapping">
                 <Select
                   showSearch
-                      optionFilterProp="children"
-					  // onSearch={onSearch}
-					  // onFocus={onFocus}
-					  placeholder="全部"
+                  optionFilterProp="children"
+                  // onSearch={onSearch}
+                  // onFocus={onFocus}
+                  placeholder="全部"
                 >
-				  	<Option value={-1} key={-1}>全部</Option>
-                    <Option value={0} key={0}>未匹配</Option>
-					<Option value={1} key={1}>已匹配</Option>
+                  <Option value={''} key={-1}>全部</Option>
+                  <Option value={0} key={0}>未匹配</Option>
+                  <Option value={1} key={1}>已匹配</Option>
                 </Select>
               </Form.Item>
             </Col>
@@ -306,21 +306,21 @@ function SurgManager() {
       <div className="table">
         <div className="table-header">
           <h2 className="table-title">手术信息维护</h2>
-		  <Row gutter={12}>
-		    <Col key={0}>
+          <Row gutter={12}>
+            <Col key={0}>
               <Button type="primary" icon={<PlusOutlined />} onClick={e => showModal('新增', true, 1)}>新增</Button>
-		    </Col>
-			<Col key={1}>
-		      <Button  onClick={e => messageBox()} className="delete" >删除</Button>
-		    </Col>
-			<Col key={2}>
-			  <Button type="primary"  onClick={e => ImportBox()}>导入</Button>
-			</Col>
-		  </Row>
+            </Col>
+            <Col key={1}>
+              <Button onClick={e => messageBox()} className="delete" >删除</Button>
+            </Col>
+            <Col key={2}>
+              <Button type="primary" onClick={e => ImportBox()}>导入</Button>
+            </Col>
+          </Row>
         </div>
 
         <Table
-		  rowSelection={{type: 'checkbox',...rowSelection,}}
+          rowSelection={{ type: 'checkbox', ...rowSelection, }}
           columns={columns}
           scroll={{ y: 'calc(100vh - 350px)' }}
           dataSource={SurgList}
@@ -348,24 +348,24 @@ function SurgManager() {
           footer={null}
           forceRender={true}
         >
-          <SurgContext.Provider value={{type, formData}}>
-            <AddSurg SurgChange={SurgChange} cancel={cancel} isChange={isChange}/>
+          <SurgContext.Provider value={{ type, formData }}>
+            <AddSurg SurgChange={SurgChange} cancel={cancel} isChange={isChange} />
           </SurgContext.Provider>
-				<Modal
-				title="提示"
-				okText='确定'
-				cancelText='关闭'
-				width={400}
-				visible={unsaved}
-				onOk={addCancel}
-				onCancel={unsavedCancel}
-				 >
-				<p>当前数据未保存 是否确认关闭?</p>
-				</Modal>
+          <Modal
+            title="提示"
+            okText='确定'
+            cancelText='关闭'
+            width={400}
+            visible={unsaved}
+            onOk={addCancel}
+            onCancel={unsavedCancel}
+          >
+            <p>当前数据未保存 是否确认关闭?</p>
+          </Modal>
         </Modal>
         : ''}
       <Modal
-		maskClosable={false}
+        maskClosable={false}
         title="提示"
         okText='确定'
         cancelText='关闭'
@@ -376,34 +376,34 @@ function SurgManager() {
       >
         <p>诊断信息删除后将无法恢复,确认删除这{Surgid.length}条信息。</p>
       </Modal>
-	  <Modal
-		maskClosable={false}
-		destroyOnClose={true}
-	    title="提示"
-	    width={400}
-	    visible={visible1}
-	    onCancel={handleCancel1}
-		footer={<Button key="back" onClick={handleCancel1}>关闭</Button>}
-	  >
-	    <div style={{marginBottom: 10 + 'px'}}>
-			<span>手术信息导入:</span>
-		  <Upload {...props}><Button type="primary" >导入目录</Button></Upload>
-		</div>
-		{uploadStatus===1?(<span style={{color: '#00AF71'}}>{uploadTip}</span>):(<span style={{color: '#E3505B'}}>{tipMap[uploadStatus]}</span>)}
-	  </Modal>
-	  <Modal
-		maskClosable={false}
-		destroyOnClose={true}
-	    title="提示"
-		okText='保存'
-	    cancelText='关闭'
-	    width={800}
-	    visible={visible2}
-	    onCancel={handleCancel2}
-		onOk={saveMatching}
-	  >
-	    <MatchSurg row={formData} onChange={matchChange}></MatchSurg>
-	  </Modal>
+      <Modal
+        maskClosable={false}
+        destroyOnClose={true}
+        title="提示"
+        width={400}
+        visible={visible1}
+        onCancel={handleCancel1}
+        footer={<Button key="back" onClick={handleCancel1}>关闭</Button>}
+      >
+        <div style={{ marginBottom: 10 + 'px' }}>
+          <span>手术信息导入:</span>
+          <Upload {...props}><Button type="primary" >导入目录</Button></Upload>
+        </div>
+        {uploadStatus === 1 ? (<span style={{ color: '#00AF71' }}>{uploadTip}</span>) : (<span style={{ color: '#E3505B' }}>{tipMap[uploadStatus]}</span>)}
+      </Modal>
+      <Modal
+        maskClosable={false}
+        destroyOnClose={true}
+        title="提示"
+        okText='保存'
+        cancelText='关闭'
+        width={800}
+        visible={visible2}
+        onCancel={handleCancel2}
+        onOk={saveMatching}
+      >
+        <MatchSurg row={formData} onChange={matchChange}></MatchSurg>
+      </Modal>
     </div>
   )
 }