1
This commit is contained in:
parent
62cc90e131
commit
5b1074a8db
@ -106,12 +106,14 @@ public class CommonController
|
|||||||
String fileUrl = fileService.upload(file);
|
String fileUrl = fileService.upload(file);
|
||||||
long size = file.getSize()/1024;
|
long size = file.getSize()/1024;
|
||||||
BufferedImage bufferedImage = ImageIO.read(file.getInputStream());
|
BufferedImage bufferedImage = ImageIO.read(file.getInputStream());
|
||||||
int width = bufferedImage.getWidth();
|
if(null!=bufferedImage){
|
||||||
int height = bufferedImage.getHeight();
|
int width = bufferedImage.getWidth();
|
||||||
|
int height = bufferedImage.getHeight();
|
||||||
|
ajax.put("width", width);
|
||||||
|
ajax.put("height", height);
|
||||||
|
}
|
||||||
ajax.put("name", file.getOriginalFilename());
|
ajax.put("name", file.getOriginalFilename());
|
||||||
ajax.put("size", size);
|
ajax.put("size", size);
|
||||||
ajax.put("width", width);
|
|
||||||
ajax.put("height", height);
|
|
||||||
ajax.put("url", fileUrl);
|
ajax.put("url", fileUrl);
|
||||||
ajax.put("fileName", fileUrl);
|
ajax.put("fileName", fileUrl);
|
||||||
}
|
}
|
||||||
|
@ -4,10 +4,14 @@ spring:
|
|||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源-点亮开发库
|
||||||
|
# master:
|
||||||
|
# url: jdbc:mysql://82.156.161.160:3306/dl_site_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
|
# username: site
|
||||||
|
# password: 123456
|
||||||
|
# 主库数据源-客户测试服务器
|
||||||
master:
|
master:
|
||||||
# url: jdbc:mysql://124.222.105.7:3306/dl_notice?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://114.132.197.85:3306/dl_site_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
url: jdbc:mysql://82.156.161.160:3306/dl_site_system?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
|
||||||
username: site
|
username: site
|
||||||
password: 123456
|
password: 123456
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
|
@ -24,10 +24,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="queryListPage" parameterType="BaseTemp" resultMap="BaseTempResult">
|
<select id="queryListPage" parameterType="BaseTemp" resultMap="BaseTempResult">
|
||||||
<include refid="selectBaseTempVo"/>
|
<include refid="selectBaseTempVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
del_flag = '0'
|
||||||
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>
|
<if test="entity.title != null and entity.title != ''"> and title = #{entity.title}</if>
|
||||||
<if test="entity.file != null and entity.file != ''"> and file = #{entity.file}</if>
|
<if test="entity.file != null and entity.file != ''"> and file = #{entity.file}</if>
|
||||||
<if test="entity.remark != null and entity.remark != ''"> and remark = #{entity.remark}</if>
|
<if test="entity.remark != null and entity.remark != ''"> and remark = #{entity.remark}</if>
|
||||||
<if test="entity.tenantId != null and entity.tenantId != ''"> and tenant_id = #{entity.tenantId}</if>
|
<if test="entity.tenantId != null and entity.tenantId != ''"> and tenant_id = #{entity.tenantId}</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
@ -12,3 +12,6 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
|||||||
|
|
||||||
# websocket
|
# websocket
|
||||||
VUE_APP_WEBSOCKET = 'ws://localhost:8099/ws/asset/'
|
VUE_APP_WEBSOCKET = 'ws://localhost:8099/ws/asset/'
|
||||||
|
|
||||||
|
# 产品、文章预览
|
||||||
|
VUE_APP_PREVIEW = 'http://www.lighting-it.cn/admin-preview/'
|
||||||
|
@ -9,3 +9,6 @@ VUE_APP_BASE_API = 'http://114.132.197.85:8099'
|
|||||||
|
|
||||||
# websocket
|
# websocket
|
||||||
VUE_APP_WEBSOCKET = 'ws://114.132.197.85:8099/ws/asset/'
|
VUE_APP_WEBSOCKET = 'ws://114.132.197.85:8099/ws/asset/'
|
||||||
|
|
||||||
|
# 产品、文章预览
|
||||||
|
VUE_APP_PREVIEW = 'http://www.lighting-it.cn/admin-preview/'
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<!-- 文件列表 -->
|
<!-- 文件列表 -->
|
||||||
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
|
||||||
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
|
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
|
||||||
<el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
|
<el-link :href="`${file.url}`" :underline="false" target="_blank">
|
||||||
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
|
||||||
</el-link>
|
</el-link>
|
||||||
<div class="ele-upload-list__item-content-action">
|
<div class="ele-upload-list__item-content-action">
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form @submit.native.prevent :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="标题" prop="title">
|
<el-form-item label="标题" prop="title">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.title"
|
v-model="queryParams.title"
|
||||||
@ -9,22 +9,6 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="描述" prop="remark">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.remark"
|
|
||||||
placeholder="请输入描述"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="站点唯一编码" prop="tenantId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.tenantId"
|
|
||||||
placeholder="请输入站点唯一编码"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
@ -42,17 +26,6 @@
|
|||||||
v-hasPermi="['base:temp:add']"
|
v-hasPermi="['base:temp:add']"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['base:temp:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="danger"
|
type="danger"
|
||||||
@ -64,26 +37,21 @@
|
|||||||
v-hasPermi="['base:temp:remove']"
|
v-hasPermi="['base:temp:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['base:temp:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="tempList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="tempList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="主键" align="center" prop="id" />
|
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
|
||||||
<el-table-column label="标题" align="center" prop="title" />
|
<el-table-column label="标题" align="center" prop="title" />
|
||||||
<el-table-column label="图片" align="center" prop="file" />
|
<el-table-column label="附件" align="center" prop="file" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<a :href="scope.row.file">
|
||||||
|
<el-tag>下载</el-tag>
|
||||||
|
</a>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="描述" align="center" prop="remark" />
|
<el-table-column label="描述" align="center" prop="remark" />
|
||||||
<el-table-column label="站点唯一编码" align="center" prop="tenantId" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -103,7 +71,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
:total="total"
|
:total="total"
|
||||||
@ -118,15 +86,12 @@
|
|||||||
<el-form-item label="标题" prop="title">
|
<el-form-item label="标题" prop="title">
|
||||||
<el-input v-model="form.title" placeholder="请输入标题" />
|
<el-input v-model="form.title" placeholder="请输入标题" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图片" prop="file">
|
<el-form-item label="附件" prop="file">
|
||||||
<file-upload v-model="form.file"/>
|
<file-upload limit="1" v-model="form.file"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="描述" prop="remark">
|
<el-form-item label="描述" prop="remark">
|
||||||
<el-input v-model="form.remark" placeholder="请输入描述" />
|
<el-input v-model="form.remark" placeholder="请输入描述" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="站点唯一编码" prop="tenantId">
|
|
||||||
<el-input v-model="form.tenantId" placeholder="请输入站点唯一编码" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
@ -171,9 +136,19 @@ export default {
|
|||||||
tenantId: null,
|
tenantId: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {
|
||||||
|
title:null,
|
||||||
|
file:null,
|
||||||
|
remark:null,
|
||||||
|
},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
title: [
|
||||||
|
{ required: true, message: '请输入标题', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
file: [
|
||||||
|
{ required: true, message: '请选择附件', trigger: 'blur' }
|
||||||
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -266,7 +241,7 @@ export default {
|
|||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
const ids = row.id || this.ids;
|
const ids = row.id || this.ids;
|
||||||
this.$modal.confirm('是否确认删除模板库编号为"' + ids + '"的数据项?').then(function() {
|
this.$modal.confirm('是否确认删除?').then(function() {
|
||||||
return delTemp(ids);
|
return delTemp(ids);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
@ -5,97 +5,163 @@
|
|||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-button @click="cancel">返 回</el-button>
|
<el-button @click="cancel">返 回</el-button>
|
||||||
<el-button type="primary" @click="submitForm">保 存</el-button>
|
<el-button type="primary" @click="submitForm">保 存</el-button>
|
||||||
|
<el-button @click="toggleSideBar">{{ showKeywords ? '关闭' : '打开' }}关键词推荐</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
<!-- 表单区域-->
|
||||||
<el-row :gutter="20">
|
<el-row>
|
||||||
|
<el-col v-if="showKeywords" :span="8">
|
||||||
<el-col :span="8">
|
<el-form :model="formSeo" ref="queryForm" :rules="rulesSeo" size="small" :inline="true" label-width="110px">
|
||||||
<el-form-item label="栏目名称" prop="catgName">
|
<el-form-item label="基准词" prop="title">
|
||||||
<el-input v-model="form.catgName" placeholder="请输入栏目名称" />
|
<template v-slot:label>
|
||||||
|
<span>基准词</span>
|
||||||
|
<el-tooltip class="item" effect="dark" content="请输入您的产品名称或新闻标题,尽量不要过于具体或泛化" placement="bottom">
|
||||||
|
<i class="el-icon-question"></i>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
<div class="dl-flex-column">
|
||||||
|
<el-input style="width: 150px" v-model="formSeo.title" placeholder="请输入基准词"/>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
<el-form-item label="语言" prop="language">
|
||||||
<el-col :span="8">
|
<el-select style="width: 150px" v-model="formSeo.language" filterable placeholder="请选择">
|
||||||
<el-form-item label="栏目类型" prop="catgType">
|
|
||||||
<el-select :disabled="form.catgLevel > 1" v-model="form.catgType" placeholder="请选择通告栏目类型" >
|
|
||||||
<el-option
|
<el-option
|
||||||
v-for="dict in dict.type.category_type"
|
v-for="item in languageArray"
|
||||||
:key="dict.value"
|
:key="item.content"
|
||||||
:label="dict.label"
|
:label="item.title"
|
||||||
:value="dict.value"
|
:value="item.content"
|
||||||
/>
|
>
|
||||||
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
<el-form-item label="国家/地区" prop="country">
|
||||||
<el-col :span="8">
|
<el-select v-model="formSeo.country" multiple filterable placeholder="请选择">
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-option
|
||||||
<el-input v-model="form.sort" type="number" placeholder="请输入排序" />
|
v-for="item in countryArray"
|
||||||
|
:key="item.content"
|
||||||
|
:label="item.title"
|
||||||
|
:value="item.content"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
<el-form-item>
|
||||||
</el-row>
|
<el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="handleQuery">搜索
|
||||||
|
</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-tag type="warning" v-if="keywordsList.length>0">
|
||||||
|
共抓取到{{ keywordsList.length }}个关键词,月搜索量低于{{ searchDown }}的关键词已为您自动忽略
|
||||||
|
</el-tag>
|
||||||
|
<el-table v-loading="loading" :data="keywordsList" max-height="500">
|
||||||
|
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
|
||||||
|
<el-table-column label="关键词" align="center" prop="title"/>
|
||||||
|
<el-table-column label="月搜索量" align="center" prop="searchMonth" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<countTo :startVal="0" :endVal="scope.row.searchMonth" :duration="1000"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="竞争程度" align="center" prop="competition" width="80"/>
|
||||||
|
<el-table-column width="60" label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)">
|
||||||
|
<el-button size="mini" type="text">使用</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item command="handleTitle">添加至title</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="handleKeyword">添加至keyword</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="handleDescription">添加至description</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="showKeywords?16:24">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="栏目名称" prop="catgName">
|
||||||
|
<el-input v-model="form.catgName" placeholder="请输入栏目名称"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="栏目类型" prop="catgType">
|
||||||
|
<el-select :disabled="form.catgLevel > 1" v-model="form.catgType" placeholder="请选择通告栏目类型">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.category_type"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="排序" prop="sort">
|
||||||
|
<el-input v-model="form.sort" type="number" placeholder="请输入排序"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="页面title" prop="title">
|
||||||
|
<el-input type="textarea" v-model="form.title" placeholder="请输入页面title"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="页面keyword" prop="keyword">
|
||||||
|
<el-input type="textarea" v-model="form.keyword" placeholder="请输入页面keyword"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="页面description" prop="description">
|
||||||
|
<el-input type="textarea" v-model="form.description" placeholder="请输入页面description"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="20">
|
<el-row v-if="form.catgType == 'cp'" :gutter="20">
|
||||||
<el-col :span="12">
|
<el-col :span="showKeywords?24:12">
|
||||||
<el-form-item label="页面title" prop="title">
|
<el-form-item label="产品上方内容" prop="prodUp">
|
||||||
<el-input type="textarea" v-model="form.title" placeholder="请输入页面title" />
|
<editor v-model="form.prodUp" :min-height="160"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="showKeywords?24:12">
|
||||||
<el-form-item label="页面keyword" prop="keyword">
|
<el-form-item label="产品上方内容-移动端" prop="prodDown">
|
||||||
<el-input type="textarea" v-model="form.keyword" placeholder="请输入页面keyword" />
|
<editor v-model="form.prodUpApp" :min-height="160"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
</el-row>
|
||||||
<el-form-item label="页面description" prop="description">
|
<el-row v-if="form.catgType == 'cp'" :gutter="20">
|
||||||
<el-input type="textarea" v-model="form.description" placeholder="请输入页面description" />
|
<el-col :span="showKeywords?24:12">
|
||||||
</el-form-item>
|
<el-form-item label="产品下方内容" prop="prodUp">
|
||||||
</el-col>
|
<editor v-model="form.prodDown" :min-height="160"/>
|
||||||
</el-row>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-row v-if="form.catgType == 'cp'" :gutter="20">
|
<el-col :span="showKeywords?24:12">
|
||||||
<el-col :span="12">
|
<el-form-item label="产品下方内容-移动端" prop="prodDown">
|
||||||
<el-form-item label="产品上方内容" prop="prodUp">
|
<editor v-model="form.prodDownApp" :min-height="160"/>
|
||||||
<editor v-model="form.prodUp" :min-height="160"/>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
<el-col :span="12">
|
<el-row v-if="form.catgType == 'dym' || form.catgType == 'xp'">
|
||||||
<el-form-item label="产品上方内容-移动端" prop="prodDown">
|
<el-col :span="showKeywords?24:12">
|
||||||
<editor v-model="form.prodUpApp" :min-height="160"/>
|
<el-form-item label="内容" prop="content">
|
||||||
</el-form-item>
|
<editor :key="showKeywords" v-model="form.content" :min-height="192"/>
|
||||||
</el-col>
|
</el-form-item>
|
||||||
</el-row>
|
</el-col>
|
||||||
<el-row v-if="form.catgType == 'cp'" :gutter="20">
|
<el-col :span="showKeywords?24:12">
|
||||||
<el-col :span="12">
|
<el-form-item label="内容-移动端" prop="content">
|
||||||
<el-form-item label="产品下方内容" prop="prodUp">
|
<editor :key="showKeywords" v-model="form.contentApp" :min-height="192"/>
|
||||||
<editor v-model="form.prodDown" :min-height="160"/>
|
</el-form-item>
|
||||||
</el-form-item>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
<el-col :span="12">
|
</el-form>
|
||||||
<el-form-item label="产品下方内容-移动端" prop="prodDown">
|
</el-col>
|
||||||
<editor v-model="form.prodDownApp" :min-height="160"/>
|
</el-row>
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
|
|
||||||
<el-row v-if="form.catgType == 'dym' || form.catgType == 'xp'">
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="内容" prop="content">
|
|
||||||
<editor v-model="form.content" :min-height="192"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="内容-移动端" prop="content">
|
|
||||||
<editor v-model="form.contentApp" :min-height="192"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-form>
|
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
@ -107,48 +173,83 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {addCategory,getCategory} from "@/api/busi/category";
|
import countTo from 'vue-count-to';
|
||||||
|
import { addCategory, getCategory } from '@/api/busi/category'
|
||||||
|
import { listSeo ,getKeywords} from '@/api/base/seo'
|
||||||
|
import Hamburger from '@/components/Hamburger'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "categoryForm",
|
name: 'categoryForm',
|
||||||
|
components: { Hamburger , countTo},
|
||||||
dicts: ['category_type'],
|
dicts: ['category_type'],
|
||||||
data(){
|
data() {
|
||||||
return{
|
return {
|
||||||
//弹出层标题
|
//弹出层标题
|
||||||
title:"",
|
title: '',
|
||||||
//表单参数
|
//表单参数
|
||||||
form:{
|
form: {
|
||||||
catgName:"",
|
catgName: '',
|
||||||
catgType:"",
|
catgType: '',
|
||||||
sort:"",
|
sort: '',
|
||||||
title:"",
|
title: '',
|
||||||
keyword:"",
|
keyword: '',
|
||||||
description:"",
|
description: '',
|
||||||
prodUp:"",
|
prodUp: '',
|
||||||
prodUpApp:"",
|
prodUpApp: '',
|
||||||
prodDown:"",
|
prodDown: '',
|
||||||
prodDownApp:"",
|
prodDownApp: '',
|
||||||
content:"",
|
content: '',
|
||||||
contentApp:"",
|
contentApp: ''
|
||||||
},
|
},
|
||||||
id:null,
|
id: null,
|
||||||
//列表页入参
|
//列表页入参
|
||||||
isChild:false,
|
isChild: false,
|
||||||
|
formSeo: {
|
||||||
|
title: '',
|
||||||
|
needUrl: false,
|
||||||
|
language: '',
|
||||||
|
country:"",
|
||||||
|
},
|
||||||
|
languageArray: [],
|
||||||
|
countryArray: [],
|
||||||
|
//是否显示关键词提示区域
|
||||||
|
showKeywords: false,
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
// 关键词列表数据
|
||||||
|
keywordsList: [],
|
||||||
|
//月搜索量最低下限
|
||||||
|
searchDown:null,
|
||||||
|
//相似新闻
|
||||||
|
similarityList: [],
|
||||||
//表单校验规则
|
//表单校验规则
|
||||||
rules:{
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, trigger: "blur", message: "请输入栏目编号" }
|
{ required: true, trigger: 'blur', message: '请输入栏目编号' }
|
||||||
],
|
],
|
||||||
catgName: [
|
catgName: [
|
||||||
{ required: true, trigger: "blur", message: "请输入栏目名称" }
|
{ required: true, trigger: 'blur', message: '请输入栏目名称' }
|
||||||
],
|
],
|
||||||
catgType: [
|
catgType: [
|
||||||
{ required: true, trigger: "blur", message: "请选择栏目类型" }
|
{ required: true, trigger: 'blur', message: '请选择栏目类型' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
rulesSeo:{
|
||||||
|
title: [
|
||||||
|
{ required: true, message: '请输入基准词', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
language: [
|
||||||
|
{ required: true, message: '请选择语言', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
country: [
|
||||||
|
{ required: true, message: '请选择国家', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.$route.query.id){
|
this.initSeo()
|
||||||
|
if (this.$route.query.id) {
|
||||||
this.id = this.$route.query.id
|
this.id = this.$route.query.id
|
||||||
this.initCategory(this.$route.query.id)
|
this.initCategory(this.$route.query.id)
|
||||||
} else {
|
} else {
|
||||||
@ -156,51 +257,111 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
methods:{
|
methods: {
|
||||||
|
/** 搜索按钮操作 */
|
||||||
/**确定按钮*/
|
handleQuery() {
|
||||||
submitForm(){
|
this.$refs['queryForm'].validate(valid => {
|
||||||
addCategory(this.form).then((res) => {
|
if (valid) {
|
||||||
if (res.code == 200){
|
this.loading=true
|
||||||
this.$modal.msgSuccess("保存成功");
|
let query = JSON.parse(JSON.stringify(this.formSeo))
|
||||||
this.cancel();
|
let countryStr = query.country.join()
|
||||||
|
query.country = countryStr
|
||||||
|
getKeywords(query).then(response => {
|
||||||
|
if(!response.data.dataList || response.data.dataList.length==0){
|
||||||
|
this.$modal.msgWarning("未抓取到相关关键词,建议您泛化基准词后重新抓取!")
|
||||||
|
}
|
||||||
|
this.keywordsList = response.data.dataList
|
||||||
|
this.searchDown = response.data.searchDown
|
||||||
|
this.loading=false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
toggleSideBar() {
|
||||||
|
this.showKeywords = !this.showKeywords
|
||||||
|
},
|
||||||
|
// 更多操作触发
|
||||||
|
handleCommand(command, row) {
|
||||||
|
switch (command) {
|
||||||
|
case 'handleTitle':
|
||||||
|
if(this.form.title){
|
||||||
|
this.form.title+=","+row.title
|
||||||
|
}else{
|
||||||
|
this.form.title=row.title
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'handleKeyword':
|
||||||
|
if(this.form.keyword){
|
||||||
|
this.form.keyword+=","+row.title
|
||||||
|
}else{
|
||||||
|
this.form.keyword=row.title
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'handleDescription':
|
||||||
|
if(this.form.description){
|
||||||
|
this.form.description+=","+row.title
|
||||||
|
}else{
|
||||||
|
this.form.description=row.title
|
||||||
|
}
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initSeo(){
|
||||||
|
listSeo({ }).then(response => {
|
||||||
|
this.languageArray = response.data.language
|
||||||
|
this.countryArray = response.data.country
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**确定按钮*/
|
||||||
|
submitForm() {
|
||||||
|
addCategory(this.form).then((res) => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$modal.msgSuccess('保存成功')
|
||||||
|
this.cancel()
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**获取网站栏目分类*/
|
/**获取网站栏目分类*/
|
||||||
initCategory(id){
|
initCategory(id) {
|
||||||
getCategory(id).then((res)=>{
|
getCategory(id).then((res) => {
|
||||||
if (res.code == 200){
|
if (res.code == 200) {
|
||||||
this.form = res.data
|
this.form = res.data
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**取消按钮*/
|
/**取消按钮*/
|
||||||
cancel(){
|
cancel() {
|
||||||
this.reset();
|
this.reset()
|
||||||
//关闭当前页面
|
//关闭当前页面
|
||||||
this.$store.dispatch("tagsView/delView", this.$route);
|
this.$store.dispatch('tagsView/delView', this.$route)
|
||||||
// 调用全局挂载的方法,关闭当前页
|
// 调用全局挂载的方法,关闭当前页
|
||||||
this.$router.go(-1)
|
this.$router.go(-1)
|
||||||
},
|
},
|
||||||
|
|
||||||
/**表单重置*/
|
/**表单重置*/
|
||||||
reset(){
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
catgName:"",
|
catgName: '',
|
||||||
catgType:"",
|
catgType: '',
|
||||||
sort:"",
|
sort: '',
|
||||||
title:"",
|
title: '',
|
||||||
keyword:"",
|
keyword: '',
|
||||||
description:"",
|
description: '',
|
||||||
prodUp:"",
|
prodUp: '',
|
||||||
prodUpApp:"",
|
prodUpApp: '',
|
||||||
prodDown:"",
|
prodDown: '',
|
||||||
prodDownApp:"",
|
prodDownApp: '',
|
||||||
content:"",
|
content: '',
|
||||||
contentApp:"",
|
contentApp: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,95 +6,192 @@
|
|||||||
<el-button type="success" @click="saveTmp">暂 存</el-button>
|
<el-button type="success" @click="saveTmp">暂 存</el-button>
|
||||||
<el-button type="primary" @click="submitForm">发 布</el-button>
|
<el-button type="primary" @click="submitForm">发 布</el-button>
|
||||||
<el-button type="warning" @click="checkContent">相似度检测</el-button>
|
<el-button type="warning" @click="checkContent">相似度检测</el-button>
|
||||||
|
<el-button @click="toggleSideBar">{{ showKeywords ? '关闭' : '打开' }}关键词推荐</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
<!-- 表单区域-->
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col v-if="showKeywords" :span="8">
|
||||||
<el-form-item label="新闻标题" prop="title">
|
<el-form :model="formSeo" ref="queryForm" :rules="rulesSeo" size="small" :inline="true" label-width="110px">
|
||||||
<el-input v-model="form.title" placeholder="请输入新闻标题"/>
|
<el-form-item label="基准词" prop="title">
|
||||||
</el-form-item>
|
<template v-slot:label>
|
||||||
</el-col>
|
<span>基准词</span>
|
||||||
<el-col :span="10">
|
<el-tooltip class="item" effect="dark" content="请输入您的产品名称或新闻标题,尽量不要过于具体或泛化" placement="bottom">
|
||||||
<el-form-item label="所属分类" prop="catgId">
|
<i class="el-icon-question"></i>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
<div class="dl-flex-column">
|
<div class="dl-flex-column">
|
||||||
<treeselect style="width: 200px" v-model="form.catgId" :options="catgOptions" :normalizer="normalizer" :noResultsText="'暂无数据'" placeholder="请选择新闻分类" />
|
<el-input style="width: 150px" v-model="formSeo.title" placeholder="请输入基准词"/>
|
||||||
<div class="dl-add-catg" @click="goCatgView">添加新闻分类</div>
|
<div class="dl-add-catg" @click="useProdName">使用新闻标题</div>
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
<el-form-item label="语言" prop="language">
|
||||||
<el-col :span="6">
|
<el-select style="width: 150px" v-model="formSeo.language" filterable placeholder="请选择">
|
||||||
<el-form-item label="排序" prop="sort">
|
<el-option
|
||||||
<el-input v-model="form.sort" type="number" placeholder="请输入排序"/>
|
v-for="item in languageArray"
|
||||||
</el-form-item>
|
:key="item.content"
|
||||||
</el-col>
|
:label="item.title"
|
||||||
</el-row>
|
:value="item.content"
|
||||||
<el-row>
|
|
||||||
<el-col :span="8">
|
|
||||||
<el-form-item label="文章来源" prop="newsFrom">
|
|
||||||
<el-input v-model="form.newsFrom" placeholder="请输入文章来源"/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="10">
|
|
||||||
<el-form-item label="发布日期" prop="publicDate">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="form.publicDate"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="首页显示" prop="ifReco">
|
|
||||||
<template v-slot:label>
|
|
||||||
<span>首页显示</span>
|
|
||||||
<el-tooltip class="item" effect="dark" content="开启后将在首页优先显示"
|
|
||||||
placement="bottom"
|
|
||||||
>
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="结合新闻内容" prop="needUrl">
|
||||||
|
<template v-slot:label>
|
||||||
|
<span>结合新闻内容</span>
|
||||||
|
<el-tooltip class="item" effect="dark" content="请确保已经录入新闻内容并保存!" placement="bottom">
|
||||||
<i class="el-icon-question"></i>
|
<i class="el-icon-question"></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
<el-switch
|
<el-switch
|
||||||
v-model="form.ifReco"
|
v-model="formSeo.needUrl"
|
||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
<el-form-item label="国家/地区" prop="country">
|
||||||
</el-row>
|
<el-select v-model="formSeo.country" multiple filterable placeholder="请选择">
|
||||||
<el-row>
|
<el-option
|
||||||
<el-col :span="8">
|
v-for="item in countryArray"
|
||||||
<el-form-item label="新闻图" prop="mainPic">
|
:key="item.content"
|
||||||
<el-tag v-if="!form.mainPic" style="cursor: pointer" @click="choosePic('mainPic',1)">图片库选择</el-tag>
|
:label="item.title"
|
||||||
<image-upload @uploadedImg="uploadedImg" v-model="form.mainPic" :limit="1"/>
|
:value="item.content"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
<el-form-item>
|
||||||
</el-row>
|
<el-button type="primary" icon="el-icon-search" size="mini" :loading="loading" @click="handleQuery">搜索
|
||||||
<!-- <el-form-item label="页面title" prop="prodTitle">-->
|
</el-button>
|
||||||
<!-- <el-input v-model="form.prodTitle" placeholder="请输入页面title"/>-->
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- <el-form-item label="页面keyword" prop="prodKeyword">-->
|
|
||||||
<!-- <el-input v-model="form.prodKeyword" type="textarea" placeholder="请输入内容"/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<!-- <el-form-item label="页面description" prop="prodDescription">-->
|
|
||||||
<!-- <el-input v-model="form.prodDescription" type="textarea" placeholder="请输入内容"/>-->
|
|
||||||
<!-- </el-form-item>-->
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="18">
|
|
||||||
<el-form-item label="新闻简介" prop="description">
|
|
||||||
<div class="dl-flex-column">
|
|
||||||
<el-input style="width: 80%" ref="descriptionInput" v-model="form.description" type="textarea"
|
|
||||||
placeholder="请输入内容" @blur="handleBlur"
|
|
||||||
/>
|
|
||||||
<el-tag style="cursor: pointer;margin-left: 10px" @click="insertBr">插入换行符</el-tag>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-form>
|
||||||
</el-row>
|
<el-tag type="warning" v-if="keywordsList.length>0">
|
||||||
<el-form-item label="新闻内容">
|
共抓取到{{ keywordsList.length }}个关键词,月搜索量低于{{ searchDown }}的关键词已为您自动忽略
|
||||||
<editor v-model="form.content" :min-height="192"/>
|
</el-tag>
|
||||||
</el-form-item>
|
<el-table v-loading="loading" :data="keywordsList" max-height="500">
|
||||||
</el-form>
|
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
|
||||||
|
<el-table-column label="关键词" align="center" prop="title"/>
|
||||||
|
<el-table-column label="月搜索量" align="center" prop="searchMonth" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<countTo :startVal="0" :endVal="scope.row.searchMonth" :duration="1000"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="竞争程度" align="center" prop="competition" width="80"/>
|
||||||
|
<el-table-column width="60" label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)">
|
||||||
|
<el-button size="mini" type="text">使用</el-button>
|
||||||
|
<el-dropdown-menu slot="dropdown">
|
||||||
|
<el-dropdown-item command="handleTitle">添加至title</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="handleKeyword">添加至keyword</el-dropdown-item>
|
||||||
|
<el-dropdown-item command="handleDescription">添加至description</el-dropdown-item>
|
||||||
|
</el-dropdown-menu>
|
||||||
|
</el-dropdown>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="showKeywords?16:24">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="150px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="新闻标题" prop="title">
|
||||||
|
<el-input v-model="form.title" placeholder="请输入新闻标题"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="所属分类" prop="catgId">
|
||||||
|
<div class="dl-flex-column">
|
||||||
|
<treeselect style="width: 200px" v-model="form.catgId" :options="catgOptions" :normalizer="normalizer"
|
||||||
|
:noResultsText="'暂无数据'" placeholder="请选择新闻分类"
|
||||||
|
/>
|
||||||
|
<div class="dl-add-catg" @click="goCatgView">添加新闻分类</div>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="排序" prop="sort">
|
||||||
|
<el-input v-model="form.sort" type="number" placeholder="请输入排序"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="页面title" prop="prodTitle">
|
||||||
|
<el-input v-model="form.prodTitle" type="textarea" placeholder="请输入页面title"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="页面keyword" prop="prodKeyword">
|
||||||
|
<el-input v-model="form.prodKeyword" type="textarea" placeholder="请输入页面keyword"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="页面description" prop="prodDescription">
|
||||||
|
<el-input v-model="form.prodDescription" type="textarea" placeholder="请输入页面description"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="文章来源" prop="newsFrom">
|
||||||
|
<el-input v-model="form.newsFrom" placeholder="请输入文章来源"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="10">
|
||||||
|
<el-form-item label="发布日期" prop="publicDate">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="form.publicDate"
|
||||||
|
type="date"
|
||||||
|
placeholder="选择日期"
|
||||||
|
>
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="6">
|
||||||
|
<el-form-item label="首页显示" prop="ifReco">
|
||||||
|
<template v-slot:label>
|
||||||
|
<span>首页显示</span>
|
||||||
|
<el-tooltip class="item" effect="dark" content="开启后将在首页优先显示"
|
||||||
|
placement="bottom"
|
||||||
|
>
|
||||||
|
<i class="el-icon-question"></i>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
<el-switch
|
||||||
|
v-model="form.ifReco"
|
||||||
|
>
|
||||||
|
</el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="新闻图" prop="mainPic">
|
||||||
|
<el-tag v-if="!form.mainPic" style="cursor: pointer" @click="choosePic('mainPic',1)">图片库选择</el-tag>
|
||||||
|
<image-upload @uploadedImg="uploadedImg" v-model="form.mainPic" :limit="1"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="18">
|
||||||
|
<el-form-item label="新闻简介" prop="description">
|
||||||
|
<div class="dl-flex-column">
|
||||||
|
<el-input style="width: 80%" ref="descriptionInput" v-model="form.description" type="textarea"
|
||||||
|
placeholder="请输入内容" @blur="handleBlur"
|
||||||
|
/>
|
||||||
|
<el-tag style="cursor: pointer;margin-left: 10px" @click="insertBr">插入换行符</el-tag>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-form-item label="新闻内容">
|
||||||
|
<editor :key="showKeywords" v-model="form.content" :min-height="192"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-divider></el-divider>
|
<el-divider></el-divider>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
@ -105,35 +202,47 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<select-pic fileType="news" ref="selectPic" @ok="chooseFun" />
|
<select-pic fileType="news" ref="selectPic" @ok="chooseFun"/>
|
||||||
<similarity-new :dataList="similarityList" ref="similarityNew"> </similarity-new>
|
<similarity-new :dataList="similarityList" ref="similarityNew"></similarity-new>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listCategory } from "@/api/busi/category";
|
import countTo from 'vue-count-to';
|
||||||
import { listProdNew, getProdNew, delProdNew,getMaxNewSort, addProdNew, updateProdNew,checkContent } from '@/api/busi/new'
|
import { listCategory } from '@/api/busi/category'
|
||||||
import selectPic from "@/views/base/pics/selectPic";
|
import { listSeo ,getKeywords} from '@/api/base/seo'
|
||||||
|
import Hamburger from '@/components/Hamburger'
|
||||||
|
import {
|
||||||
|
listProdNew,
|
||||||
|
getProdNew,
|
||||||
|
delProdNew,
|
||||||
|
getMaxNewSort,
|
||||||
|
addProdNew,
|
||||||
|
updateProdNew,
|
||||||
|
checkContent
|
||||||
|
} from '@/api/busi/new'
|
||||||
|
import selectPic from '@/views/base/pics/selectPic'
|
||||||
|
|
||||||
|
import Treeselect from '@riophae/vue-treeselect'
|
||||||
import Treeselect from "@riophae/vue-treeselect";
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
||||||
import SimilarityNew from './similarityNew'
|
import SimilarityNew from './similarityNew'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'newForm',
|
name: 'newForm',
|
||||||
components: { SimilarityNew, Treeselect,selectPic},
|
components: { SimilarityNew, Treeselect, selectPic , Hamburger , countTo},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
//光标位置--简介
|
//光标位置--简介
|
||||||
cursorPos: null,
|
cursorPos: null,
|
||||||
//栏目分类
|
//栏目分类
|
||||||
catgOptions:[],
|
catgOptions: [],
|
||||||
//当前选择图片的字段
|
//当前选择图片的字段
|
||||||
nowChooseStr:null,
|
nowChooseStr: null,
|
||||||
//图片库数量
|
//图片库数量
|
||||||
picsNum:9,
|
picsNum: 9,
|
||||||
//还可以上传图片库的数量
|
//还可以上传图片库的数量
|
||||||
canPicsNum:9,
|
canPicsNum: 9,
|
||||||
|
previewPrex:process.env.VUE_APP_PREVIEW+"article-page/",
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
id: null,
|
id: null,
|
||||||
@ -143,14 +252,14 @@ export default {
|
|||||||
prodKeyword: null,
|
prodKeyword: null,
|
||||||
prodDescription: null,
|
prodDescription: null,
|
||||||
newsFrom: null,
|
newsFrom: null,
|
||||||
publicDate:null,
|
publicDate: null,
|
||||||
mainPic: null,
|
mainPic: null,
|
||||||
pics: null,
|
pics: null,
|
||||||
description: null,
|
description: null,
|
||||||
content: null,
|
content: null,
|
||||||
sort: null,
|
sort: null,
|
||||||
ifReco: 0,
|
ifReco: false,
|
||||||
ifPublic: 0,
|
ifPublic: false,
|
||||||
tenantId: null,
|
tenantId: null,
|
||||||
creator: null,
|
creator: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
@ -158,10 +267,26 @@ export default {
|
|||||||
updateTime: null,
|
updateTime: null,
|
||||||
delFlag: null,
|
delFlag: null,
|
||||||
//当前上传的所有图片
|
//当前上传的所有图片
|
||||||
fileList:[],
|
fileList: []
|
||||||
},
|
},
|
||||||
|
formSeo: {
|
||||||
|
title: '',
|
||||||
|
needUrl: true,
|
||||||
|
language: '',
|
||||||
|
country:"",
|
||||||
|
},
|
||||||
|
languageArray: [],
|
||||||
|
countryArray: [],
|
||||||
|
//是否显示关键词提示区域
|
||||||
|
showKeywords: true,
|
||||||
|
// 遮罩层
|
||||||
|
loading: false,
|
||||||
|
// 关键词列表数据
|
||||||
|
keywordsList: [],
|
||||||
|
//月搜索量最低下限
|
||||||
|
searchDown:null,
|
||||||
//相似新闻
|
//相似新闻
|
||||||
similarityList:[],
|
similarityList: [],
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
title: [
|
title: [
|
||||||
@ -185,60 +310,143 @@ export default {
|
|||||||
description: [
|
description: [
|
||||||
{ required: true, message: '请输入新闻简介', trigger: 'blur' }
|
{ required: true, message: '请输入新闻简介', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
rulesSeo:{
|
||||||
|
title: [
|
||||||
|
{ required: true, message: '请输入基准词', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
language: [
|
||||||
|
{ required: true, message: '请选择语言', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
country: [
|
||||||
|
{ required: true, message: '请选择国家', trigger: 'blur' }
|
||||||
|
],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initCatg()
|
this.initCatg()
|
||||||
if(this.$route.query.id){
|
this.initSeo()
|
||||||
if(this.$route.query.type){
|
if (this.$route.query.id) {
|
||||||
|
if (this.$route.query.type) {
|
||||||
//添加类似
|
//添加类似
|
||||||
this.getProdInfo(this.$route.query.id,this.$route.query.type)
|
this.getProdInfo(this.$route.query.id, this.$route.query.type)
|
||||||
}else{
|
} else {
|
||||||
//修改
|
//修改
|
||||||
this.getProdInfo(this.$route.query.id)
|
this.getProdInfo(this.$route.query.id)
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
this.initData()
|
this.initData()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goCatgView(){
|
useProdName(){
|
||||||
this.$router.push({path:'/busi/category'})
|
this.formSeo.title = this.form.title
|
||||||
},
|
},
|
||||||
initCatg(){
|
/** 搜索按钮操作 */
|
||||||
//查产品栏目
|
handleQuery() {
|
||||||
listCategory({catgType:"wz"}).then(response => {
|
if(!this.form.id){
|
||||||
response.data.map((item)=>{
|
this.$modal.msgWarning("请先保存或暂存新闻信息!")
|
||||||
item.parentId=0
|
return
|
||||||
|
}
|
||||||
|
this.$refs['queryForm'].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
this.loading=true
|
||||||
|
let query = JSON.parse(JSON.stringify(this.formSeo))
|
||||||
|
let countryStr = query.country.join()
|
||||||
|
query.country = countryStr
|
||||||
|
if(query.needUrl){
|
||||||
|
query.url=this.previewPrex+this.form.id+"?private=1BC0FFEC2294283E9BDB89E188FCA574"
|
||||||
|
}
|
||||||
|
getKeywords(query).then(response => {
|
||||||
|
if(!response.data.dataList || response.data.dataList.length==0){
|
||||||
|
this.$modal.msgWarning("未抓取到相关关键词,建议您泛化基准词后重新抓取!")
|
||||||
|
}
|
||||||
|
this.keywordsList = response.data.dataList
|
||||||
|
this.searchDown = response.data.searchDown
|
||||||
|
this.loading=false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
toggleSideBar() {
|
||||||
|
this.showKeywords = !this.showKeywords
|
||||||
|
},
|
||||||
|
// 更多操作触发
|
||||||
|
handleCommand(command, row) {
|
||||||
|
switch (command) {
|
||||||
|
case 'handleTitle':
|
||||||
|
if(this.form.prodTitle){
|
||||||
|
this.form.prodTitle+=","+row.title
|
||||||
|
}else{
|
||||||
|
this.form.prodTitle=row.title
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'handleKeyword':
|
||||||
|
if(this.form.prodKeyword){
|
||||||
|
this.form.prodKeyword+=","+row.title
|
||||||
|
}else{
|
||||||
|
this.form.prodKeyword=row.title
|
||||||
|
}
|
||||||
|
break
|
||||||
|
case 'handleDescription':
|
||||||
|
if(this.form.prodDescription){
|
||||||
|
this.form.prodDescription+=","+row.title
|
||||||
|
}else{
|
||||||
|
this.form.prodDescription=row.title
|
||||||
|
}
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
break
|
||||||
|
}
|
||||||
|
},
|
||||||
|
initSeo(){
|
||||||
|
listSeo({ }).then(response => {
|
||||||
|
this.languageArray = response.data.language
|
||||||
|
this.countryArray = response.data.country
|
||||||
|
})
|
||||||
|
},
|
||||||
|
goCatgView() {
|
||||||
|
this.$router.push({ path: '/busi/category' })
|
||||||
|
},
|
||||||
|
initCatg() {
|
||||||
|
//查新闻栏目
|
||||||
|
listCategory({ catgType: 'wz' }).then(response => {
|
||||||
|
response.data.map((item) => {
|
||||||
|
item.parentId = 0
|
||||||
})
|
})
|
||||||
this.catgOptions = response.data
|
this.catgOptions = response.data
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
/** 转换树形数据结构 */
|
/** 转换树形数据结构 */
|
||||||
normalizer(node) {
|
normalizer(node) {
|
||||||
if (node.children && !node.children.length) {
|
if (node.children && !node.children.length) {
|
||||||
delete node.children;
|
delete node.children
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
id: node.id,
|
id: node.id,
|
||||||
label: node.label,
|
label: node.label,
|
||||||
children: node.children
|
children: node.children
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
initData(){
|
initData() {
|
||||||
getMaxNewSort({}).then(response => {
|
getMaxNewSort({}).then(response => {
|
||||||
this.form.sort = response.data
|
this.form.sort = response.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getProdInfo(id,type){
|
getProdInfo(id, type) {
|
||||||
getProdNew(id).then(response => {
|
getProdNew(id).then(response => {
|
||||||
this.form= response.data
|
this.form = response.data
|
||||||
if(this.form.pics && this.form.pics.length>0){
|
if (this.form.pics && this.form.pics.length > 0) {
|
||||||
this.canPicsNum = this.picsNum-this.form.pics.split(",").length
|
this.canPicsNum = this.picsNum - this.form.pics.split(',').length
|
||||||
}
|
}
|
||||||
if(type){
|
if (type) {
|
||||||
this.form.id=null
|
this.form.id = null
|
||||||
this.initData()
|
this.initData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -248,12 +456,12 @@ export default {
|
|||||||
*/
|
*/
|
||||||
back() {
|
back() {
|
||||||
//关闭当前页面
|
//关闭当前页面
|
||||||
this.$store.dispatch("tagsView/delView", this.$route);
|
this.$store.dispatch('tagsView/delView', this.$route)
|
||||||
// 调用全局挂载的方法,关闭当前页
|
// 调用全局挂载的方法,关闭当前页
|
||||||
this.$router.go(-1)
|
this.$router.go(-1)
|
||||||
},
|
},
|
||||||
//图片上传回调
|
//图片上传回调
|
||||||
uploadedImg(fileList){
|
uploadedImg(fileList) {
|
||||||
this.form.fileList = this.form.fileList.concat(fileList)
|
this.form.fileList = this.form.fileList.concat(fileList)
|
||||||
},
|
},
|
||||||
handleBlur(e) {
|
handleBlur(e) {
|
||||||
@ -273,40 +481,40 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
/** 暂存 */
|
/** 暂存 */
|
||||||
saveTmp(){
|
saveTmp() {
|
||||||
this.form.ifPublic=0
|
this.form.ifPublic = false
|
||||||
this.saveData()
|
this.saveData()
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs['form'].validate(valid => {
|
this.$refs['form'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.form.ifPublic=1
|
this.form.ifPublic = true
|
||||||
this.saveData()
|
this.saveData()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
saveData(){
|
saveData() {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateProdNew(this.form).then(response => {
|
updateProdNew(this.form).then(response => {
|
||||||
this.$modal.msgSuccess('修改成功')
|
this.$modal.msgSuccess('修改成功')
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
history.back()
|
history.back()
|
||||||
},1000)
|
}, 1000)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
addProdNew(this.form).then(response => {
|
addProdNew(this.form).then(response => {
|
||||||
this.$modal.msgSuccess('新增成功')
|
this.$modal.msgSuccess('新增成功')
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
history.back()
|
history.back()
|
||||||
},1000)
|
}, 1000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 图片库上传
|
* 图片库上传
|
||||||
*/
|
*/
|
||||||
choosePic(str,num){
|
choosePic(str, num) {
|
||||||
this.nowChooseStr = str
|
this.nowChooseStr = str
|
||||||
this.$refs.selectPic.show(num)
|
this.$refs.selectPic.show(num)
|
||||||
},
|
},
|
||||||
@ -314,17 +522,17 @@ export default {
|
|||||||
* 图片库选择图片回调
|
* 图片库选择图片回调
|
||||||
* @param picUrls
|
* @param picUrls
|
||||||
*/
|
*/
|
||||||
chooseFun(picUrls){
|
chooseFun(picUrls) {
|
||||||
if(this.form[this.nowChooseStr]){
|
if (this.form[this.nowChooseStr]) {
|
||||||
if(this.form[this.nowChooseStr].length>0){
|
if (this.form[this.nowChooseStr].length > 0) {
|
||||||
this.form[this.nowChooseStr]+=","+picUrls
|
this.form[this.nowChooseStr] += ',' + picUrls
|
||||||
}else{
|
} else {
|
||||||
this.form[this.nowChooseStr] = picUrls
|
this.form[this.nowChooseStr] = picUrls
|
||||||
}
|
}
|
||||||
}else {
|
} else {
|
||||||
this.form[this.nowChooseStr] = picUrls
|
this.form[this.nowChooseStr] = picUrls
|
||||||
}
|
}
|
||||||
if(this.nowChooseStr=="pics"){
|
if (this.nowChooseStr == 'pics') {
|
||||||
//图片库,计算剩余可上传的图片数量
|
//图片库,计算剩余可上传的图片数量
|
||||||
this.listenerPicNum()
|
this.listenerPicNum()
|
||||||
}
|
}
|
||||||
@ -332,8 +540,8 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 监听图片库数量
|
* 监听图片库数量
|
||||||
*/
|
*/
|
||||||
listenerPicNum(){
|
listenerPicNum() {
|
||||||
this.canPicsNum = this.picsNum-this.form.pics.split(",").length
|
this.canPicsNum = this.picsNum - this.form.pics.split(',').length
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 相似度检测
|
* 相似度检测
|
||||||
@ -349,13 +557,33 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/deep/.vue-treeselect__input{
|
/deep/ .vue-treeselect__input {
|
||||||
vertical-align: middle !important;
|
vertical-align: middle !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dl-add-catg {
|
.dl-add-catg {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 130px;
|
width: 110px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #1890ff;
|
color: #1890ff;
|
||||||
|
line-height: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dl-tooltip-text {
|
||||||
|
color: #495060;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hamburger-container {
|
||||||
|
line-height: 46px;
|
||||||
|
height: 100%;
|
||||||
|
float: left;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background .3s;
|
||||||
|
-webkit-tap-highlight-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hamburger-container:hover {
|
||||||
|
background: rgba(0, 0, 0, .025)
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -94,11 +94,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="产品名称" prop="title">
|
<el-form-item label="产品名称" prop="title">
|
||||||
<div class="dl-flex-column">
|
|
||||||
<el-input v-model="form.title" placeholder="请输入产品名称"/>
|
<el-input v-model="form.title" placeholder="请输入产品名称"/>
|
||||||
<div class="dl-add-catg" style="width: 180px" @click="goCatgView">Google关键词获取</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
@ -177,7 +173,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-form-item label="产品内容">
|
<el-form-item label="产品内容">
|
||||||
<editor v-model="form.content" :min-height="192"/>
|
<editor :key="showKeywords" v-model="form.content" :min-height="192"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -232,6 +228,7 @@ export default {
|
|||||||
picsNum: 9,
|
picsNum: 9,
|
||||||
//还可以上传图片库的数量
|
//还可以上传图片库的数量
|
||||||
canPicsNum: 9,
|
canPicsNum: 9,
|
||||||
|
previewPrex:process.env.VUE_APP_PREVIEW+"products/",
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
id: null,
|
id: null,
|
||||||
@ -327,6 +324,10 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
|
if(!this.form.id){
|
||||||
|
this.$modal.msgWarning("请先保存或暂存产品信息!")
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$refs['queryForm'].validate(valid => {
|
this.$refs['queryForm'].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading=true
|
this.loading=true
|
||||||
@ -334,9 +335,12 @@ export default {
|
|||||||
let countryStr = query.country.join()
|
let countryStr = query.country.join()
|
||||||
query.country = countryStr
|
query.country = countryStr
|
||||||
if(query.needUrl){
|
if(query.needUrl){
|
||||||
query.url="https://www.cdtruck.com/truck/dump-truck/china-sinotruk-howo-19m3-6x4-cheap-336hp-10.html"
|
query.url=this.previewPrex+this.form.id+"?private=CAC8F0807B8FB7EA72AF3596600F888A"
|
||||||
}
|
}
|
||||||
getKeywords(query).then(response => {
|
getKeywords(query).then(response => {
|
||||||
|
if(!response.data.dataList || response.data.dataList.length==0){
|
||||||
|
this.$modal.msgWarning("未抓取到相关关键词,建议您泛化基准词后重新抓取!")
|
||||||
|
}
|
||||||
this.keywordsList = response.data.dataList
|
this.keywordsList = response.data.dataList
|
||||||
this.searchDown = response.data.searchDown
|
this.searchDown = response.data.searchDown
|
||||||
this.loading=false
|
this.loading=false
|
||||||
|
Loading…
Reference in New Issue
Block a user