|
@@ -72,7 +72,7 @@
|
|
|
</tr>
|
|
|
</table>
|
|
|
<p class="moduleTitle">诊断公式:</p>
|
|
|
- <p class="inpTips">可输入数字(0~9)规定内汉字:任、一、二、三、四、五、六、七、八、九、十,其余汉字不可输入;可输入的符号:“.”、“/”、“()”</p>
|
|
|
+ <p class="inpTips">可输入数字(0~9)规定内汉字:任、一、二、三、四、五、六、七、八、九、十,其余汉字不可输入;可输入的符号:“.”、“/”、“()”,确诊还可输入拟、诊</p>
|
|
|
<table class="diagTable">
|
|
|
<tr class="tableTitle">
|
|
|
<td class="FormulaSort">排序</td>
|
|
@@ -89,7 +89,7 @@
|
|
|
</td>
|
|
|
<td class="FormulaNumber">
|
|
|
<el-tooltip :disabled="!item.verifyFormula" class="item" effect="dark" :content="item.verifyFormula" placement="top">
|
|
|
- <input class="groupInput" :class="{borderRed:item.verifyFormula}" :title="item.formula" type="text" v-model.trim="item.formula" @input="handleInp(index,$event,'FormulaNumber')" @click="clickItem(index,'FormulaNumber')">
|
|
|
+ <input class="groupInput" :readonly="!item.type" :class="{borderRed:item.verifyFormula,inpDisabled:!item.type}" :title="item.formula" type="text" v-model.trim="item.formula" @input="handleInp(index,$event,'FormulaNumber',item.type)" @click="clickItem(index,'FormulaNumber')">
|
|
|
</el-tooltip>
|
|
|
</td>
|
|
|
<td class="FeatureOpera">
|
|
@@ -306,7 +306,7 @@
|
|
|
diagnoseId: this.id
|
|
|
}
|
|
|
api.exportDiagnosticAll(param).then((res) => {
|
|
|
- utils.downloadExportedData(res.data,'诊断依据');
|
|
|
+ utils.downloadExportedData(res.data,'诊断依据.xls');
|
|
|
})
|
|
|
}else {
|
|
|
this.warning('导出失败');
|
|
@@ -369,13 +369,34 @@
|
|
|
const errStr = "第" + (i+ 1) +"行化验项数据填写不完整"
|
|
|
errStrList.push(errStr)
|
|
|
}
|
|
|
- let regex =new RegExp(`${disFeatureList[i].type}\\.[1-9]\\d?`)
|
|
|
- if(disFeatureList[i].code &&!regex.test(disFeatureList[i].code)) {
|
|
|
+ let regex =new RegExp(`${disFeatureList[i].type}\\.(0|[1-9]\\d?)`)
|
|
|
+ if(disFeatureList[i].code &&!regex.test(disFeatureList[i].code)) { //序号和类型不匹配
|
|
|
codeErrorNum++
|
|
|
disFeatureList[i].codeError = "序号和类型不匹配"
|
|
|
const errStr = "疾病特征第" + (i+ 1) +"行序号和类型不匹配"
|
|
|
errStrList.push(errStr)
|
|
|
- }
|
|
|
+ } else { //序号和类型匹配但序号重复
|
|
|
+ let codeArr = disFeatureList.filter(item => item.code ===disFeatureList[i].code)
|
|
|
+ if(codeArr.length > 1) {
|
|
|
+ codeErrorNum++
|
|
|
+ disFeatureList[i].codeError = "序号重复"
|
|
|
+ const errStr = "疾病特征第" + (i+ 1) +"行序号重复"
|
|
|
+ errStrList.push(errStr)
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ let regex1 =new RegExp(`、\\s*、{1,}`)
|
|
|
+ if(disFeatureList[i].relation &®ex1.test(disFeatureList[i].relation)) {
|
|
|
+ disFeatureList[i].verifyRelation ='数据异常'
|
|
|
+ const errStr = "疾病特征第" + (i+ 1) +"行数据异常"
|
|
|
+ errStrList.push(errStr)
|
|
|
+ }
|
|
|
+ if(disFeatureList[i].result &®ex1.test(disFeatureList[i].result)) {
|
|
|
+ disFeatureList[i].verifyResult ='数据异常'
|
|
|
+ const errStr = "疾病特征第" + (i+ 1) +"行数据异常"
|
|
|
+ errStrList.push(errStr)
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
this.disFeatureList = JSON.parse(JSON.stringify(disFeatureList))
|
|
@@ -387,10 +408,21 @@
|
|
|
const errStr = "诊断公式第" + (i+ 1) +"行诊断公式不能为空"
|
|
|
errStrList.push(errStr)
|
|
|
} else if(disFormulaList[i].formula&&!disFormulaList[i].type) {
|
|
|
- disFormulaList[i].verifyType = "诊断类型不能为空"
|
|
|
+ disFormulaList[i].verifyType = "诊断类型不能为空"
|
|
|
const errStr = "诊断公式第" + (i+ 1) +"行诊断类型不能为空"
|
|
|
- errStrList.push(errStr)
|
|
|
- formulaListErrNum++;
|
|
|
+ errStrList.push(errStr)
|
|
|
+ formulaListErrNum++;
|
|
|
+ }
|
|
|
+ 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 = "公式格式错误"
|
|
|
+ const errStr = "诊断公式第" + (i+ 1) +"行公式格式错误"
|
|
|
+ errStrList.push(errStr)
|
|
|
+ formulaListErrNum++;
|
|
|
+ } else {
|
|
|
+ disFormulaList[i].verifyFormula = ""
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if(disFormulaList.length) {
|
|
@@ -431,7 +463,7 @@
|
|
|
const data = res.data.data
|
|
|
if(type =='save') {
|
|
|
if(data.hasQuestion) {
|
|
|
- this.warning('校验完成请先调整问题词,该数据已保存')
|
|
|
+ this.warning('校验完成请先调整错误数据,该数据已保存')
|
|
|
} else {
|
|
|
this.warning('校验成功', 'success')
|
|
|
}
|
|
@@ -481,8 +513,14 @@
|
|
|
} else if(type==='FeatureStand') { //关联词不能输入顿号
|
|
|
this.disFeatureList[index].standard = value.replace(/、/g,'')
|
|
|
} else if ( type === 'FormulaNumber') {
|
|
|
- //计算公式只能输入以下内容: 任、一、二、三、四、五、六、七、八、九、十、0-9、/、.、(、)、(、)
|
|
|
- this.disFormulaList[index].formula = value.replace(/[^\u4EFB\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D\u53410-9\/\.+\(\)\(\)]/g,'').replace(/[\(]/g, '(').replace(/[\)]/g, ')').replace(/' '/g, '')
|
|
|
+ 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, '')
|
|
|
+ } else { //计算公式其他只能输入以下内容: 任、一、二、三、四、五、六、七、八、九、十、0-9、/、.、(、)、(、)
|
|
|
+ this.disFormulaList[index].formula = value.replace(/[^\u4EFB\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D\u53410-9\/\.+\(\)\(\)]/g,'').replace(/[\(]/g, '(').replace(/[\)]/g, ')').replace(/' '/g, '')
|
|
|
+
|
|
|
+ }
|
|
|
} else if ( type === 'FeatureRelate') {
|
|
|
if(itemType == 3) {
|
|
|
this.disFeatureList[index].relation = value.replace(/、/g,'')
|
|
@@ -670,7 +708,7 @@
|
|
|
color: red;
|
|
|
}
|
|
|
.borderRed {
|
|
|
- border: 1px solid red !important;
|
|
|
+ border: 3px solid red ;
|
|
|
}
|
|
|
.colorRed {
|
|
|
color: red;
|