zhouna 4 vuotta sitten
vanhempi
commit
eb33e2fb03
1 muutettua tiedostoa jossa 8 lisäystä ja 6 poistoa
  1. 8 6
      src/components/DiagnosticItem/index.jsx

+ 8 - 6
src/components/DiagnosticItem/index.jsx

@@ -47,12 +47,14 @@ class DiagnosticItem extends Component{
     }
     chooseDiagodal(item) {
         const { diagnosticList,isTcm,tcmList,showSym} = this.props;
-        if(isTcm&&showSym){ //添加的是中医症候,判断是否重复,添加中医诊断不需要判断
-            const lastTcmDiag = tcmList[tcmList.length-1].tcmDiag;
-            for (let i = 0; i < tcmList.length-1; i++) {
-                if(tcmList[i].tcmDiag+tcmList[i].tcmSyndrome=== lastTcmDiag+item.name) {
-                    Notify.info('该中医诊断+中医证候已存在');
-                    return
+        if(isTcm){ //添加的是中医症候,判断是否重复,添加中医诊断不需要判断
+            if(showSym){
+                const lastTcmDiag = tcmList[tcmList.length-1].tcmDiag;
+                for (let i = 0; i < tcmList.length-1; i++) {
+                    if(tcmList[i].tcmDiag+tcmList[i].tcmSyndrome=== lastTcmDiag+item.name) {
+                        Notify.info('该中医诊断+中医证候已存在');
+                        return
+                    }
                 }
             }
         }else{