|
@@ -676,28 +676,37 @@
|
|
|
//导入后判断
|
|
|
|
|
|
|
|
|
- if(disFeatureList[i].type == '3' && !disFeatureList[i].midResult ) { //化验项下面诊断公式如果有用到,判断是否填写结果项
|
|
|
- const regex2 = new RegExp(`(?<=\\D|\\b)${disFeatureList[i].code.replace('.','\\.')}(?=\\D|\\b)`) //序号+前面是单词边界或者是非数字+后面是单词边界或者是非数字
|
|
|
- // const regex2 = new RegExp(`、\\s*、{1,}`)
|
|
|
- // const regex2 = new RegExp(`([^0-9]|\\s{0,1})${disFeatureList[i].code}([^0-9]|\\s{0,1})`)
|
|
|
- let hasError = disFormulaList.find(item => {return regex2.test(item.formula)})
|
|
|
- if(hasError) {
|
|
|
- if(!disFeatureList[i].relation) {
|
|
|
- disFeatureList[i].verifyRelation = "数据异常"
|
|
|
- }
|
|
|
- disFeatureList[i].verifyResult = "数据异常"
|
|
|
- const errStr = "第" + (i+ 1) +"行化验项数据异常"
|
|
|
- errStrList.push(errStr)
|
|
|
+ if(disFeatureList[i].type == '3') {
|
|
|
+ disFeatureList[i].verifyRelation = ""
|
|
|
+ disFeatureList[i].verifyResult = ""
|
|
|
+ if(!disFeatureList[i].midResult ) {//化验项下面诊断公式如果有用到,判断是否填写结果项
|
|
|
+ const regex2 = new RegExp(`(?<=\\D|\\b)${disFeatureList[i].code.replace('.','\\.')}(?=\\D|\\b)`) //序号+前面是单词边界或者是非数字+后面是单词边界或者是非数字
|
|
|
+ // const regex2 = new RegExp(`、\\s*、{1,}`)
|
|
|
+ // const regex2 = new RegExp(`([^0-9]|\\s{0,1})${disFeatureList[i].code}([^0-9]|\\s{0,1})`)
|
|
|
+ let hasError = disFormulaList.find(item => {return regex2.test(item.formula)})
|
|
|
+ if(hasError) {
|
|
|
+ if(!disFeatureList[i].relation) {
|
|
|
+ disFeatureList[i].verifyRelation = "数据异常"
|
|
|
+ }
|
|
|
+ disFeatureList[i].verifyResult = "数据异常"
|
|
|
+ const errStr = "第" + (i+ 1) +"行化验项数据异常"
|
|
|
+ errStrList.push(errStr)
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
- if(disFeatureList[i].type == '4' && !disFeatureList[i].relation ) { //辅检项下面诊断公式如果有用到,判断是否填写结果项(辅检结果是填在关联词列)
|
|
|
- const regex2 = new RegExp(`(?<=\\D|\\b)${disFeatureList[i].code.replace('.','\\.')}(?=\\D|\\b)`)
|
|
|
- let hasError = disFormulaList.find(item => {return regex2.test(item.formula)})
|
|
|
- if(hasError) {
|
|
|
- disFeatureList[i].verifyRelation = "数据异常"
|
|
|
- const errStr = "第" + (i+ 1) +"行辅捡项数据异常"
|
|
|
- errStrList.push(errStr)
|
|
|
+ if(disFeatureList[i].type == '4') {
|
|
|
+ disFeatureList[i].verifyRelation = ""
|
|
|
+ if(!disFeatureList[i].relation) { //辅检项下面诊断公式如果有用到,判断是否填写结果项(辅检结果是填在关联词列)
|
|
|
+ const regex2 = new RegExp(`(?<=\\D|\\b)${disFeatureList[i].code.replace('.','\\.')}(?=\\D|\\b)`)
|
|
|
+ let hasError = disFormulaList.find(item => {return regex2.test(item.formula)})
|
|
|
+ if(hasError) {
|
|
|
+ disFeatureList[i].verifyRelation = "数据异常"
|
|
|
+ const errStr = "第" + (i+ 1) +"行辅捡项数据异常"
|
|
|
+ errStrList.push(errStr)
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
let regex1 =new RegExp(`、\\s*、{1,}|^、|、$`)
|
|
|
if(disFeatureList[i].relation &®ex1.test(disFeatureList[i].relation)) { //不能输入连续的、,前后也不能是、
|