|
@@ -118,6 +118,33 @@
|
|
|
<el-input v-model="ruleForm.table_name" placeholder="请输入表名(小写字母和下划线:complaints_report)" :disabled="dialogName === '编辑表单'">
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="关键词:" prop="keywords" class="custom-align-right">
|
|
|
+ <template #label>
|
|
|
+ <span class="askBox">
|
|
|
+ 表单关键词:
|
|
|
+ <el-tooltip class="item" effect="dark" content="表单关键词如:三农市场网、全国三农、信息一体化"
|
|
|
+ placement="top">
|
|
|
+ <i class="el-icon-question"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <el-input v-model="ruleForm.keywords" placeholder="请输入关键词" >
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="表单描述:" prop="description"
|
|
|
+ class="custom-align-right">
|
|
|
+ <template #label>
|
|
|
+ <span class="askBox">
|
|
|
+ 表单描述:
|
|
|
+ <el-tooltip class="item" effect="dark" content="表单描述,如:中国三农市场网创建以来,社会效益和会员经济效益贡献。"
|
|
|
+ placement="top">
|
|
|
+ <i class="el-icon-question"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ <el-input type="textarea" v-model="ruleForm.description" class="custom-textarea"
|
|
|
+ placeholder="请输入表单描述"></el-input>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item label="网站名称:" prop="tabbarName_2">
|
|
|
<el-select v-model="ruleForm.tabbarName_2" :multiple="false" :multiple-limit="1" filterable remote
|
|
|
clearable reserve-keyword placeholder="请输入网站名称" :remote-method="getWebNavList"
|
|
@@ -170,9 +197,9 @@ export default {
|
|
|
}
|
|
|
// 新增字母数字验证规则
|
|
|
const validateTableName = (rule, value, callback) => {
|
|
|
- const reg = /^[A-Za-z0-9]+$/;
|
|
|
+ const reg = /^[a-z_]+$/; // 修改正则表达式
|
|
|
if (!reg.test(value)) {
|
|
|
- callback(new Error('表名只能包含字母和数字'));
|
|
|
+ callback(new Error('表名只能包含小写字母和下划线'));
|
|
|
} else {
|
|
|
callback();
|
|
|
}
|
|
@@ -215,6 +242,8 @@ export default {
|
|
|
tabbarName: '', //单页名称
|
|
|
tabbarName_2: '', //单页名称
|
|
|
pageType: '', //页面类型
|
|
|
+ keywords: '', //关键词
|
|
|
+ description: '', //描述
|
|
|
},
|
|
|
rules: {
|
|
|
table_name: [
|
|
@@ -226,6 +255,8 @@ export default {
|
|
|
tabbarName: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
tabbarName_2: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
pageType: [{ required: true, trigger: 'blur', validator: validateEmpty }],
|
|
|
+ keywords: [{ required: true, trigger: 'blur', message: '请输入关键词', }],
|
|
|
+ description: [{ required: true, trigger: 'blur', message: '请输入关键词', }],
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -323,7 +354,9 @@ export default {
|
|
|
this.ruleForm.form_name = val.name // 表单名
|
|
|
this.ruleForm.table_name = val.table // 表名
|
|
|
this.ruleForm.use_captcha = val.is_code == 1 ? true : false
|
|
|
-
|
|
|
+ this.ruleForm.keywords = val.keywords // 关键词
|
|
|
+ this.ruleForm.description = val.description // 描述
|
|
|
+ this.webSiteName_id_2 = val.website_id // 网站ID
|
|
|
this.webSiteName_id_2 = val.website_id // 网站ID
|
|
|
// 回显网站2名称
|
|
|
this.ruleForm.tabbarName_2 = val.website_id // 设置选中值
|
|
@@ -383,6 +416,8 @@ export default {
|
|
|
name: this.ruleForm.form_name, //表单名
|
|
|
table: this.ruleForm.table_name, //表名
|
|
|
is_code: this.ruleForm.use_captcha==true ? 1:0, //验证码
|
|
|
+ keywords: this.ruleForm.keywords, //关键词
|
|
|
+ description: this.ruleForm.description, //描述
|
|
|
}).then(data =>{
|
|
|
if (data.code == 200) {
|
|
|
this.$message({
|
|
@@ -421,7 +456,8 @@ export default {
|
|
|
table: this.ruleForm.table_name, //表名
|
|
|
id: this.activeid, // 编辑时需要的id
|
|
|
is_code: this.ruleForm.use_captcha==true ? 1:0, //验证码
|
|
|
-
|
|
|
+ keywords: this.ruleForm.keywords, //关键词
|
|
|
+ description: this.ruleForm.description, //描述
|
|
|
}).then(data =>{
|
|
|
if (data.code == 200) {
|
|
|
this.$message({
|
|
@@ -441,7 +477,7 @@ export default {
|
|
|
|
|
|
|
|
|
}else {
|
|
|
- this.$message.error('请填1写所有必填项')
|
|
|
+ this.$message.error('请填写所有必填项')
|
|
|
return false
|
|
|
}
|
|
|
})
|