Bläddra i källkod

主诉搜索结果容错处理

liucf 6 år sedan
förälder
incheckning
8152ae4d3e
3 ändrade filer med 7 tillägg och 4 borttagningar
  1. 3 1
      src/components/ScaleTable/index.jsx
  2. 2 1
      src/store/actions/mainSuit.js
  3. 2 2
      src/utils/config.js

+ 3 - 1
src/components/ScaleTable/index.jsx

@@ -129,7 +129,9 @@ class ScaleTable extends React.Component{
     for(let i=0; i<group.length; i++){
       let rows = group[i].rows;
       for(let j=0; j<rows.length; j++){
-        if(rows[j].required==1&& (rows[j].row.filter((it,i)=>{return !it.isSelect})).length>0){
+        // if(rows[j].required==1&& (rows[j].row.filter((it,i)=>{return !it.isSelect})).length>0){
+        // 必填项下有一项选中既可
+        if(rows[j].required==1&& (rows[j].row.filter((it,i)=>{return it.isSelect})).length==0){
           unfinish = true;
           break;
         }

+ 2 - 1
src/store/actions/mainSuit.js

@@ -360,7 +360,8 @@ export const insertSearch = (state,action)=>{
       }
     })
     // flag=1前是文本标签就替换,否则插入
-    const iftext = moduleData[inserIndx-1].tagType;
+    // const iftext = moduleData[inserIndx-1].tagType;
+    const iftext = inserIndx&&moduleData[inserIndx-1]&&moduleData[inserIndx-1].tagType;
     if(iftext==config.tagType){
        moduleData.splice(inserIndx-1,1,{id:id,name:searchData,value:searchData,tagType:config.tagType,exist:1});
      }else{

+ 2 - 2
src/utils/config.js

@@ -1,7 +1,7 @@
 // const host='http://192.168.3.1:5050';//赵
 // const host='http://192.168.3.100:5050';//王峰
-// const host='http://192.168.2.241:5050';//后端接口访问地址
-const host='http://192.168.2.236:5050';//后端接口访问地址
+const host='http://192.168.2.241:5050';//后端接口访问地址
+// const host='http://192.168.2.236:5050';//后端接口访问地址
 // const host='http://192.168.3.11:5050';//王宇
 //const host='http://192.168.2.164:8080';
 // const host='http://192.168.3.117:5050'; //周铁刚