|
@@ -12,35 +12,36 @@ DataMap = {
|
|
|
};
|
|
|
|
|
|
async function inportDapartAndDoctor() {
|
|
|
- // 导入药品数据
|
|
|
- // let drugList = DrugList;
|
|
|
- // for (let index = 0; index < drugList.length; index++) {
|
|
|
- // let drug = drugList[index];
|
|
|
- // drug = await importObject("Drug", drug);
|
|
|
- // }
|
|
|
+ 导入药品数据
|
|
|
+ let drugList = DrugList;
|
|
|
+ for (let index = 0; index < drugList.length; index++) {
|
|
|
+ let drug = drugList[index];
|
|
|
+ drug = await importObject("Drug", drug);
|
|
|
+ }
|
|
|
|
|
|
- // 如果需要导入其他数据(科室、医生、热点),可以取消注释以下代码
|
|
|
+ //如果需要导入其他数据(科室、医生、热点),可以取消注释以下代码
|
|
|
|
|
|
- // // 导入科室数据
|
|
|
- // let departList = DepartList;
|
|
|
- // for (let index = 0; index < departList.length; index++) {
|
|
|
- // let depart = departList[index];
|
|
|
- // depart = await importObject("Department", depart);
|
|
|
- // }
|
|
|
+ // 导入科室数据
|
|
|
+ let departList = DepartList;
|
|
|
+ for (let index = 0; index < departList.length; index++) {
|
|
|
+ let depart = departList[index];
|
|
|
+ depart = await importObject("Department", depart);
|
|
|
+ }
|
|
|
|
|
|
- // // 导入医生数据
|
|
|
- // let doctorList = DoctorList;
|
|
|
- // for (let index = 0; index < doctorList.length; index++) {
|
|
|
- // let doctor = doctorList[index];
|
|
|
- // doctor = await importObject("Doctor", doctor);
|
|
|
- // }
|
|
|
+ // 导入医生数据
|
|
|
+ let doctorList = DoctorList;
|
|
|
+ for (let index = 0; index < doctorList.length; index++) {
|
|
|
+ let doctor = doctorList[index];
|
|
|
+ doctor = await importObject("Doctor", doctor);
|
|
|
+ }
|
|
|
|
|
|
- // 导入热点数据
|
|
|
+ 导入热点数据
|
|
|
let hotDotList = HotDotList;
|
|
|
for (let index = 0; index < hotDotList.length; index++) {
|
|
|
let hotDot = hotDotList[index];
|
|
|
hotDot = await importObject("HotDot", hotDot);
|
|
|
}
|
|
|
+
|
|
|
console.log("药品数据导入完成");
|
|
|
}
|
|
|
|