|
|
@@ -6,7 +6,6 @@
|
|
|
<input
|
|
|
type="text"
|
|
|
v-model="contentParam.title"
|
|
|
- @focus="hideTip"
|
|
|
@blur="checkName"
|
|
|
/>
|
|
|
<p v-show="tipFlag" style="margin-left: 88px; color: red">
|
|
|
@@ -245,33 +244,33 @@ export default {
|
|
|
console.log(err);
|
|
|
});
|
|
|
},
|
|
|
- // 名字不重复,隐藏提示
|
|
|
- hideTip: function () {
|
|
|
- this.tipText = "资料名称不能重复,请重新输入";
|
|
|
- this.tipFlag = false;
|
|
|
- },
|
|
|
- // 检查名字是否重复 失去焦点判断
|
|
|
+ // // 名字不重复,隐藏提示
|
|
|
+ // hideTip: function () {
|
|
|
+ // this.tipText = "资料名称不能重复,请重新输入";
|
|
|
+ // this.tipFlag = false;
|
|
|
+ // },
|
|
|
checkName: function () {
|
|
|
- console.log(this.contentParam.area)
|
|
|
+ // console.log(this.contentParam.area)
|
|
|
// 去前后空格
|
|
|
- this.contentParam.title = this.contentParam.title.replace(
|
|
|
- /(^\s*)|(\s*$)/g,
|
|
|
- ""
|
|
|
- );
|
|
|
- let include = this.allDataNameList.indexOf(this.contentParam.title);
|
|
|
+ // this.contentParam.title = this.contentParam.title.replace(
|
|
|
+ // /(^\s*)|(\s*$)/g,
|
|
|
+ // ""
|
|
|
+ // );
|
|
|
+ // let include = this.allDataNameList.indexOf(this.contentParam.title);
|
|
|
if (!this.contentParam.title) {
|
|
|
- this.tipText = "资料名不能为空";
|
|
|
+ this.tipText = "标题不能为空";
|
|
|
this.tipFlag = true;
|
|
|
return;
|
|
|
- } else if (include >= 0 && !this.noticeId) {
|
|
|
- this.tipText = "资料名称不能重复,请重新输入";
|
|
|
- this.tipFlag = true;
|
|
|
- return;
|
|
|
- }
|
|
|
+ }
|
|
|
+ // else if (include >= 0 && !this.noticeId) {
|
|
|
+ // this.tipText = "资料名称不能重复,请重新输入";
|
|
|
+ // this.tipFlag = true;
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.getDataList();
|
|
|
+ // this.getDataList();
|
|
|
this.contentParam = JSON.parse(localStorage.getItem('nowPageEdit'));
|
|
|
this.noticeId = this.contentParam.id;
|
|
|
if (this.contentParam.files) {
|