瀏覽代碼

Merge branch 'dev' into test

1178232204@qq.com 3 年之前
父節點
當前提交
ba6794ee6b

+ 5 - 9
src/api/request.js

@@ -86,16 +86,12 @@ const request = {
     getRecordTemplatePage:"/daqe-center/recordTemplateManage/getRecordTemplatePage",        //文书模板列表
     getRecordTemplatePage:"/daqe-center/recordTemplateManage/getRecordTemplatePage",        //文书模板列表
 	
 	
 	//诊断管理
 	//诊断管理
-	getTermPage:'/mdsp-service/tran/mappingConfig/getPage',//获取术语信息分页列表
+	getTermPage:'/mdsp-service/tran/mappingConfig/getPage',//获取术语信息分页列表(与药品,手术公用)
     termMatching:'/mdsp-service/term/termMatching',             //术语匹配搜索(与药品,手术公用)
     termMatching:'/mdsp-service/term/termMatching',             //术语匹配搜索(与药品,手术公用)
-	addDisease:'/daqe-center/diseaseManage/addDisease',//添加诊断
-	delDiseaseById:'/daqe-center/diseaseManage/delDiseaseById',//通过id删除诊断
-	matchingDisease:'/daqe-center/diseaseManage/matchingDisease',//匹配诊断
-	upDiseaseById:'/daqe-center/diseaseManage/upDiseaseById',//修改诊断
-    importDisease:'/daqe-center/diseaseManage/importDisease',//诊断信息导入
-    getDiseaseInfoById:"/daqe-center/diseaseManage/getDiseaseInfoById",   //已匹配诊断信息查看
+    saveOrUpdateRecord:'/mdsp-service/tran/mappingConfig/saveOrUpdateRecord',  //匹配关系保存(与药品,手术公用)
+    deleteRecord:'/mdsp-service/tran/mappingConfig/deleteRecord',   //删除术语(与药品,手术公用)
 	
 	
-	//药品管理
+	/*//药品管理
 	getDrugPage:'/daqe-center/drugManage/getDrugPage',//获取药品分页列表
 	getDrugPage:'/daqe-center/drugManage/getDrugPage',//获取药品分页列表
 	delDrugById:'/daqe-center/drugManage/delDrugById',//通过id删除药品
 	delDrugById:'/daqe-center/drugManage/delDrugById',//通过id删除药品
 	addDrug:'/daqe-center/drugManage/addDrug',//新增药品
 	addDrug:'/daqe-center/drugManage/addDrug',//新增药品
@@ -111,7 +107,7 @@ const request = {
 	matchingOperation:'/daqe-center/operationManage/matchingOperation',//匹配手术信息
 	matchingOperation:'/daqe-center/operationManage/matchingOperation',//匹配手术信息
 	upOperationById:'/daqe-center/operationManage/upOperationById',//通过id修改手术
 	upOperationById:'/daqe-center/operationManage/upOperationById',//通过id修改手术
     importOperation:'/daqe-center/operationManage/importOperation',  //手术导入
     importOperation:'/daqe-center/operationManage/importOperation',  //手术导入
-    getOperationById:'/daqe-center/operationManage/getOperationById',   //已匹配标准手术获取
+    getOperationById:'/daqe-center/operationManage/getOperationById',   //已匹配标准手术获取*/
 	
 	
 
 
     getColumnVerifyPage:'/daqe-center/columnVerifyManagement/getColumnVerifyPage',//字段校验规则维护列表
     getColumnVerifyPage:'/daqe-center/columnVerifyManagement/getColumnVerifyPage',//字段校验规则维护列表

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

@@ -62,8 +62,8 @@ function EditBlock(props) {
         if (!dates || dates.length === 0) {
         if (!dates || dates.length === 0) {
             return current && current >= moment().endOf('day');
             return current && current >= moment().endOf('day');
         }
         }
-        const tooLate = dates[0] && current.diff(dates[0], 'days') > 30;
-        const tooEarly = dates[1] && dates[1].diff(current, 'days') > 30;
+        const tooLate = dates[0] && current.diff(dates[0], 'days') > 29;
+        const tooEarly = dates[1] && dates[1].diff(current, 'days') > 29;
         if (!limit) {
         if (!limit) {
             return current && current >= moment().endOf('day') || tooEarly || tooLate;
             return current && current >= moment().endOf('day') || tooEarly || tooLate;
         } else {
         } else {
@@ -98,7 +98,6 @@ function EditBlock(props) {
             behospitalCode: values.behospitalCode,
             behospitalCode: values.behospitalCode,
             endDate: values.endDate,
             endDate: values.endDate,
             startDate: values.startDate,
             startDate: values.startDate,
-            isPlacefile:getCookie('isPlacefile')
         }
         }
         post(api.dataCompare, params).then((res) => {
         post(api.dataCompare, params).then((res) => {
             if (res.data.code === 200) {
             if (res.data.code === 200) {
@@ -208,6 +207,7 @@ function EditBlock(props) {
                     {type != 3 ?
                     {type != 3 ?
                         <Form.Item label="日期" name="time" rules={[{ required: true }]} labelAlign="right">
                         <Form.Item label="日期" name="time" rules={[{ required: true }]} labelAlign="right">
                             <RangePicker
                             <RangePicker
+                            allowClear={false}
                                 placeholder={['开始时间', '结束时间']}
                                 placeholder={['开始时间', '结束时间']}
                                 disabledDate={disabledDate}
                                 disabledDate={disabledDate}
                                 onCalendarChange={val => setDates(val)}
                                 onCalendarChange={val => setDates(val)}

+ 18 - 7
src/components/BlockLossManage/index.js

@@ -7,7 +7,7 @@ import './index.less'
 import apiObj from '@api/index';
 import apiObj from '@api/index';
 import EditBlock from './editBlock';
 import EditBlock from './editBlock';
 import BlockContext from './block-context';
 import BlockContext from './block-context';
-import { disabledDate, getValueFromEvent } from '@utils/index'
+import { getValueFromEvent } from '@utils/index'
 const { post, api, xPost } = apiObj;
 const { post, api, xPost } = apiObj;
 const { RangePicker } = DatePicker;
 const { RangePicker } = DatePicker;
 const { Option } = Select;
 const { Option } = Select;
@@ -21,6 +21,7 @@ function BlockLossManage() {
     const [title, setTitle] = useState(0);
     const [title, setTitle] = useState(0);
     const [visible, setVisible] = useState(false);
     const [visible, setVisible] = useState(false);
     const [size, setSize] = useState(15);
     const [size, setSize] = useState(15);
+    const [dates, setDates] = useState([]);
     const [current, setCurrent] = useState(1);
     const [current, setCurrent] = useState(1);
     const [type, setType] = useState(null);
     const [type, setType] = useState(null);
     const [blockData, setBlockData] = useState({});
     const [blockData, setBlockData] = useState({});
@@ -67,6 +68,14 @@ function BlockLossManage() {
             }
             }
         })
         })
     }
     }
+    function disabledDate(current) {
+        if (!dates || dates.length === 0) {
+            return current && current >= moment().endOf('day');
+        }
+        const tooLate = dates[0] && current.diff(dates[0], 'days') > 364;
+        const tooEarly = dates[1] && dates[1].diff(current, 'days') > 364;
+        return current && current >= moment().endOf('day') || tooEarly || tooLate;
+    };
     //修改
     //修改
     function showModal(title, row, type) {
     function showModal(title, row, type) {
         setVisible(true)
         setVisible(true)
@@ -98,6 +107,7 @@ function BlockLossManage() {
     function userChange() {
     function userChange() {
         setVisible(false)
         setVisible(false)
         getBlockLossPage();
         getBlockLossPage();
+        blockLossTypeGather({ startDate: params.startDate, endDate: params.endDate })
         setBlockDetail(null)
         setBlockDetail(null)
     }
     }
     const onFinish = (value) => {
     const onFinish = (value) => {
@@ -152,8 +162,8 @@ function BlockLossManage() {
             }
             }
         },
         },
         {
         {
-            title: '更新时间', dataIndex: 'auditTime', key: 'auditTime', render: (text, record) => {
-                return record.auditTime || '-';
+            title: '更新时间', dataIndex: 'gmtModified', key: 'gmtModified', render: (text, record) => {
+                return record.gmtModified || '-';
             }
             }
         },
         },
         {
         {
@@ -191,6 +201,7 @@ function BlockLossManage() {
                                     allowClear={false}
                                     allowClear={false}
                                     disabledDate={disabledDate} // 限制日期不可选
                                     disabledDate={disabledDate} // 限制日期不可选
                                     placeholder={['开始时间', '结束时间']}
                                     placeholder={['开始时间', '结束时间']}
+                                    onCalendarChange={val => setDates(val)}
                                 />
                                 />
                             </Form.Item>
                             </Form.Item>
                         </Col>
                         </Col>
@@ -241,8 +252,8 @@ function BlockLossManage() {
                                     allowClear
                                     allowClear
                                 >
                                 >
                                     <Option value="" key={3}>全部</Option>
                                     <Option value="" key={3}>全部</Option>
-                                    <Option value="0" key={0}>未通过</Option>
-                                    <Option value="1" key={1}>通过</Option>
+                                    <Option value="0" key={0}>核查未通过</Option>
+                                    <Option value="1" key={1}>核查通过</Option>
                                     <Option value="2" key={2}>未核查</Option>
                                     <Option value="2" key={2}>未核查</Option>
                                 </Select>
                                 </Select>
                             </Form.Item>
                             </Form.Item>
@@ -312,7 +323,7 @@ function BlockLossManage() {
                         </Col>
                         </Col>
                         <Col span={6} order={3} className="box-item">
                         <Col span={6} order={3} className="box-item">
                             <p>{blockData.outCodeNum || blockData.outCodeNum == 0 ? blockData.outCodeNum : '-'}</p>
                             <p>{blockData.outCodeNum || blockData.outCodeNum == 0 ? blockData.outCodeNum : '-'}</p>
-                            <p>病历号丢失</p>
+                            <p>患者信息丢失</p>
                         </Col>
                         </Col>
                         <Col span={6} order={4} className="box-item box">
                         <Col span={6} order={4} className="box-item box">
                             <p>{blockData.outLossNum || blockData.outLossNum == 0 ? blockData.outLossNum : '-'}</p>
                             <p>{blockData.outLossNum || blockData.outLossNum == 0 ? blockData.outLossNum : '-'}</p>
@@ -330,7 +341,7 @@ function BlockLossManage() {
                         </Col>
                         </Col>
                         <Col span={6} order={3} className="box-item">
                         <Col span={6} order={3} className="box-item">
                             <p>{blockData.inCodeNum || blockData.inCodeNum == 0 ? blockData.inCodeNum : '-'}</p>
                             <p>{blockData.inCodeNum || blockData.inCodeNum == 0 ? blockData.inCodeNum : '-'}</p>
-                            <p>病历号丢失</p>
+                            <p>患者信息丢失</p>
                         </Col>
                         </Col>
                         <Col span={6} order={4} className="box-item box">
                         <Col span={6} order={4} className="box-item box">
                             <p>{blockData.inLossNum || blockData.inLossNum == 0 ? blockData.inLossNum : '-'}</p>
                             <p>{blockData.inLossNum || blockData.inLossNum == 0 ? blockData.inLossNum : '-'}</p>

+ 19 - 19
src/components/DiagManager/addDiag.js

@@ -13,18 +13,20 @@ const { post, api } = apiObj;
 function AddDiag({matchChange,visible,cancel,onOk,title}) {
 function AddDiag({matchChange,visible,cancel,onOk,title}) {
   const [form] = Form.useForm();
   const [form] = Form.useForm();
   const { formData } = useContext(DiagContext);
   const { formData } = useContext(DiagContext);
-  console.log('formData',formData)
   const { Option } = Select;
   const { Option } = Select;
   const [unsaved, setUnsaved] = useState(false);//修改未保存弹窗
   const [unsaved, setUnsaved] = useState(false);//修改未保存弹窗
-  const [searchTxt,setSearchTxt] = useState((formData||{}).hisName);
   const [icdcode,setIcdcode] = useState((formData||{}).code);
   const [icdcode,setIcdcode] = useState((formData||{}).code);
   const [dataList, setDataList] = useState([]);//当前页列表数据
   const [dataList, setDataList] = useState([]);//当前页列表数据
+  //const TREMTYPE=100;			//常亮,术语类型1-化验大项、2-化验小项、3-辅检、4-诊断、5-药品、6-手术和操作
   //const initialValues = formData;
   //const initialValues = formData;
 
 
+  useEffect(() => {
+	form.setFieldsValue(formData)
+  }, [formData]);
   //标准术语搜索
   //标准术语搜索
   function handleSearch(val){
   function handleSearch(val){
     const txt = val.trim();
     const txt = val.trim();
-	if(txt==""){
+	if(txt===""){
 		const list = []
 		const list = []
 		setDataList(list);
 		setDataList(list);
 	}else{
 	}else{
@@ -37,22 +39,24 @@ function AddDiag({matchChange,visible,cancel,onOk,title}) {
 	}
 	}
   }
   }
   //选中(修改)标准词时
   //选中(修改)标准词时
-  function handleChange(val){
-    console.log('选中:',val)
-	setSearchTxt();
-	setIcdcode(val);
+  function handleChange(val,item){
+	console.log(33,item)
+	form.setFieldsValue({
+	  source:item.source,
+	});
+	setIcdcode(item.code);
   }
   }
   //保存匹配,先验证输入
   //保存匹配,先验证输入
   function saveMatching(){
   function saveMatching(){
 	form.validateFields().then(function(values){
 	form.validateFields().then(function(values){
-	  console.log('values:',values)
-	  onOk({...values,type:4})
+	  console.log('values:',values,form.getFieldsValue())
+	  onOk({...values,type:4,hospitalId:form.hospitalId})
 	})
 	})
   }
   }
   //关闭新增/编辑弹窗
   //关闭新增/编辑弹窗
   function saveCancel(){
   function saveCancel(){
     //有未保存修改时弹窗提醒
     //有未保存修改时弹窗提醒
-    const isChange = form.isFieldsTouched();
+    const isChange = form.isFieldsTouched(['hisName','conceptId']);
     if(isChange){
     if(isChange){
 	  setUnsaved(true);
 	  setUnsaved(true);
 	}else{
 	}else{
@@ -70,7 +74,6 @@ function AddDiag({matchChange,visible,cancel,onOk,title}) {
 	setUnsaved(false)
 	setUnsaved(false)
   }
   }
   return (
   return (
-    <>
 	  <Modal
 	  <Modal
 		  title={title}
 		  title={title}
 		  okText='确定'
 		  okText='确定'
@@ -83,8 +86,8 @@ function AddDiag({matchChange,visible,cancel,onOk,title}) {
 		  initialValues={formData}
 		  initialValues={formData}
 	  >
 	  >
 	  <Form
 	  <Form
-		  labelCol={{ span: 6 }}
-		  wrapperCol={{ span: 16 }}
+		  labelCol={{ span: 7 }}
+		  wrapperCol={{ span: 15 }}
 		  className='clearfix'
 		  className='clearfix'
 		  form={form}
 		  form={form}
 		  name="register"
 		  name="register"
@@ -103,16 +106,15 @@ function AddDiag({matchChange,visible,cancel,onOk,title}) {
 					},{ max: 30,message:'医院诊断名称不能超过30个字符'}
 					},{ max: 30,message:'医院诊断名称不能超过30个字符'}
 				  ]}
 				  ]}
 			  >
 			  >
-				<Input value="1" placeholder="请输入" autoComplete='off'/>
+				<Input placeholder="请输入" autoComplete='off'/>
 			  </Form.Item>
 			  </Form.Item>
 			</div>
 			</div>
-
 		</div>
 		</div>
 		<div className="lt-info info-box">
 		<div className="lt-info info-box">
 		  <p className='title'>标准术语</p>
 		  <p className='title'>标准术语</p>
 		  <div className="item-box">
 		  <div className="item-box">
 			<Form.Item
 			<Form.Item
-				name="uniqueName"
+				name="conceptId"
 				label="标准诊断名称"
 				label="标准诊断名称"
 				rules={[
 				rules={[
 				  {
 				  {
@@ -122,13 +124,12 @@ function AddDiag({matchChange,visible,cancel,onOk,title}) {
 				]}
 				]}
 			>
 			>
 			  <Select placeholder="请输入"
 			  <Select placeholder="请输入"
-					  value={searchTxt}
 					  autoComplete='off'
 					  autoComplete='off'
 					  onSearch={handleSearch}
 					  onSearch={handleSearch}
 					  onChange={handleChange}
 					  onChange={handleChange}
 					  filterOption={false}
 					  filterOption={false}
 					  showSearch>
 					  showSearch>
-				{dataList.map(d => <Option key={d.id}>{d.name}</Option>)}
+				{dataList.map(d => <Option key={d.id} source={d.source} code={d.code}>{d.name}</Option>)}
 			  </Select>
 			  </Select>
 			</Form.Item>
 			</Form.Item>
 			<Form.Item
 			<Form.Item
@@ -153,7 +154,6 @@ function AddDiag({matchChange,visible,cancel,onOk,title}) {
 		  <p>当前数据未保存 是否确认关闭?</p>
 		  <p>当前数据未保存 是否确认关闭?</p>
 		</Modal>
 		</Modal>
 	  </Modal>
 	  </Modal>
-    </>
   );
   );
 }
 }
 
 

+ 6 - 4
src/components/DiagManager/index.js

@@ -19,7 +19,7 @@ function DiagManager() {
   const [title, setTitle] = useState("");//新增/修改的弹窗标题
   const [title, setTitle] = useState("");//新增/修改的弹窗标题
   const [visible, setVisible] = useState(false);//新增修改 弹窗
   const [visible, setVisible] = useState(false);//新增修改 弹窗
   const [delvisible, setDelvisible] = useState(false);//删除 弹窗
   const [delvisible, setDelvisible] = useState(false);//删除 弹窗
-  const [formData, setFormData] = useState(null);//当前行数据
+  const [formData, setFormData] = useState({});//当前行数据
   const [size, setSize] = useState(15);//每页显示条数
   const [size, setSize] = useState(15);//每页显示条数
   const [total, setTotal] = useState(0);
   const [total, setTotal] = useState(0);
   const [current, setCurrent] = useState(1);//当前页
   const [current, setCurrent] = useState(1);//当前页
@@ -38,12 +38,13 @@ function DiagManager() {
   //新增/修改 弹窗flag=1新增,3修改
   //新增/修改 弹窗flag=1新增,3修改
   const showModal = (name, flag, Diagrow) => {
   const showModal = (name, flag, Diagrow) => {
     setVisible(true);
     setVisible(true);
-    setTitle(name);
+    setTitle(name);console.log(flag)
     if (flag === 1) {
     if (flag === 1) {
       setFormData({
       setFormData({
         status: 1
         status: 1
       })
       })
     }else if (flag === 3) {
     }else if (flag === 3) {
+      console.log(33,Diagrow)
       setFormData(Diagrow)
       setFormData(Diagrow)
     }
     }
   }
   }
@@ -63,7 +64,7 @@ function DiagManager() {
   }
   }
   //删除
   //删除
   function delDiseaseById() {
   function delDiseaseById() {
-    post(api.delDiseaseById, { id: Diagid }).then((res) => {
+    post(api.deleteRecord, { id: Diagid }).then((res) => {
 	  setDelvisible(false);
 	  setDelvisible(false);
       if (res.data.code === 200) {
       if (res.data.code === 200) {
         getDiseasePage();
         getDiseasePage();
@@ -123,9 +124,10 @@ function DiagManager() {
   }
   }
 
 
   function saveMatching(saveParams) {
   function saveMatching(saveParams) {
-    post(api.matchingDisease, saveParams).then((res) => {
+    post(api.saveOrUpdateRecord, saveParams).then((res) => {
       if (res.data.code === 200) {
       if (res.data.code === 200) {
         message.success("匹配成功");
         message.success("匹配成功");
+        setVisible(false);
         getDiseasePage();
         getDiseasePage();
       } else {
       } else {
         message.warning(res.data.message || "匹配失败,请重试");
         message.warning(res.data.message || "匹配失败,请重试");

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

@@ -73,8 +73,8 @@ function EditBlock(props) {
         if (!dates || dates.length === 0) {
         if (!dates || dates.length === 0) {
             return current && current >= moment().endOf('day');
             return current && current >= moment().endOf('day');
         }
         }
-        const tooLate = dates[0] && current.diff(dates[0], 'days') > 30;
-        const tooEarly = dates[1] && dates[1].diff(current, 'days') > 30;
+        const tooLate = dates[0] && current.diff(dates[0], 'days') > 29;
+        const tooEarly = dates[1] && dates[1].diff(current, 'days') > 29;
         if(!limit){
         if(!limit){
             return current && current >= moment().endOf('day') || tooEarly || tooLate;
             return current && current >= moment().endOf('day') || tooEarly || tooLate;
         }else{
         }else{
@@ -209,6 +209,7 @@ function EditBlock(props) {
                     {type != 3 ?
                     {type != 3 ?
                         <Form.Item label="日期" name="time" rules={[{ required: true }]} labelAlign="right">
                         <Form.Item label="日期" name="time" rules={[{ required: true }]} labelAlign="right">
                             <RangePicker
                             <RangePicker
+                            allowClear={false}
                                 placeholder={['开始时间', '结束时间']}
                                 placeholder={['开始时间', '结束时间']}
                                 disabledDate={disabledDate}
                                 disabledDate={disabledDate}
                                 onCalendarChange={val => setDates(val)}
                                 onCalendarChange={val => setDates(val)}

+ 7 - 5
src/components/FieldProblem/index.js

@@ -32,7 +32,8 @@ function FieldProblem() {
         pages: 1,
         pages: 1,
         current: 1,
         current: 1,
         size: 15,
         size: 15,
-        desc: ['isSolved', 'solveTime'],
+        asc:['isSolved'],
+        desc: ['solveTime'],
         behospitalStartDate: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
         behospitalStartDate: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
         behospitalEndDate: getCurrentData().split('/').join('-') + ' 23:23:59'
         behospitalEndDate: getCurrentData().split('/').join('-') + ' 23:23:59'
     });
     });
@@ -41,7 +42,8 @@ function FieldProblem() {
         pages: 1,
         pages: 1,
         current: 1,
         current: 1,
         size: size,
         size: size,
-        desc: ['isSolved', 'solveTime'],
+        asc:['isSolved'],
+        desc: ['solveTime'],
         behospitalStartDate: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
         behospitalStartDate: getCurrentDataFront().split('/').join('-') + ' 00:00:00',
         behospitalEndDate: getCurrentData().split('/').join('-') + ' 23:23:59'
         behospitalEndDate: getCurrentData().split('/').join('-') + ' 23:23:59'
     }
     }
@@ -98,7 +100,7 @@ function FieldProblem() {
     function userChange() {
     function userChange() {
         setVisible(false)
         setVisible(false)
         getColumnResultPage();
         getColumnResultPage();
-        getColumnResultNumber(date)
+        getColumnResultNumber({ behospitalStartDate: params.behospitalStartDate, behospitalEndDate: params.behospitalEndDate })
         setProblemDetail(null)
         setProblemDetail(null)
     }
     }
     function onSizeChange(current, pageSize) {
     function onSizeChange(current, pageSize) {
@@ -173,8 +175,8 @@ function FieldProblem() {
             }
             }
         },
         },
         {
         {
-            title: '更新时间', dataIndex: 'auditTime', key: 'auditTime', render: (text, record) => {
-                return record.auditTime || '-';
+            title: '更新时间', dataIndex: 'solveTime', key: 'solveTime', render: (text, record) => {
+                return record.solveTime || '-';
             }
             }
         },
         },
         {
         {

+ 17 - 12
src/components/FieldRules/addRules.js

@@ -114,7 +114,6 @@ function ContentForm(props) {
     }
     }
     //表选择
     //表选择
     function tablechange(i, value, options,ins) {
     function tablechange(i, value, options,ins) {
-        console.log(value);
         const formData = form.getFieldsValue();
         const formData = form.getFieldsValue();
         if (value) {
         if (value) {
             colList[i] = list[options.key].getColumnNameDTOList
             colList[i] = list[options.key].getColumnNameDTOList
@@ -129,21 +128,26 @@ function ContentForm(props) {
         }
         }
         let columnList = formData.columnList;
         let columnList = formData.columnList;
         if(ins == 1){
         if(ins == 1){
-            columnList[i].tableEname = value
+            columnList[i].tableEname = options.val
         }else{
         }else{
-            columnList[i].tableCname = value
+            columnList[i].tableCname = options.val
         }
         }
-        
         columnList[i].columnCname = undefined
         columnList[i].columnCname = undefined
         columnList[i].columnEname = undefined
         columnList[i].columnEname = undefined
         form.setFieldsValue({
         form.setFieldsValue({
             columnList: columnList
             columnList: columnList
         });
         });
+        console.log(form.getFieldsValue());
     }
     }
-    function colchange(value, options) {
+    function colchange(i, value, options,ins) {
         const formData = form.getFieldsValue();
         const formData = form.getFieldsValue();
         let columnList = formData.columnList;
         let columnList = formData.columnList;
-        columnList[options.index].id = options.key
+        columnList[i].id = options.key
+        if(ins == 1){
+            columnList[i].columnEname = options.val
+        }else{
+            columnList[i].columnCname = options.val
+        }
         form.setFieldsValue({
         form.setFieldsValue({
             columnList: columnList
             columnList: columnList
         });
         });
@@ -187,6 +191,7 @@ function ContentForm(props) {
         setColList([...colList])
         setColList([...colList])
         disable[index] = true
         disable[index] = true
         seDisable([...disable])
         seDisable([...disable])
+        
     }
     }
     //标准值维护
     //标准值维护
     function modifyStand(i) {
     function modifyStand(i) {
@@ -291,7 +296,7 @@ function ContentForm(props) {
                                                 <Select allowClear showSearch onChange={(value, option) => tablechange(i, value, option,1)} onSearch={cnameSearch} style={{ width: 160 }} placeholder="请选择">
                                                 <Select allowClear showSearch onChange={(value, option) => tablechange(i, value, option,1)} onSearch={cnameSearch} style={{ width: 160 }} placeholder="请选择">
                                                     {tableList.map((item) => {
                                                     {tableList.map((item) => {
                                                         return (
                                                         return (
-                                                            <Option value={item.tableEname} key={item.index}>{item.tableCname}</Option>
+                                                            <Option value={item.tableCname} val={item.tableEname} key={item.index}>{item.tableCname}</Option>
                                                         )
                                                         )
                                                     })}
                                                     })}
                                                 </Select>
                                                 </Select>
@@ -300,7 +305,7 @@ function ContentForm(props) {
                                                 <Select allowClear showSearch onChange={(value, option) => tablechange(i, value, option,2)} onSearch={enameSearch} style={{ width: 160 }} placeholder="请选择" >
                                                 <Select allowClear showSearch onChange={(value, option) => tablechange(i, value, option,2)} onSearch={enameSearch} style={{ width: 160 }} placeholder="请选择" >
                                                     {tableList.map((item) => {
                                                     {tableList.map((item) => {
                                                         return (
                                                         return (
-                                                            <Option value={item.tableCname} key={item.index}>{item.tableEname}</Option>
+                                                            <Option value={item.tableEname} val={item.tableCname} key={item.index}>{item.tableEname}</Option>
                                                         )
                                                         )
                                                     })}
                                                     })}
                                                 </Select>
                                                 </Select>
@@ -308,19 +313,19 @@ function ContentForm(props) {
                                         </div>
                                         </div>
                                         <div className='item-box'>
                                         <div className='item-box'>
                                             <Form.Item label="字段名称(中文)" rules={[{ required: true }]} style={{ width: '50%' }} name={['columnList', i, 'columnCname']} labelAlign="right">
                                             <Form.Item label="字段名称(中文)" rules={[{ required: true }]} style={{ width: '50%' }} name={['columnList', i, 'columnCname']} labelAlign="right">
-                                                <Select allowClear showSearch onChange={colchange} onSearch={colmeSearch} style={{ width: 160 }} placeholder="请选择" disabled={disable[i]}>
+                                                <Select allowClear showSearch onChange={(value, option) => colchange(i, value, option,1)} onSearch={colmeSearch} style={{ width: 160 }} placeholder="请选择" disabled={disable[i]}>
                                                     {colList[i].map((item) => {
                                                     {colList[i].map((item) => {
                                                         return (
                                                         return (
-                                                            <Option value={item.columnCname} key={item.id} index={i}>{item.columnCname}</Option>
+                                                            <Option value={item.columnCname} val={item.columnEname} key={item.id} index={i}>{item.columnCname}</Option>
                                                         )
                                                         )
                                                     })}
                                                     })}
                                                 </Select>
                                                 </Select>
                                             </Form.Item>
                                             </Form.Item>
                                             <Form.Item label="字段名称(英文)" rules={[{ required: true }]} name={['columnList', i, 'columnEname']} labelAlign="right">
                                             <Form.Item label="字段名称(英文)" rules={[{ required: true }]} name={['columnList', i, 'columnEname']} labelAlign="right">
-                                                <Select allowClear showSearch onChange={colchange} onSearch={coleneSearch} style={{ width: 160 }} placeholder="请选择" disabled={disable[i]}>
+                                                <Select allowClear showSearch onChange={(value, option) => colchange(i, value, option,2)} onSearch={coleneSearch} style={{ width: 160 }} placeholder="请选择" disabled={disable[i]}>
                                                     {colList[i].map((item) => {
                                                     {colList[i].map((item) => {
                                                         return (
                                                         return (
-                                                            <Option value={item.columnEname} key={item.id} index={i}>{item.columnEname}</Option>
+                                                            <Option value={item.columnEname} val={item.columnCname} key={item.id} index={i}>{item.columnEname}</Option>
                                                         )
                                                         )
                                                     })}
                                                     })}
                                                 </Select>
                                                 </Select>

+ 7 - 4
src/components/FieldRules/index.js

@@ -176,6 +176,12 @@ function FieldRules() {
         post(api.getByIdColumnVerify, param).then((res) => {
         post(api.getByIdColumnVerify, param).then((res) => {
             if (res.data.code === 200) {
             if (res.data.code === 200) {
                 const data = res.data.data;
                 const data = res.data.data;
+                let obj = []
+                data.standardvalue.split(';').forEach(it => {
+                    obj.push({
+                        tit: it
+                    })
+                });
                 const arr = {
                 const arr = {
                     columnList: [{
                     columnList: [{
                         columnCname: data.columnCname,
                         columnCname: data.columnCname,
@@ -185,13 +191,10 @@ function FieldRules() {
                         disable: true,
                         disable: true,
                         id: data.columnId
                         id: data.columnId
                     }],
                     }],
-                    standardValueList: [{
-                        tit: data.standardvalue,
-                    }],
+                    standardValueList: obj,
                     regularName: data.regular,
                     regularName: data.regular,
                     ...data
                     ...data
                 }
                 }
-                console.log(arr);
                 setFiledDetail(arr)
                 setFiledDetail(arr)
             }
             }
         })
         })