|
@@ -11,7 +11,7 @@
|
|
|
<el-form-item label="网站名称:" :label-width="formLabelWidth" prop="website_name"
|
|
|
class="custom-align-right">
|
|
|
<el-input v-model="form.website_name" autocomplete="off"
|
|
|
- @change="checkWebsiteName(form.website_name)" placeholder="请输入网站名称"></el-input>
|
|
|
+ @change="checkWebsiteName(form.website_name,0)" placeholder="请输入网站名称"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="网站地址1:" :label-width="formLabelWidth" prop="website_url[0].url"
|
|
|
class="custom-align-right">
|
|
@@ -163,6 +163,11 @@
|
|
|
<el-input type="textarea" v-model="form.suffix" class="custom-textarea"
|
|
|
placeholder="请输入网站后缀"></el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="网站名称缩写:" :label-width="formLabelWidth" prop="ad_key"
|
|
|
+ class="custom-align-right">
|
|
|
+ <el-input v-model="form.ad_key" autocomplete="off"
|
|
|
+ @change="checkWebsiteName(form.ad_key,0)" placeholder="请输入网站名称缩写"></el-input>
|
|
|
+ </el-form-item>
|
|
|
</div>
|
|
|
</el-form>
|
|
|
</el-row>
|
|
@@ -420,6 +425,7 @@ export default {
|
|
|
keywords: "",//需要提交的网站标题
|
|
|
description: "",//需要提交的网站描述
|
|
|
suffix: "",//需要提交的网站后缀
|
|
|
+ ad_key: "",//需要提交的网站名称缩写
|
|
|
//template_id:""//选择的网站皮肤
|
|
|
},
|
|
|
//3.2 表单验证规则
|
|
@@ -442,6 +448,7 @@ export default {
|
|
|
logoUrl: [{ required: true, trigger: 'blur', message: "该项不能为空!" }],
|
|
|
suffix: [{ required: true, trigger: 'blur', message: "该项不能为空!" }],
|
|
|
//template_id:[{required:true,trigger:'blur',validator:validateEmpty}],
|
|
|
+ ad_key: [{ required: true, trigger: 'blur', message: "该项不能为空!" }],
|
|
|
},
|
|
|
//3.3 通过api获的的数据 弹窗
|
|
|
website_column_arr: [],//api获得的网系列表
|
|
@@ -821,9 +828,10 @@ export default {
|
|
|
console.log(this.form)
|
|
|
//提交表单
|
|
|
this.$store.dispatch('pool/addWebsite', this.form).then(res => {
|
|
|
- console.log(333);
|
|
|
-
|
|
|
+
|
|
|
+ // console.log("55555555555555555",res.code == 200)
|
|
|
if (res.code == 200) {
|
|
|
+ // console.log(333);
|
|
|
//汇报结果
|
|
|
// this.$message({
|
|
|
// type: 'success',
|
|
@@ -832,7 +840,7 @@ export default {
|
|
|
this.ruleForm.website_id = res.data.id;
|
|
|
this.getfootInfo()
|
|
|
//重新获取表单
|
|
|
- this.getData();
|
|
|
+ // this.getData();
|
|
|
//清空并退出
|
|
|
this.closeWindow();
|
|
|
} else {
|
|
@@ -854,10 +862,18 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
//3.8 检测网站名称是否存在
|
|
|
- checkWebsiteName(name) {
|
|
|
- let data = {
|
|
|
- website_name: name
|
|
|
+ checkWebsiteName(name,num) {
|
|
|
+ let data = {}
|
|
|
+ if(num == 0){
|
|
|
+ data = {
|
|
|
+ website_name: name
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ data = {
|
|
|
+ ad_key: name,
|
|
|
+ }
|
|
|
}
|
|
|
+ console.log("gjsrolighjorsihg",data)
|
|
|
if (this.editId != "") {
|
|
|
data.id = this.editId;
|
|
|
}
|
|
@@ -939,7 +955,7 @@ export default {
|
|
|
//重新请求列表
|
|
|
// this.getData();
|
|
|
} else {
|
|
|
- this.$message.error('网站信息修改失败!')
|
|
|
+ this.$message.error(res.message)
|
|
|
//清空并退出
|
|
|
// this.closeWindow();
|
|
|
}
|