|
|
@@ -216,11 +216,13 @@ export default {
|
|
|
// 检查名字是否重复 失去焦点判断
|
|
|
checkName: function () {
|
|
|
let include = this.allDataNameList.indexOf(this.inforName);
|
|
|
+ console.log(this.allDataNameList, 'all');
|
|
|
+ console.log(include);
|
|
|
if (!this.inforName) {
|
|
|
this.tipText = "资料名不能为空";
|
|
|
this.tipFlag = true;
|
|
|
return;
|
|
|
- } else if (include > 0) {
|
|
|
+ } else if (include >= 0) {
|
|
|
this.tipText = "资料名称不能重复,请重新输入";
|
|
|
this.tipFlag = true;
|
|
|
return;
|