|
@@ -87,18 +87,18 @@
|
|
|
</el-tooltip>
|
|
|
</td>
|
|
|
<td class="FeatureuniqueName">
|
|
|
- <!-- <el-tooltip :disabled="!item.verifyRelation&&!item.relationNull" class="item" effect="dark" :content="item.verifyRelation||item.relationNull" placement="top">
|
|
|
- <el-input class="groupTextarea"
|
|
|
+ <el-tooltip :disabled="!item.verifyUnique" class="item" effect="dark" :content="item.verifyUnique" placement="top">
|
|
|
+ <el-input class="groupTextarea inpDisabled"
|
|
|
type="textarea"
|
|
|
+ :readonly = true
|
|
|
:autosize="{ minRows: 1}"
|
|
|
- :class="{borderRed:item.verifyRelation|| item.relationNull}"
|
|
|
- :title="item.relation"
|
|
|
- v-model.trim="item.relation"
|
|
|
- @input="handleInp(index,$event,'FeatureRelate',item.type)"
|
|
|
- @focus="clickItem(index,'FeatureRelate')">
|
|
|
+ :class="{borderRed:item.uniqueName===null}"
|
|
|
+ :title="item.uniqueName"
|
|
|
+ v-model.trim="item.uniqueName"
|
|
|
+ >
|
|
|
</el-input>
|
|
|
- </el-tooltip> -->
|
|
|
- <div>{{item.uniqueName}}</div>
|
|
|
+ </el-tooltip>
|
|
|
+ <!-- <div>{{item.uniqueName}}</div> -->
|
|
|
</td>
|
|
|
<td class="FeatureResult">
|
|
|
<el-tooltip :disabled="!item.verifyResult" class="item" effect="dark" :content="item.verifyResult" placement="top">
|
|
@@ -107,8 +107,8 @@
|
|
|
:autosize="{ minRows: 1}"
|
|
|
:readonly="item.type!=3"
|
|
|
:class="{borderRed:item.verifyResult, inpDisabled:item.type!=3}"
|
|
|
- :title="item.mid_result"
|
|
|
- v-model.trim="item.mid_result"
|
|
|
+ :title="item.midResult"
|
|
|
+ v-model.trim="item.midResult"
|
|
|
@input="handleInp(index,$event,'FeatureResult')"
|
|
|
@focus="clickItem(index,'FeatureResult')">
|
|
|
</el-input>
|
|
@@ -212,7 +212,7 @@
|
|
|
code:'',
|
|
|
standard:'',
|
|
|
relation:'',
|
|
|
- mid_result:'',
|
|
|
+ midResult:'',
|
|
|
formula:'',
|
|
|
result:'',
|
|
|
uniqueName:''
|
|
@@ -225,7 +225,7 @@
|
|
|
code:'',
|
|
|
standard:'',
|
|
|
relation:'',
|
|
|
- mid_result:'',
|
|
|
+ midResult:'',
|
|
|
result:'',
|
|
|
formula:'',
|
|
|
uniqueName:''
|
|
@@ -321,9 +321,9 @@
|
|
|
code:'',
|
|
|
standard:'',
|
|
|
relation:'',
|
|
|
- mid_result:'',
|
|
|
+ midResult:'',
|
|
|
result:'',
|
|
|
- uniqueName:'1111'
|
|
|
+ uniqueName:''
|
|
|
}
|
|
|
this.disFeatureList.splice(index+1, 0, item)
|
|
|
}else if(type == 2) {
|
|
@@ -332,9 +332,9 @@
|
|
|
code:'',
|
|
|
standard:'',
|
|
|
relation:'',
|
|
|
- mid_result:'',
|
|
|
+ midResult:'',
|
|
|
result:'',
|
|
|
- uniqueName:'2222'
|
|
|
+ uniqueName:''
|
|
|
}
|
|
|
this.disFormulaList.splice(index+1, 0, item)
|
|
|
}
|
|
@@ -386,9 +386,9 @@
|
|
|
// item.standard = feature[i].standard
|
|
|
// item.relation = feature[i].associated
|
|
|
// if(item.type === 4) {
|
|
|
- // item.mid_result = ''
|
|
|
+ // item.midResult = ''
|
|
|
// } else {
|
|
|
- // item.mid_result = feature[i].mid_result
|
|
|
+ // item.midResult = feature[i].midResult
|
|
|
// }
|
|
|
// featureList.push(item)
|
|
|
// }
|
|
@@ -483,7 +483,7 @@
|
|
|
this.disFormulaListResult = []
|
|
|
let errStrList = [];
|
|
|
for(let i = 0; i < this.disFeatureList.length; i++) {
|
|
|
- if(this.disFeatureList[i].type || this.disFeatureList[i].code || this.disFeatureList[i].standard || this.disFeatureList[i].relation || this.disFeatureList[i].mid_result) {
|
|
|
+ if(this.disFeatureList[i].type || this.disFeatureList[i].code || this.disFeatureList[i].standard || this.disFeatureList[i].relation || this.disFeatureList[i].midResult) {
|
|
|
this.disFeatureListResult.push(this.disFeatureList[i])
|
|
|
}
|
|
|
}
|
|
@@ -502,7 +502,7 @@
|
|
|
code:'',
|
|
|
standard:'',
|
|
|
relation:'',
|
|
|
- mid_result:'',
|
|
|
+ midResult:'',
|
|
|
result:'',
|
|
|
formula:'',
|
|
|
uniqueName:''
|
|
@@ -541,7 +541,7 @@
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- if(disFeatureList[i].type == '3' && disFeatureList[i].mid_result && !disFeatureList[i].relation) {
|
|
|
+ if(disFeatureList[i].type == '3' && disFeatureList[i].midResult && !disFeatureList[i].relation) {
|
|
|
disFeatureList[i].relationNull = "未填写关联词"
|
|
|
const errStr = "第" + (i+ 1) +"行化验项数据填写不完整"
|
|
|
errStrList.push(errStr)
|
|
@@ -563,7 +563,7 @@
|
|
|
//导入后判断
|
|
|
|
|
|
|
|
|
- if(disFeatureList[i].type == '3' && !disFeatureList[i].mid_result ) { //化验项下面诊断公式如果有用到,判断是否填写结果项
|
|
|
+ if(disFeatureList[i].type == '3' && !disFeatureList[i].midResult ) { //化验项下面诊断公式如果有用到,判断是否填写结果项
|
|
|
const regex2 = new RegExp(`(?<=\\D|\\s?)${disFeatureList[i].code}(?=\\D|\\s?)`)
|
|
|
// const regex2 = new RegExp(`、\\s*、{1,}`)
|
|
|
// const regex2 = new RegExp(`([^0-9]|\\s{0,1})${disFeatureList[i].code}([^0-9]|\\s{0,1})`)
|
|
@@ -578,9 +578,10 @@
|
|
|
}
|
|
|
}
|
|
|
if(disFeatureList[i].type == '4' && !disFeatureList[i].relation ) { //辅检项下面诊断公式如果有用到,判断是否填写结果项(辅检结果是填在关联词列)
|
|
|
- const regex2 = new RegExp(`(?<=\\D|\\s?)${disFeatureList[i].code}(?=\\D|\\s?)`)
|
|
|
+ const regex2 = new RegExp(`(?<=\\D|\\s?)${disFeatureList[i].code.replace('.','\\.')}(?=\\D|\\s?)`)
|
|
|
+ console.log('regex2', regex2)
|
|
|
let hasError = disFormulaList.find(item => {return regex2.test(item.formula)})
|
|
|
-
|
|
|
+ console.log('hasError', hasError)
|
|
|
if(hasError) {
|
|
|
disFeatureList[i].verifyRelation = "数据异常"
|
|
|
const errStr = "第" + (i+ 1) +"行辅捡项数据异常"
|
|
@@ -593,7 +594,7 @@
|
|
|
const errStr = "疾病特征第" + (i+ 1) +"行数据异常"
|
|
|
errStrList.push(errStr)
|
|
|
}
|
|
|
- if(disFeatureList[i].mid_result &®ex1.test(disFeatureList[i].mid_result)) {
|
|
|
+ if(disFeatureList[i].midResult &®ex1.test(disFeatureList[i].midResult)) {
|
|
|
disFeatureList[i].verifyResult ='数据异常'
|
|
|
const errStr = "疾病特征第" + (i+ 1) +"行数据异常"
|
|
|
errStrList.push(errStr)
|
|
@@ -677,70 +678,122 @@
|
|
|
},
|
|
|
diagBaseVerifyData(type) {
|
|
|
//判断诊断依据先判断化验有没有公表项
|
|
|
- const labArr= []
|
|
|
+ const labArr= []
|
|
|
for (let i = 0; i < this.disFeatureListResult.length; i++) {
|
|
|
if(+this.disFeatureListResult[i].type === 3) {
|
|
|
labArr.push({index: i, mealName: this.disFeatureListResult[i].standard, itemName: this.disFeatureListResult[i].relation, uniqueName:''})
|
|
|
}
|
|
|
}
|
|
|
- api.getUniqueNameWithList(param).then((res) => {
|
|
|
- console.log('resss', res)
|
|
|
- })
|
|
|
- console.log('labArr', labArr)
|
|
|
- const loading = this.$loading({
|
|
|
+
|
|
|
+ const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: 'Loading',
|
|
|
spinner: 'el-icon-loading',
|
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
|
});
|
|
|
- setTimeout(function(){
|
|
|
- loading.close()
|
|
|
- },1000)
|
|
|
- const param = {
|
|
|
+
|
|
|
+
|
|
|
+ if(type == 'save'){
|
|
|
+ this.isReady = true
|
|
|
+ }
|
|
|
+ if(labArr.length > 0) {
|
|
|
+ this.labVerifyData(labArr, loading).then(() =>{
|
|
|
+ this.verifyDiagBase(loading)
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.verifyDiagBase(loading)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ labVerifyData(labArr, loading) {
|
|
|
+ const labArrParam = {
|
|
|
+ lisMappingSearchList : labArr
|
|
|
+ }
|
|
|
+ return api.getUniqueNameWithList(labArrParam).then((res) => {
|
|
|
+ this.isReady=false
|
|
|
+ if(res.data.code === '0') {
|
|
|
+ const data = res.data.data
|
|
|
+ for (let i = 0; i < data.length; i++ ) {
|
|
|
+ if(!data[i].uniqueName) {
|
|
|
+ this.disFeatureListResult[data[i].index].verifyUnique="公表项不存在"
|
|
|
+ } else {
|
|
|
+ this.disFeatureListResult[data[i].index].verifyUnique=""
|
|
|
+ }
|
|
|
+ this.disFeatureListResult[data[i].index].uniqueName = data[i].uniqueName
|
|
|
+ if(data[i].uniqueName) {
|
|
|
+ if(this.disFeatureListResult[data[i].index].midResult) {
|
|
|
+ let midResult = this.disFeatureListResult[data[i].index].midResult.replace(' ', '').split('、')
|
|
|
+ for (let j = 0; j < midResult.length; j++) {
|
|
|
+ if(midResult[j]) {
|
|
|
+ midResult[j] = data[i].uniqueName+midResult[j]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.disFeatureListResult[data[i].index].result = midResult.join('、')
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.disFeatureList = JSON.parse(JSON.stringify(this.disFeatureListResult))
|
|
|
+ this.disFeatureListResult = JSON.parse(JSON.stringify(this.disFeatureListResult))
|
|
|
+ console.log('this.disFeatureListResult', this.disFeatureList)
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ this.warning(res.msg)
|
|
|
+ loading.close()
|
|
|
+ }
|
|
|
+ }).catch(()=>{ this.isReady=false;loading.close()})
|
|
|
+ },
|
|
|
+ verifyDiagBase(loading) {
|
|
|
+
|
|
|
+ const param = {
|
|
|
disFeature: this.disFeatureListResult,
|
|
|
disName: this.disName,
|
|
|
disformula: this.disFormulaListResult,
|
|
|
id: this.id,
|
|
|
modifier: this.modifier
|
|
|
}
|
|
|
- if(type == 'save'){
|
|
|
- this.isReady = true
|
|
|
- }
|
|
|
return api.diagBaseVerifyData(param).then((res) => {
|
|
|
- const data = res.data.data
|
|
|
- this.isReady=false
|
|
|
- if(type =='save') {
|
|
|
- if(data.hasQuestion) {
|
|
|
- this.warning('校验完成请先调整错误数据,该数据已保存')
|
|
|
- } else {
|
|
|
- this.warning('校验成功', 'success')
|
|
|
+ if(+res.data.code === 0) {
|
|
|
+ const data = res.data.data
|
|
|
+ this.isReady=false
|
|
|
+ if(type =='save') {
|
|
|
+ if(data.hasQuestion) {
|
|
|
+ this.warning('校验完成请先调整错误数据,该数据已保存')
|
|
|
+ } else {
|
|
|
+ this.warning('校验成功', 'success')
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ this.id = data.id
|
|
|
+ this.disNameExist = data.disNameExist
|
|
|
+ this.disFeatureList = data.disFeature
|
|
|
+ if(data.disformula.length) {
|
|
|
+ this.disFormulaList = data.disformula
|
|
|
+ }else {
|
|
|
+ this.disFormulaList = [
|
|
|
+ {
|
|
|
+ type:'',
|
|
|
+ code:'',
|
|
|
+ standard:'',
|
|
|
+ relation:'',
|
|
|
+ result:'',
|
|
|
+ midResult:'',
|
|
|
+ formula:'',
|
|
|
+ uniqueName:''
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ this.hasQuestion = data.hasQuestion
|
|
|
+ } else {
|
|
|
+ this.hasQuestion = 1
|
|
|
+ this.warning(res.msg)
|
|
|
}
|
|
|
|
|
|
- this.id = data.id
|
|
|
- this.disNameExist = data.disNameExist
|
|
|
- this.disFeatureList = data.disFeature
|
|
|
- if(data.disformula.length) {
|
|
|
- this.disFormulaList = data.disformula
|
|
|
- }else {
|
|
|
- this.disFormulaList = [
|
|
|
- {
|
|
|
- type:'',
|
|
|
- code:'',
|
|
|
- standard:'',
|
|
|
- relation:'',
|
|
|
- result:'',
|
|
|
- mid_result,
|
|
|
- formula:'',
|
|
|
- uniqueName:''
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- this.hasQuestion = data.hasQuestion
|
|
|
+ loading.close()
|
|
|
|
|
|
- }).catch(()=>{this.isReady=false})
|
|
|
+ }).catch(()=>{ this.hasQuestion = false; this.isReady=false; loading.close()})
|
|
|
},
|
|
|
-
|
|
|
showConfirmDialog(msg, resolve) {
|
|
|
this.$alert(msg, '提示', {
|
|
|
confirmButtonText: '确定',
|
|
@@ -801,7 +854,7 @@
|
|
|
this.disFeatureList[index].code = ''
|
|
|
this.disFeatureList[index].standard = ''
|
|
|
this.disFeatureList[index].relation = ''
|
|
|
- this.disFeatureList[index].mid_result = ''
|
|
|
+ this.disFeatureList[index].midResult = ''
|
|
|
this.disFeatureList[index].result = ''
|
|
|
this.disFeatureList[index].formula = ''
|
|
|
this.disFeatureList[index].uniqueName = ''
|