|
@@ -22,7 +22,7 @@
|
|
|
</li>
|
|
|
</ul>
|
|
|
</el-form-item>
|
|
|
- <el-form-item class="isRequired" label="已选添加疾病名称:">
|
|
|
+ <el-form-item class="isRequired" label="已选添加疾病名称:" :class="{colorRed: !disNameExist}">
|
|
|
{{disName}}
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -170,6 +170,7 @@
|
|
|
isEdit: false,
|
|
|
saveDisable: false ,
|
|
|
hasQuestion: 1, //是否有问题词
|
|
|
+ disNameExist: false //诊断名称是否存在
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -183,6 +184,7 @@
|
|
|
this.titleText = '修改';
|
|
|
this.disName = data.disName
|
|
|
this.id = data.id
|
|
|
+ this.disNameExist = data.disNameExist
|
|
|
if(data.disFeature.length) {
|
|
|
this.disFeatureList = data.disFeature
|
|
|
}
|
|
@@ -364,12 +366,7 @@
|
|
|
const errStr = "第" + (i+ 1) +"行必填项未填写"
|
|
|
errStrList.push(errStr)
|
|
|
}
|
|
|
- if(disFeatureList[i].type == '3' && disFeatureList[i].result && !disFeatureList[i].relation) {
|
|
|
- disFeatureList[i].relationNull = "未填写关联词"
|
|
|
- const errStr = "第" + (i+ 1) +"行化验项数据填写不完整"
|
|
|
- errStrList.push(errStr)
|
|
|
- }
|
|
|
- let regex =new RegExp(`${disFeatureList[i].type}\\.(0|[1-9]\\d?)`)
|
|
|
+ let regex =new RegExp(`^${disFeatureList[i].type}\\.(0|[1-9]\\d?)$`,)
|
|
|
if(disFeatureList[i].code &&!regex.test(disFeatureList[i].code)) { //序号和类型不匹配
|
|
|
codeErrorNum++
|
|
|
disFeatureList[i].codeError = "序号和类型不匹配"
|
|
@@ -385,8 +382,29 @@
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+ if(disFeatureList[i].type == '3' && disFeatureList[i].result && !disFeatureList[i].relation) {
|
|
|
+ disFeatureList[i].relationNull = "未填写关联词"
|
|
|
+ const errStr = "第" + (i+ 1) +"行化验项数据填写不完整"
|
|
|
+ errStrList.push(errStr)
|
|
|
+ }
|
|
|
+ if(disFeatureList[i].type == '3' && !disFeatureList[i].result ) { //化验项下面诊断公式如果有用到,判断是否填写结果项
|
|
|
+ let hasError = disFormulaList.find(item => item.formula.indexOf(disFeatureList[i].code) > 1)
|
|
|
+ if(hasError) {
|
|
|
+ disFeatureList[i].verifyResult = "数据异常"
|
|
|
+ const errStr = "第" + (i+ 1) +"行化验项数据异常"
|
|
|
+ errStrList.push(errStr)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(disFeatureList[i].type == '4' && !disFeatureList[i].relation ) { //辅检项下面诊断公式如果有用到,判断是否填写结果项(辅检结果是填在关联词列)
|
|
|
+ let hasError = disFormulaList.find(item => item.formula.indexOf(disFeatureList[i].code) > 1)
|
|
|
+ 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)) {
|
|
|
+ if(disFeatureList[i].relation &®ex1.test(disFeatureList[i].relation)) { //不能输入连续的、
|
|
|
disFeatureList[i].verifyRelation ='数据异常'
|
|
|
const errStr = "疾病特征第" + (i+ 1) +"行数据异常"
|
|
|
errStrList.push(errStr)
|
|
@@ -413,7 +431,7 @@
|
|
|
errStrList.push(errStr)
|
|
|
formulaListErrNum++;
|
|
|
}
|
|
|
- if(disFormulaList[i].type == 91 && disFormulaList[i].formula.indexOf("拟诊") > -1) {
|
|
|
+ if(disFormulaList[i].type == 91 && disFormulaList[i].formula.indexOf("拟诊") > -1) { //确诊项如果有拟诊这两个字,判断公式列表中有没有拟诊这项
|
|
|
const noError = disFormulaList.filter(item => item.type == 92).length > 0
|
|
|
if(!noError) {
|
|
|
disFormulaList[i].verifyFormula = "公式格式错误"
|
|
@@ -470,6 +488,7 @@
|
|
|
}
|
|
|
|
|
|
this.id = data.id
|
|
|
+ this.disNameExist = data.disNameExist
|
|
|
this.disFeatureList = data.disFeature
|
|
|
if(data.disformula.length) {
|
|
|
this.disFormulaList = data.disformula
|
|
@@ -513,7 +532,6 @@
|
|
|
} else if(type==='FeatureStand') { //关联词不能输入顿号
|
|
|
this.disFeatureList[index].standard = value.replace(/、/g,'')
|
|
|
} else if ( type === 'FormulaNumber') {
|
|
|
- console.log(itemType, 555555555)
|
|
|
//计算公式确诊只能输入以下内容: 任、一、二、三、四、五、六、七、八、九、十、拟、诊、0-9、/、.、(、)、(、)
|
|
|
if(itemType == 91) {
|
|
|
this.disFormulaList[index].formula = value.replace(/[^\u4EFB\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D\u5341\u62df\u8bca0-9\/\.+\(\)\(\)]/g,'').replace(/[\(]/g, '(').replace(/[\)]/g, ')').replace(/' '/g, '')
|
|
@@ -765,10 +783,10 @@
|
|
|
}
|
|
|
.selectType {
|
|
|
input {
|
|
|
- border: 1px solid red;
|
|
|
+ border: 3px solid red;
|
|
|
}
|
|
|
input:hover {
|
|
|
- border: 1px solid red;
|
|
|
+ border: 3px solid red;
|
|
|
}
|
|
|
}
|
|
|
.moduleTitle {
|