Explorar o código

主诉普通多选事件处理调整;filterDataArr去掉空格

liucf %!s(int64=6) %!d(string=hai) anos
pai
achega
57d6b5d850

+ 5 - 3
src/containers/SpreadDrop.js

@@ -292,8 +292,10 @@ function handleModuleDiff(dispatch,store,params){
 
 //主诉普通多选确定
 function mainSuitCheck(dispatch,store,params){
-  const {nones,exists,withs,order,mainSaveText,value} = params;
+  const {nones,exists,withs,order,mainSaveText,value,ikey} = params;
   let existsName = getNames(exists,order);
+  let withsName = getNames(withs);
+  let labelInx = getLabelIndex(ikey);
   let text = filterDataArr(mainSaveText);
   /*if(text.length >= config.limited){
     Notify.info(config.limitText);
@@ -305,8 +307,8 @@ function mainSuitCheck(dispatch,store,params){
     Notify.info(config.limitText);
     return
   }
-  const index = params.ikey;
-  let ikey = getLabelIndex(index);
+  // const index = params.ikey;
+  // let ikey = getLabelIndex(index);
   dispatch({
     type: COMM_CONFIRM,
     // data: {exists:exists,existsName:existsName,ikey}

+ 1 - 1
src/store/actions/checkBody.js

@@ -205,7 +205,7 @@ export function setCheckText(state,action) {
 export function setCheckBoxValue(state,action) {
   let res = Object.assign({},state);
   const {labelInx,excluName,existsName,nones,withsName,ban} = action.data;
-  let showText = (excluName||'')+(existsName||'')+(ban.name||'')+(withsName||'')+(nones||'');
+  let showText = (excluName||'')+(existsName||'')+(ban.name||'')+(withsName||'')+(nones&&nones.replace('、','')||'');
   // 若每个选项都有符号,去掉最后一个,因与标签间的符号有冲突
   let pattern = new RegExp(/\,+$|\,+$|\.+$|\。+$|\、+$/);//+ 一次或多次
   if(pattern.test(showText)){

+ 1 - 1
src/store/actions/currentIll.js

@@ -371,7 +371,7 @@ export const setCheckBox = (state,action)=>{
   const res = Object.assign({},state);
   const {labelInx,excluName,existsName,nones,withsName,ban} = action.data;
   // 若每个选项都有符号,去掉最后一个,因与标签间的符号有冲突
-  let showText = (excluName||'')+(existsName||'')+(ban.name||'')+(withsName||'')+(nones||'');
+  let showText = (excluName||'')+(existsName||'')+(ban.name||'')+(withsName||'')+(nones&&nones.replace('、','')||'');
   let pattern = new RegExp(/\,+$|\,+$|\.+$|\。+$|\、+$/);//+ 一次或多次
   if(pattern.test(showText)){
     showText = showText.substr(0,showText.length-1);

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

@@ -266,7 +266,7 @@ export const commConfirm=(state,action)=>{
   const res = Object.assign({},state);
   const {labelInx,excluName,existsName,nones,withsName,ban} = action.data;
   // 若每个选项都有符号,去掉最后一个,因与标签间的符号有冲突
-  let showText = (excluName||'')+(existsName||'')+(ban.name||'')+(withsName||'')+(nones||'');
+  let showText = (excluName||'')+(existsName||'')+(ban.name||'')+(withsName||'')+(nones&&nones.replace('、','')||'');
   let pattern = new RegExp(/\,+$|\,+$|\.+$|\。+$|\、+$/);//+ 一次或多次
   if(pattern.test(showText)){
     showText = showText.substr(0,showText.length-1);

+ 1 - 1
src/store/actions/otherHistory.js

@@ -199,7 +199,7 @@ export function setCheckBoxValue(state,action) {
   const res = Object.assign({},state);
   const {labelInx,excluName,existsName,nones,withsName,ban} = action.data;
   // 若每个选项都有符号,去掉最后一个,因与标签间的符号有冲突
-  let showText = (excluName||'')+(existsName||'')+(ban.name||'')+(withsName||'')+(nones||'');
+  let showText = (excluName||'')+(existsName||'')+(ban.name||'')+(withsName||'')+(nones&&nones.replace('、','')||'');
   let pattern = new RegExp(/\,+$|\,+$|\.+$|\。+$|\、+$/);//+ 一次或多次
   if(pattern.test(showText)){
     showText = showText.substr(0,showText.length-1);

+ 1 - 1
src/utils/tools.js

@@ -557,7 +557,7 @@ function filterOtherDataArr(arrTmp,jsonArr){
 function trimDots(str){
   return str.replace(config.punReg,function(word){
     return word.substr(0,1);
-  }).replace(/^[,,.。::"“??”;;、!!]+/,'');
+  }).replace(/^[,,.。::"“??”;;、!!\s]+/,'');
 }
 
 // 取消默认行为