فهرست منبع

现病史多选展开逻辑处理

liucf 6 سال پیش
والد
کامیت
522c744560
1فایلهای تغییر یافته به همراه2 افزوده شده و 5 حذف شده
  1. 2 5
      src/containers/SpreadDrop.js

+ 2 - 5
src/containers/SpreadDrop.js

@@ -140,21 +140,18 @@ function mainSuitModule(dispatch,store,params){
 // 现病史
 function currentIll(dispatch,store,params){
   const {nones,exists,withs,exclusion,excluName,ban,noneIds} = params;
-  // const ikey = params.ikey.substr(1,1);
   const index = params.ikey;
   let ikey = getLabelIndex(index);
-  // let existsId = getIds(exists);
-  // let withsId = getIds(withs);
   let existsId = exists && exists.length>0?getIds(exists):[];
   let withsId = withs && withs.length>0?getIds(withs):[];
-  // const ids = existsId.join(",")+withsId.join(",");
   const ids = (existsId.concat(withsId)).join(",");
   let has = [],wes=[];
   //获取选中项目模板
   fetchModules(ids).then((res)=>{
     if(+res.data.code===0){
       const list = res.data.data;
-      if(list&&list.length>0){
+      // if(list&&list.length>0){
+      if(list&&JSON.stringify(list) !== '{}'){
         existsId.map((i)=>{
           // has.push(...list[i].questionMapping);
           has.push(list[i]);