|
@@ -753,7 +753,6 @@ export default {
|
|
this.allwords.splice(index, 1);
|
|
this.allwords.splice(index, 1);
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- console.log(2222)
|
|
|
|
this.synonymous.splice(index, 1);
|
|
this.synonymous.splice(index, 1);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -763,7 +762,7 @@ export default {
|
|
this.warning('请输入标准词');
|
|
this.warning('请输入标准词');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- if (!this.data.type && !this.unfit) {
|
|
|
|
|
|
+ if (!this.data.code && !this.unfit) {
|
|
this.warning('请选择术语类型');
|
|
this.warning('请选择术语类型');
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -827,6 +826,14 @@ export default {
|
|
}
|
|
}
|
|
// 校验是否有名称全为数字
|
|
// 校验是否有名称全为数字
|
|
const pattern = /[^0-9]/g;
|
|
const pattern = /[^0-9]/g;
|
|
|
|
+ const tmpData = this.data.name
|
|
|
|
+ if(tmpData&&!tmpData.match(pattern)){
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '无法输入纯数字,请输入正确数据!',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
for (let d = 0; d < detailList.length; d++) {
|
|
for (let d = 0; d < detailList.length; d++) {
|
|
let dname = detailList[d].name;
|
|
let dname = detailList[d].name;
|
|
// if(detailList[d].name && !pattern.test(detailList[d].name)){
|
|
// if(detailList[d].name && !pattern.test(detailList[d].name)){
|
|
@@ -898,7 +905,7 @@ export default {
|
|
klConceptSub: detailList||[],
|
|
klConceptSub: detailList||[],
|
|
};
|
|
};
|
|
}
|
|
}
|
|
- console.log(this.data)
|
|
|
|
|
|
+ // console.log(this.data)
|
|
// return false
|
|
// return false
|
|
this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
this.saveDisable = true; //提交保存按钮不可点击,返回结果时才可点击,防止频繁发送请求
|
|
api.saveBaseConceptInfo(params).then(res => {
|
|
api.saveBaseConceptInfo(params).then(res => {
|