|
@@ -78,7 +78,7 @@
|
|
|
|
|
|
<!-- 弹出框 -->
|
|
|
<el-dialog :title="dialogName" :visible.sync="dialogTableVisible" width="50%" :close-on-click-modal="false">
|
|
|
- <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px" class="demo-ruleForm">
|
|
|
+ <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" class="demo-ruleForm">
|
|
|
<div class="one" v-show="this.webType == 1">
|
|
|
<div class="dialogText">
|
|
|
<el-form-item label="任务规则名:" prop="ruleName" class="keywords">
|
|
@@ -122,9 +122,6 @@
|
|
|
</div>
|
|
|
<i class="el-icon-warning"></i>
|
|
|
</el-tooltip>
|
|
|
- <!-- <p class="tips" v-show="!this.ruleForm.second_start">请输入第2页网址</p>
|
|
|
- <p class="tips" v-show="!this.ruleForm.second_num">请输入第2页网址</p>
|
|
|
- <p class="tips" v-show="!this.ruleForm.second_end">请输入第2页网址</p> -->
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<el-form-item label="起始代码:" prop="startCode" class="keywords">
|
|
@@ -144,8 +141,32 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="dialogText">
|
|
|
+ <!-- start -->
|
|
|
+ <el-form-item label="详情页网址前缀:" prop="webSite_start" class="keywords">
|
|
|
+ <el-input v-model="ruleForm.webSite_start" placeholder=" 请输入详情页网址前缀"></el-input>
|
|
|
+ <el-tooltip placement="top-start">
|
|
|
+ <div slot="content">
|
|
|
+ 网址1:https://www.mfa.gov.cn/web/wjdt_674879/gjldrhd_674881/202412/t20241205_11539110.shtml<br />
|
|
|
+ 网址2:https://www.mfa.gov.cn/web/wjdt_674879/gjldrhd_674881/202412/t20241205_11539102.shtml<br />
|
|
|
+ 详情页网址前缀为 https://www.mfa.gov.cn/web/wjdt_674879/gjldrhd_674881/202412/ 填入输入框<br />
|
|
|
+ (即重复代码之前的代码填入输入框)
|
|
|
+ </div>
|
|
|
+ <i class="el-icon-warning"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="详情页标签:" prop="" class="keywords">
|
|
|
+ <el-input v-model="ruleForm.detailPage" placeholder=" 请输入详情页起始标签"></el-input>
|
|
|
+ <el-tooltip placement="top-start">
|
|
|
+ <div slot="content">
|
|
|
+ 详情页两边有除资讯详情内容时,此项需要填写<br />
|
|
|
+ 标签内容为<'div class="news_details">,详情页标签填入.news_details 填入框内
|
|
|
+ </div>
|
|
|
+ <i class="el-icon-warning"></i>
|
|
|
+ </el-tooltip>
|
|
|
+ </el-form-item>
|
|
|
+ <!-- end -->
|
|
|
<el-form-item label="标题字符串:" prop="title" class="keywords">
|
|
|
- <el-input v-model="ruleForm.title" placeholder="请输入网站名称"></el-input>
|
|
|
+ <el-input v-model="ruleForm.title" placeholder="请输入标题字符串"></el-input>
|
|
|
<el-tooltip placement="top-start">
|
|
|
<div slot="content">
|
|
|
如标题代码:<'h1 class='news_art'>红枣滞销喂羊 电商帮忙促销</'h1>,标题字符串为 .news_art 填入输入框内<br />
|
|
@@ -155,7 +176,7 @@
|
|
|
</el-tooltip>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="内容字符串:" prop="content" class="keywords">
|
|
|
- <el-input v-model="ruleForm.content" placeholder="请输入标题字符串"></el-input>
|
|
|
+ <el-input v-model="ruleForm.content" placeholder="请输入内容字符串"></el-input>
|
|
|
<el-tooltip placement="top-start">
|
|
|
<div slot="content">
|
|
|
如内容代码:<'h1 class='news box'>
|
|
@@ -262,7 +283,7 @@
|
|
|
|
|
|
<div class="three" v-show="this.webType == 3">
|
|
|
<div class="dialogText">
|
|
|
- <el-form-item label="任务规则名:" prop="ruleName" class="keywords">
|
|
|
+ <el-form-item label="任务规则名:" prop="" class="keywords">
|
|
|
<el-input v-model="ruleForm.ruleName" placeholder="请输入任务规则名"></el-input>
|
|
|
<el-tooltip class="item" effect="dark" content="任务规则名,如中国农村网-时政要闻" placement="top-start">
|
|
|
<i class="el-icon-warning"></i>
|
|
@@ -300,133 +321,106 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
const validateCollect = (rule, value, callback) => {
|
|
|
- if (/\s/.test(value)) {
|
|
|
- callback(new Error('输入的文字包含空格,请删除空格'))
|
|
|
- }
|
|
|
- else if (value.length == 0) {
|
|
|
+ // if (/\s/.test(value)) {
|
|
|
+ // callback(new Error('输入的文字包含空格,请删除空格'))
|
|
|
+ // }else
|
|
|
+ if (value.length == 0) {
|
|
|
callback(new Error('请输入请求网址'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
const validateStartLabel = (rule, value, callback) => {
|
|
|
- // const value = input.value;
|
|
|
- if (/\s/.test(value)) {
|
|
|
- callback(new Error('输入的文字包含空格,请删除空格'))
|
|
|
- } else if (value.length == 0) {
|
|
|
+ if (value.length == 0) {
|
|
|
callback(new Error('请输入列表开始标签'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
const validateRuleName = (rule, value, callback) => {
|
|
|
- // const value = input.value;
|
|
|
- if (/\s/.test(value)) {
|
|
|
- callback(new Error('输入的文字包含空格,请删除空格'))
|
|
|
- } else if (value.length == 0) {
|
|
|
+ if (value.length == 0) {
|
|
|
callback(new Error('请输入任务规则名'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
const validateFirst_url = (rule, value, callback) => {
|
|
|
- // const value = input.value;
|
|
|
- if (/\s/.test(value)) {
|
|
|
- callback(new Error('输入的文字包含空格,请删除空格'))
|
|
|
- } else if (value.length == 0) {
|
|
|
+ if (value.length == 0) {
|
|
|
callback(new Error('请输入第1页网址'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
const validateStartCode = (rule, value, callback) => {
|
|
|
- // const value = input.value;
|
|
|
- if (/\s/.test(value)) {
|
|
|
- callback(new Error('输入的文字包含空格,请删除空格'))
|
|
|
- } else if (value.length == 0) {
|
|
|
+ if (value.length == 0) {
|
|
|
callback(new Error('请输入起始代码'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
const validateEndCode = (rule, value, callback) => {
|
|
|
- // const value = input.value;
|
|
|
- if (/\s/.test(value)) {
|
|
|
- callback(new Error('输入的文字包含空格,请删除空格'))
|
|
|
- } else if (value.length == 0) {
|
|
|
+ if (value.length == 0) {
|
|
|
callback(new Error('请输入结束页数'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
const validatTitle = (rule, value, callback) => {
|
|
|
- // const value = input.value;
|
|
|
- if (/\s/.test(value)) {
|
|
|
- callback(new Error('输入的文字包含空格,请删除空格'))
|
|
|
- } else if (value.length == 0) {
|
|
|
+ if (value.length == 0) {
|
|
|
callback(new Error('请输入标题字符串'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
const validatcontent = (rule, value, callback) => {
|
|
|
- // const value = input.value;
|
|
|
- if (/\s/.test(value)) {
|
|
|
- callback(new Error('输入的文字包含空格,请删除空格'))
|
|
|
- } else if (value.length == 0) {
|
|
|
+ if (value.length == 0) {
|
|
|
callback(new Error('请输入内容字符串'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
const validatsource = (rule, value, callback) => {
|
|
|
- // const value = input.value;
|
|
|
- if (/\s/.test(value)) {
|
|
|
- callback(new Error('输入的文字包含空格,请删除空格'))
|
|
|
- } else if (value.length == 0) {
|
|
|
+ if (value.length == 0) {
|
|
|
callback(new Error('请输入来源字符串'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
const validatauthor = (rule, value, callback) => {
|
|
|
- // const value = input.value;
|
|
|
- if (/\s/.test(value)) {
|
|
|
- callback(new Error('输入的文字包含空格,请删除空格'))
|
|
|
- } else if (value.length == 0) {
|
|
|
+ if (value.length == 0) {
|
|
|
callback(new Error('请输入作者字符串'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
const validatauthorName = (rule, value, callback) => {
|
|
|
- // const value = input.value;
|
|
|
- if (/\s/.test(value)) {
|
|
|
- callback(new Error('输入的文字包含空格,请删除空格'))
|
|
|
- } else if (value.length == 0) {
|
|
|
+ if (value.length == 0) {
|
|
|
callback(new Error('请输入作者替换名称'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
const validatparameter = (rule, value, callback) => {
|
|
|
- // const value = input.value;
|
|
|
- if (/\s/.test(value)) {
|
|
|
- callback(new Error('输入的文字包含空格,请删除空格'))
|
|
|
- } else if (value.length == 0) {
|
|
|
+ if (value.length == 0) {
|
|
|
callback(new Error('请输入接口参数'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
const validatsecondWeb = (rule, value, callback) => {
|
|
|
- // const value = input.value;
|
|
|
if (value.length == 0) {
|
|
|
callback(new Error('请输入第2页网址'))
|
|
|
} else {
|
|
|
callback()
|
|
|
}
|
|
|
}
|
|
|
+ const validat_webSite_start = (rule, value, callback) => {
|
|
|
+ if (value.length == 0) {
|
|
|
+ callback(new Error('请输入详情页网址前缀'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
return {
|
|
|
tableDivTitle: "任务规则列表", //表格标题
|
|
|
dialogTableVisible: false, //弹窗是否显示
|
|
@@ -464,11 +458,13 @@ export default {
|
|
|
endPage: '', //结束页数
|
|
|
title: '', //标题字符串
|
|
|
content: '', //内容字符串
|
|
|
+ detailPage: '', //详情页标签
|
|
|
+ webSite_start: '', //详情页网址前缀
|
|
|
source: '', // 来源字符串
|
|
|
author: '', // 作者字符串
|
|
|
authorName: '', // 作者替换名称
|
|
|
parameter: '', //接口类2 接口参数
|
|
|
- diy_rule: '' //自定义类
|
|
|
+ diy_rule: '',//自定义类
|
|
|
},
|
|
|
|
|
|
rules: { //规则
|
|
@@ -480,9 +476,11 @@ export default {
|
|
|
// second_start:[{ required: true, trigger: 'blur', validator: validatsecondWeb }],
|
|
|
// second_num:[{ required: true, trigger: 'blur', validator: validatsecondWeb }],
|
|
|
// second_end:[{ required: true, trigger: 'blur', validator: validatsecondWeb }],
|
|
|
- second_start:[{ required: true, trigger: 'blur', message: '请输入网址开头' }],
|
|
|
- second_num:[{ required: true, trigger: 'blur', message: '请输入代码页数' }],
|
|
|
- second_end:[{ required: true, trigger: 'blur', message: '请输入网址结束字符串' }],
|
|
|
+ second_start: [{ required: true, trigger: 'blur', message: '请输入网址开头' }],
|
|
|
+ second_num: [{ required: true, trigger: 'blur', message: '请输入代码页数' }],
|
|
|
+ second_end: [{ required: true, trigger: 'blur', message: '请输入网址结束字符串' }],
|
|
|
+
|
|
|
+ webSite_start: [{ required: true, trigger: 'blur', validator: validat_webSite_start }],
|
|
|
|
|
|
startCode: [{ required: true, trigger: 'blur', validator: validateStartCode }],
|
|
|
endPage: [{ required: true, trigger: 'blur', validator: validateEndCode }],
|
|
@@ -617,6 +615,8 @@ export default {
|
|
|
this.ruleForm.authorName = ''
|
|
|
this.ruleForm.parameter = ''
|
|
|
this.ruleForm.diy_rule = ''
|
|
|
+ this.ruleForm.webSite_start = ""
|
|
|
+ this.ruleForm.detailPage = ''
|
|
|
}
|
|
|
},
|
|
|
//1.9 编辑采集规则
|
|
@@ -650,6 +650,8 @@ export default {
|
|
|
this.ruleForm.authorName = val.writer
|
|
|
this.ruleForm.parameter = val.parameter
|
|
|
this.ruleForm.diy_rule = val.diy_rule
|
|
|
+ this.ruleForm.webSite_start = val.con_url
|
|
|
+ this.ruleForm.detailPage = val.con_start
|
|
|
|
|
|
} else if (this.webType == 2) {
|
|
|
this.dialogBoo = "update"
|
|
@@ -680,7 +682,7 @@ export default {
|
|
|
this.dialogBoo = "update"
|
|
|
this.dialogTableVisible = true
|
|
|
this.ruleForm.ruleName = val.name
|
|
|
- this.ruleForm.diy_rule=val.diy_rule
|
|
|
+ this.ruleForm.diy_rule = val.diy_rule
|
|
|
}
|
|
|
|
|
|
|
|
@@ -722,7 +724,10 @@ export default {
|
|
|
type: 'error'
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ // ab(){
|
|
|
+ // let name = this.ruleForm.ruleName.trim();
|
|
|
+ // console.log(name)
|
|
|
+ // },
|
|
|
// 弹出层相关方法
|
|
|
// 提交表单
|
|
|
submitForm() {
|
|
@@ -734,17 +739,19 @@ export default {
|
|
|
name: this.ruleForm.ruleName,
|
|
|
web_id: this.webId,
|
|
|
type: this.webType,
|
|
|
- first_url: this.ruleForm.first_url,//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
- second_start: this.ruleForm.second_start,//规则型1:第2页网址开头
|
|
|
- second_num: this.ruleForm.second_num,//规则型1:第2页代码页数
|
|
|
- second_end: this.ruleForm.second_end,//规则型1:第2页网址结束字符串
|
|
|
- start: this.ruleForm.startCode, //规则型1:列表标签类名 接口型2:列表标签
|
|
|
- title: this.ruleForm.title, //规则型1:标题标签类名 接口型2:标题标签
|
|
|
- content: this.ruleForm.content,//规则型1:内容标签类名 接口型2:内容标签
|
|
|
+ first_url: this.ruleForm.first_url.trim(),//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
+ second_start: this.ruleForm.second_start.trim(),//规则型1:第2页网址开头
|
|
|
+ second_num: this.ruleForm.second_num.trim(),//规则型1:第2页代码页数
|
|
|
+ second_end: this.ruleForm.second_end.trim(),//规则型1:第2页网址结束字符串
|
|
|
+ start: this.ruleForm.startCode.trim(), //规则型1:列表标签类名 接口型2:列表标签
|
|
|
+ title: this.ruleForm.title.trim(), //规则型1:标题标签类名 接口型2:标题标签
|
|
|
+ content: this.ruleForm.content.trim(),//规则型1:内容标签类名 接口型2:内容标签
|
|
|
source: this.ruleForm.source, //规则型1:来源标签类名 接口型2:来源标签
|
|
|
// writer_class: this.ruleForm.author,//规则型1:作者标签类名 接口型2:作者标签
|
|
|
- writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
|
|
|
- end_pagenum: this.ruleForm.endPage//规则型1:列表页结束页码
|
|
|
+ writer: this.ruleForm.authorName.trim(),//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
|
|
|
+ end_pagenum: this.ruleForm.endPage,//规则型1:列表页结束页码
|
|
|
+ con_url: this.ruleForm.webSite_start.trim(), //详情页标签
|
|
|
+ con_start: this.ruleForm.detailPage, //详情页网址前缀
|
|
|
}).then(data => {
|
|
|
this.getData()
|
|
|
console.log(data);
|
|
@@ -766,17 +773,19 @@ export default {
|
|
|
name: this.ruleForm.ruleName,
|
|
|
web_id: this.webId,
|
|
|
type: this.webType,
|
|
|
- first_url: this.ruleForm.first_url,//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
- second_start: this.ruleForm.second_start,//规则型1:第2页网址开头
|
|
|
- second_num: this.ruleForm.second_num,//规则型1:第2页代码页数
|
|
|
- second_end: this.ruleForm.second_end,//规则型1:第2页网址结束字符串
|
|
|
- start: this.ruleForm.startCode, //规则型1:列表标签类名 接口型2:列表标签
|
|
|
- title: this.ruleForm.title, //规则型1:标题标签类名 接口型2:标题标签
|
|
|
- content: this.ruleForm.content,//规则型1:内容标签类名 接口型2:内容标签
|
|
|
+ first_url: this.ruleForm.first_url.trim(),//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
+ second_start: this.ruleForm.second_start.trim(),//规则型1:第2页网址开头
|
|
|
+ second_num: this.ruleForm.second_num.trim(),//规则型1:第2页代码页数
|
|
|
+ second_end: this.ruleForm.second_end.trim(),//规则型1:第2页网址结束字符串
|
|
|
+ start: this.ruleForm.startCode.trim(), //规则型1:列表标签类名 接口型2:列表标签
|
|
|
+ title: this.ruleForm.title.trim(), //规则型1:标题标签类名 接口型2:标题标签
|
|
|
+ content: this.ruleForm.content.trim(),//规则型1:内容标签类名 接口型2:内容标签
|
|
|
source: this.ruleForm.source, //规则型1:来源标签类名 接口型2:来源标签
|
|
|
writer_class: this.ruleForm.author,//规则型1:作者标签类名 接口型2:作者标签
|
|
|
- writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
|
|
|
- end_pagenum: this.ruleForm.endPage//规则型1:列表页结束页码
|
|
|
+ writer: this.ruleForm.authorName.trim(),//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
|
|
|
+ end_pagenum: this.ruleForm.endPage,//规则型1:列表页结束页码
|
|
|
+ con_url: this.ruleForm.webSite_start.trim(), //详情页标签
|
|
|
+ con_start: this.ruleForm.detailPage, //详情页网址前缀
|
|
|
}).then(data => {
|
|
|
this.getData()
|
|
|
console.log(data);
|
|
@@ -800,13 +809,13 @@ export default {
|
|
|
name: this.ruleForm.ruleName,
|
|
|
web_id: this.webId,
|
|
|
type: this.webType,
|
|
|
- first_url: this.ruleForm.collect,//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
- parameter: this.ruleForm.parameter,//接口型2:接口参数
|
|
|
- start: this.ruleForm.startLabel, //规则型1:列表标签类名 接口型2:列表标签
|
|
|
- title: this.ruleForm.title, //规则型1:标题标签类名 接口型2:标题标签
|
|
|
- content: this.ruleForm.content,//规则型1:内容标签类名 接口型2:内容标签
|
|
|
+ first_url: this.ruleForm.collect.trim(),//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
+ parameter: this.ruleForm.parameter.trim(),//接口型2:接口参数
|
|
|
+ start: this.ruleForm.startLabel.trim(), //规则型1:列表标签类名 接口型2:列表标签
|
|
|
+ title: this.ruleForm.title.trim(), //规则型1:标题标签类名 接口型2:标题标签
|
|
|
+ content: this.ruleForm.content.trim(),//规则型1:内容标签类名 接口型2:内容标签
|
|
|
source: this.ruleForm.source, //规则型1:来源标签类名 接口型2:来源标签
|
|
|
- writer_class: this.ruleForm.author,//规则型1:作者标签类名 接口型2:作者标签
|
|
|
+ writer_class: this.ruleForm.author.trim(),//规则型1:作者标签类名 接口型2:作者标签
|
|
|
// writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
|
|
|
}).then(data => {
|
|
|
this.getData()
|
|
@@ -831,14 +840,14 @@ export default {
|
|
|
name: this.ruleForm.ruleName,
|
|
|
web_id: this.webId,
|
|
|
type: this.webType,
|
|
|
- first_url: this.ruleForm.collect,//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
- parameter: this.ruleForm.parameter,//接口型2:接口参数
|
|
|
- start: this.ruleForm.startLabel, //规则型1:列表标签类名 接口型2:列表标签
|
|
|
- title: this.ruleForm.title, //规则型1:标题标签类名 接口型2:标题标签
|
|
|
- content: this.ruleForm.content,//规则型1:内容标签类名 接口型2:内容标签
|
|
|
+ first_url: this.ruleForm.collect.trim(),//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
+ parameter: this.ruleForm.parameter.trim(),//接口型2:接口参数
|
|
|
+ start: this.ruleForm.startLabel.trim(), //规则型1:列表标签类名 接口型2:列表标签
|
|
|
+ title: this.ruleForm.title.trim(), //规则型1:标题标签类名 接口型2:标题标签
|
|
|
+ content: this.ruleForm.content.trim(),//规则型1:内容标签类名 接口型2:内容标签
|
|
|
source: this.ruleForm.source, //规则型1:来源标签类名 接口型2:来源标签
|
|
|
// writer_class: this.ruleForm.author,//规则型1:作者标签类名 接口型2:作者标签
|
|
|
- writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
|
|
|
+ writer: this.ruleForm.authorName.trim(),//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
|
|
|
}).then(data => {
|
|
|
this.getData()
|
|
|
console.log(data);
|
|
@@ -897,17 +906,19 @@ export default {
|
|
|
name: this.ruleForm.ruleName,
|
|
|
id: this.activeId,
|
|
|
type: this.webType,
|
|
|
- first_url: this.ruleForm.first_url,//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
- second_start: this.ruleForm.second_start,//规则型1:第2页网址开头
|
|
|
- second_num: this.ruleForm.second_num,//规则型1:第2页代码页数
|
|
|
- second_end: this.ruleForm.second_end,//规则型1:第2页网址结束字符串
|
|
|
- start: this.ruleForm.startCode, //规则型1:列表标签类名 接口型2:列表标签
|
|
|
- title: this.ruleForm.title, //规则型1:标题标签类名 接口型2:标题标签
|
|
|
- content: this.ruleForm.content,//规则型1:内容标签类名 接口型2:内容标签
|
|
|
+ first_url: this.ruleForm.first_url.trim(),//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
+ second_start: this.ruleForm.second_start.trim(),//规则型1:第2页网址开头
|
|
|
+ second_num: this.ruleForm.second_num.trim(),//规则型1:第2页代码页数
|
|
|
+ second_end: this.ruleForm.second_end.trim(),//规则型1:第2页网址结束字符串
|
|
|
+ start: this.ruleForm.startCode.trim(), //规则型1:列表标签类名 接口型2:列表标签
|
|
|
+ title: this.ruleForm.title.trim(), //规则型1:标题标签类名 接口型2:标题标签
|
|
|
+ content: this.ruleForm.content.trim(),//规则型1:内容标签类名 接口型2:内容标签
|
|
|
source: this.ruleForm.source, //规则型1:来源标签类名 接口型2:来源标签
|
|
|
writer_class: this.ruleForm.author,//规则型1:作者标签类名 接口型2:作者标签
|
|
|
- writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
|
|
|
- end_pagenum: this.ruleForm.endPage//规则型1:列表页结束页码
|
|
|
+ writer: this.ruleForm.authorName.trim(),//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
|
|
|
+ end_pagenum: this.ruleForm.endPage,//规则型1:列表页结束页码
|
|
|
+ con_url: this.ruleForm.webSite_start.trim(), //详情页标签
|
|
|
+ con_start: this.ruleForm.detailPage, //详情页网址前缀
|
|
|
}).then(data => {
|
|
|
this.getData()
|
|
|
console.log(data);
|
|
@@ -929,13 +940,13 @@ export default {
|
|
|
name: this.ruleForm.ruleName,
|
|
|
id: this.activeId,
|
|
|
type: this.webType,
|
|
|
- first_url: this.ruleForm.collect,//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
- parameter: this.ruleForm.parameter,//接口型2:接口参数
|
|
|
- start: this.ruleForm.startCode, //规则型1:列表标签类名 接口型2:列表标签
|
|
|
- title: this.ruleForm.title, //规则型1:标题标签类名 接口型2:标题标签
|
|
|
- content: this.ruleForm.content,//规则型1:内容标签类名 接口型2:内容标签
|
|
|
+ first_url: this.ruleForm.collect.trim(),//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
+ parameter: this.ruleForm.parameter.trim(),//接口型2:接口参数
|
|
|
+ start: this.ruleForm.startCode.trim(), //规则型1:列表标签类名 接口型2:列表标签
|
|
|
+ title: this.ruleForm.title.trim(), //规则型1:标题标签类名 接口型2:标题标签
|
|
|
+ content: this.ruleForm.content.trim(),//规则型1:内容标签类名 接口型2:内容标签
|
|
|
source: this.ruleForm.source, //规则型1:来源标签类名 接口型2:来源标签
|
|
|
- writer_class: this.ruleForm.author,//规则型1:作者标签类名 接口型2:作者标签
|
|
|
+ writer_class: this.ruleForm.author.trim(),//规则型1:作者标签类名 接口型2:作者标签
|
|
|
// writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
|
|
|
}).then(data => {
|
|
|
this.getData()
|
|
@@ -960,14 +971,14 @@ export default {
|
|
|
name: this.ruleForm.ruleName,
|
|
|
id: this.activeId,
|
|
|
type: this.webType,
|
|
|
- first_url: this.ruleForm.collect,//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
- parameter: this.ruleForm.parameter,//接口型2:接口参数
|
|
|
- start: this.ruleForm.startCode, //规则型1:列表标签类名 接口型2:列表标签
|
|
|
- title: this.ruleForm.title, //规则型1:标题标签类名 接口型2:标题标签
|
|
|
- content: this.ruleForm.content,//规则型1:内容标签类名 接口型2:内容标签
|
|
|
+ first_url: this.ruleForm.collect.trim(),//规则型1:第1页网址 接口型2:开始采集地址
|
|
|
+ parameter: this.ruleForm.parameter.trim(),//接口型2:接口参数
|
|
|
+ start: this.ruleForm.startCode.trim(), //规则型1:列表标签类名 接口型2:列表标签
|
|
|
+ title: this.ruleForm.title.trim(), //规则型1:标题标签类名 接口型2:标题标签
|
|
|
+ content: this.ruleForm.content.trim(),//规则型1:内容标签类名 接口型2:内容标签
|
|
|
source: this.ruleForm.source, //规则型1:来源标签类名 接口型2:来源标签
|
|
|
// writer_class: this.ruleForm.author,//规则型1:作者标签类名 接口型2:作者标签
|
|
|
- writer: this.ruleForm.authorName,//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
|
|
|
+ writer: this.ruleForm.authorName.trim(),//规则型1:接口型2:作者默认名称(若未采集到则设置默认作者)
|
|
|
}).then(data => {
|
|
|
this.getData()
|
|
|
console.log(data);
|
|
@@ -1211,9 +1222,10 @@ export default {
|
|
|
::v-deep .el-col-6 {
|
|
|
width: 31%;
|
|
|
height: 32px;
|
|
|
- margin-right: 24px;
|
|
|
+ margin-right: 23px;
|
|
|
}
|
|
|
- .el_col_6_end{
|
|
|
+
|
|
|
+ .el_col_6_end {
|
|
|
margin-right: 0;
|
|
|
}
|
|
|
|