|
@@ -573,31 +573,24 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- const loading = this.$loading({
|
|
|
|
- lock: true,
|
|
|
|
- text: 'Loading',
|
|
|
|
- spinner: 'el-icon-loading',
|
|
|
|
- background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
- });
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
if(type == 'save'){
|
|
if(type == 'save'){
|
|
this.isReady = true
|
|
this.isReady = true
|
|
}
|
|
}
|
|
if(labArr.length > 0) {
|
|
if(labArr.length > 0) {
|
|
|
|
|
|
- return this.labVerifyData(labArr, loading,type).then(() =>{
|
|
|
|
|
|
+ return this.labVerifyData(labArr,type).then(() =>{
|
|
if(this.hasNoUniqueName) {
|
|
if(this.hasNoUniqueName) {
|
|
- loading.close()
|
|
|
|
}else {
|
|
}else {
|
|
- return this.verifyDiagBase(loading,type)
|
|
|
|
|
|
+ return this.verifyDiagBase(type)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
- return this.verifyDiagBase(loading,type)
|
|
|
|
|
|
+ return this.verifyDiagBase(type)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- errorDataVerify(loading) {
|
|
|
|
|
|
+ errorDataVerify() {
|
|
for(let i = 0; i < this.disFormulaList.length; i++) { //如果有任意一项有值,就检测,所有项都没值,则删掉这条数据
|
|
for(let i = 0; i < this.disFormulaList.length; i++) { //如果有任意一项有值,就检测,所有项都没值,则删掉这条数据
|
|
if( this.disFormulaList[i].formula ) {
|
|
if( this.disFormulaList[i].formula ) {
|
|
this.disFormulaListResult.push(this.disFormulaList[i])
|
|
this.disFormulaListResult.push(this.disFormulaList[i])
|
|
@@ -757,18 +750,24 @@
|
|
if(errStrList.length >0 ||codeErrorNum > 0 ||formulaListErrNum > 0) {
|
|
if(errStrList.length >0 ||codeErrorNum > 0 ||formulaListErrNum > 0) {
|
|
this.disFeatureList = JSON.parse(JSON.stringify(disFeatureList))
|
|
this.disFeatureList = JSON.parse(JSON.stringify(disFeatureList))
|
|
this.errorTips(errorStr)
|
|
this.errorTips(errorStr)
|
|
- loading.close()
|
|
|
|
this.isReady=false
|
|
this.isReady=false
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
return true
|
|
return true
|
|
},
|
|
},
|
|
- labVerifyData(labArr, loading,type) {
|
|
|
|
|
|
+ labVerifyData(labArr,type) {
|
|
const labArrParam = {
|
|
const labArrParam = {
|
|
lisMappingSearchList : labArr
|
|
lisMappingSearchList : labArr
|
|
}
|
|
}
|
|
|
|
+ const loading = this.$loading({
|
|
|
|
+ lock: true,
|
|
|
|
+ text: 'Loading',
|
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
+ });
|
|
return api.getUniqueNameWithList(labArrParam).then((res) => {
|
|
return api.getUniqueNameWithList(labArrParam).then((res) => {
|
|
this.isReady=false
|
|
this.isReady=false
|
|
|
|
+ loading.close();
|
|
if(res.data.code === '0') {
|
|
if(res.data.code === '0') {
|
|
const data = res.data.data
|
|
const data = res.data.data
|
|
let errorStr = ''
|
|
let errorStr = ''
|
|
@@ -804,14 +803,12 @@
|
|
this.disFeatureListResult = JSON.parse(JSON.stringify(this.disFeatureListResult))
|
|
this.disFeatureListResult = JSON.parse(JSON.stringify(this.disFeatureListResult))
|
|
|
|
|
|
} else {
|
|
} else {
|
|
-
|
|
|
|
this.warning(res.data.msg)
|
|
this.warning(res.data.msg)
|
|
- loading.close()
|
|
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}).catch(()=>{ this.isReady=false;loading.close()})
|
|
}).catch(()=>{ this.isReady=false;loading.close()})
|
|
},
|
|
},
|
|
- verifyDiagBase(loading,type) {
|
|
|
|
|
|
+ verifyDiagBase(type) {
|
|
const param = {
|
|
const param = {
|
|
disFeature: this.disFeatureListResult,
|
|
disFeature: this.disFeatureListResult,
|
|
disName: this.disName,
|
|
disName: this.disName,
|
|
@@ -821,10 +818,17 @@
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- const hasErrorData = this.errorDataVerify(loading)
|
|
|
|
|
|
+ const hasErrorData = this.errorDataVerify()
|
|
if(!hasErrorData) {
|
|
if(!hasErrorData) {
|
|
return false
|
|
return false
|
|
} else {
|
|
} else {
|
|
|
|
+ const loading = this.$loading({
|
|
|
|
+ lock: true,
|
|
|
|
+ text: 'Loading',
|
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
|
+ background: 'rgba(0, 0, 0, 0.7)'
|
|
|
|
+ });
|
|
|
|
+
|
|
const diagBaseVerifyDataResult = api.diagBaseVerifyData(param)
|
|
const diagBaseVerifyDataResult = api.diagBaseVerifyData(param)
|
|
return diagBaseVerifyDataResult.then((res) => {
|
|
return diagBaseVerifyDataResult.then((res) => {
|
|
if(+res.data.code === 0) {
|
|
if(+res.data.code === 0) {
|