更新知情同意书
This commit is contained in:
@@ -4,7 +4,7 @@ import "../../assets/css/basic.css";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import ConfirmButton from "../../components/ConfirmButton";
|
||||
import DecorLine from "../../components/DecorLine";
|
||||
import { getPackagItemDetail } from "../../api/hisApi";
|
||||
import { getPackagItemDetail, signIn } from "../../api/hisApi";
|
||||
import errorIcon from "../../assets/error.png";
|
||||
|
||||
const UI81: React.FC = () => {
|
||||
@@ -18,48 +18,9 @@ const UI81: React.FC = () => {
|
||||
navigate("/UI9");
|
||||
};
|
||||
|
||||
const [ListData, setListData] = useState<any[]>([]);
|
||||
const [PackageInfo, setPackageInfo] = useState<any>({});
|
||||
useEffect(() => {
|
||||
getListData();
|
||||
}, []);
|
||||
|
||||
|
||||
const getListData = async () => {
|
||||
const id_no = localStorage.getItem("lastIdCardNo");
|
||||
if (!id_no) {
|
||||
alert("请先输入身份证号");
|
||||
return;
|
||||
}
|
||||
const res = await getPackagItemDetail(id_no as string);
|
||||
if (res.Status === 200) {
|
||||
// 处理数据:将 project_id 和 project_name 字符串分离为数组
|
||||
const processedData = res.Data.listPackDetail.map((item: any) => {
|
||||
// 将 project_id 字符串按中文顿号分割为数组
|
||||
const project_ids = item.project_id
|
||||
? item.project_id.split("、").map((id: string) => id.trim()).filter((id: string) => id)
|
||||
: [];
|
||||
|
||||
// 将 project_name 字符串按中文顿号分割为数组
|
||||
const project_names = item.project_name
|
||||
? item.project_name.split("、").map((name: string) => name.trim()).filter((name: string) => name)
|
||||
: [];
|
||||
|
||||
return {
|
||||
...item,
|
||||
project_ids,
|
||||
project_names,
|
||||
};
|
||||
});
|
||||
|
||||
setListData(processedData);
|
||||
setPackageInfo(res.Data.packagItemInfo);
|
||||
} else {
|
||||
alert(`获取列表数据失败: ${res.Message}`);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<div className="basic-root">
|
||||
<div className="basic-white-block">
|
||||
|
||||
Reference in New Issue
Block a user