|
@@ -15,6 +15,7 @@ import config from '@config/index.js';
|
|
|
function mapStateToProps(state){
|
|
|
return {
|
|
|
mainSaveText:state.mainSuit.saveText,
|
|
|
+ mainData:state.mainSuit.data,
|
|
|
}
|
|
|
}
|
|
|
//查体数字键盘选中
|
|
@@ -47,13 +48,22 @@ function currentSelect(dispatch,params){
|
|
|
}
|
|
|
|
|
|
function handleModuleDiff(dispatch,params){
|
|
|
- const {mainSaveText,mark} = params;
|
|
|
+ const {mainSaveText,mark,mainData} = params;
|
|
|
const type = params.ikey.substr(0,1); //当前所在的项目
|
|
|
+ let ikey = getLabelIndex(params.ikey);
|
|
|
switch (+type){
|
|
|
case 1:
|
|
|
if(mark){//选中才限制,清空和回退无需验证
|
|
|
- let text = filterDataArr(mainSaveText);
|
|
|
- if(text.length >= config.limited){
|
|
|
+ // let text = filterDataArr(mainSaveText);
|
|
|
+ let text = filterArr(mainSaveText);
|
|
|
+ const item = mainData[+ikey];
|
|
|
+ const nextItem = mainData[+ikey+1];
|
|
|
+ let lengths = text.length;
|
|
|
+ if(nextItem&&nextItem.tagType==8 && nextItem.tagName==',' && item.value){
|
|
|
+ lengths = text.length + 1;
|
|
|
+ }
|
|
|
+ // console.log(999,mainSaveText,lengths);
|
|
|
+ if(lengths >= config.limited){
|
|
|
Notify.info(config.limitText);
|
|
|
return
|
|
|
}
|
|
@@ -135,7 +145,9 @@ function mapDispatchToProps(dispatch,store){
|
|
|
type:ISREAD
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+ dispatch({
|
|
|
+ type: ISREAD
|
|
|
+ });
|
|
|
},
|
|
|
handleDbclick(obj){
|
|
|
dispatch({
|