Commit a776e5f0 by liudx

联调浏览记录、关注列表、取消关注

parent 0cda8df6
......@@ -31,6 +31,7 @@
<a-popover>
<template #content>
<div
v-if="!isadmin"
class="portrait_btn"
@mouseenter="hover($event, '1')"
@mouseleave="leave($event)"
......@@ -97,6 +98,7 @@ export default {
return {
hover_num: 0,
username: "",
isadmin:false,
type: "专利",
keyword: "",
visible: false,
......@@ -113,6 +115,7 @@ export default {
if (res.code == 0) {
this.username = res.data.account_number;
this.img = res.data.head_img;
this.isadmin = res.data.is_admin;
}
});
},
......
......@@ -172,11 +172,12 @@ const routes = [
// name: 'NotFound',
// component: () => import('@/views/NotFound/Index.vue')
// },
// // 所有未定义路由,全部重定向到404页
// {
// path: '/:pathMatch(.*)',
// redirect: '/404'
// }
// 所有未定义路由,全部重定向到404页
{
path: '/:pathMatch(.*)',
redirect: '/404'
}
// path: '/about',
// name: 'about',
......
......@@ -5,6 +5,15 @@ export const bduserInfo = p => post('/api/users/userInfo', p);
export const updateuserInfo = p => put('/api/users/userInfo', p);
//关注企业或者专利
export const userFollow = p => post('/api/users/userFollow', p);
//取消关注
export const cancelFollow = p => Delete('/api/users/userFollow', p);
//关注列表
export const followList = p => get('/api/users/userFollow?page='+p.page+'&size='+p.size);
//浏览记录
export const userBrowse = p => get('/api/users/userBrowse?page='+p.page+'&size='+p.size);
......
<template>
<div class="notFind">
<svg
width="380px"
height="500px"
viewBox="0 0 837 1045"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sketch="http://www.bohemiancoding.com/sketch/ns"
>
<g
id="Page-1"
stroke="none"
stroke-width="1"
fill="none"
fill-rule="evenodd"
sketch:type="MSPage"
>
<path
d="M353,9 L626.664028,170 L626.664028,487 L353,642 L79.3359724,487 L79.3359724,170 L353,9 Z"
id="Polygon-1"
stroke="#007FB2"
stroke-width="6"
sketch:type="MSShapeGroup"
></path>
<path
d="M78.5,529 L147,569.186414 L147,648.311216 L78.5,687 L10,648.311216 L10,569.186414 L78.5,529 Z"
id="Polygon-2"
stroke="#EF4A5B"
stroke-width="6"
sketch:type="MSShapeGroup"
></path>
<path
d="M773,186 L827,217.538705 L827,279.636651 L773,310 L719,279.636651 L719,217.538705 L773,186 Z"
id="Polygon-3"
stroke="#795D9C"
stroke-width="6"
sketch:type="MSShapeGroup"
></path>
<path
d="M639,529 L773,607.846761 L773,763.091627 L639,839 L505,763.091627 L505,607.846761 L639,529 Z"
id="Polygon-4"
stroke="#F2773F"
stroke-width="6"
sketch:type="MSShapeGroup"
></path>
<path
d="M281,801 L383,861.025276 L383,979.21169 L281,1037 L179,979.21169 L179,861.025276 L281,801 Z"
id="Polygon-5"
stroke="#5a5c6c"
stroke-width="6"
sketch:type="MSShapeGroup"
></path>
</g>
</svg>
<div class="message-box">
<h1>404</h1>
<p>页面找不到啦 !</p>
<div class="buttons-con">
<div class="action-link-wrap">
<a @click="$router.go(-1)" class="link-button link-back-button"
>返回上一页</a
>
<a @click="$router.replace({ name: 'cockpit' })" class="link-button"
>前往首页</a
>
</div>
</div>
</div>
</div>
<a-result
status="404"
title="404"
sub-title="抱歉,页面不存在!"
class="result"
>
<template #extra>
<a-button type="primary" @click="goHome">返回首页</a-button>
</template>
</a-result>
</template>
<script>
export default {
name:'notFound'
name: "NotFound",
methods:{
goHome(){
this.$router.push({
path:'/home'
})
}
}
};
</script>
<style lang="less" scoped>
.notFind {
width: 100%;
height: 100%;
background-color: #2f3242;
}
svg {
position: absolute;
top: 50%;
left: 50%;
margin-top: -250px;
margin-left: -400px;
}
.message-box {
height: 200px;
width: 380px;
position: absolute;
top: 50%;
left: 50%;
margin-top: -100px;
margin-left: 50px;
color: #fff;
font-family: Roboto;
font-weight: 300;
}
.message-box h1 {
font-size: 60px;
line-height: 46px;
margin-bottom: 40px;
}
.buttons-con .action-link-wrap {
margin-top: 40px;
}
.buttons-con .action-link-wrap a {
background: #68c950;
padding: 8px 25px;
border-radius: 4px;
color: #fff;
font-weight: bold;
font-size: 14px;
transition: all 0.3s linear;
cursor: pointer;
text-decoration: none;
margin-right: 10px;
}
.buttons-con .action-link-wrap a:hover {
background: #5a5c6c;
color: #fff;
}
#Polygon-1,
#Polygon-2,
#Polygon-3,
#Polygon-4,
#Polygon-4,
#Polygon-5 {
animation: float 1s infinite ease-in-out alternate;
.result{
height: 900px;
}
#Polygon-2 {
animation-delay: 0.2s;
}
#Polygon-3 {
animation-delay: 0.4s;
}
#Polygon-4 {
animation-delay: 0.6s;
}
#Polygon-5 {
animation-delay: 0.8s;
}
@keyframes float {
100% {
transform: translateY(20px);
}
}
@media (max-width: 750px) {
svg {
position: absolute;
top: 50%;
left: 50%;
margin-top: -250px;
margin-left: -190px;
}
.message-box {
top: 50%;
left: 50%;
margin-top: -100px;
margin-left: -190px;
text-align: center;
}
:deep(.ant-result-image){
height: auto;
}
</style>
......@@ -40,7 +40,7 @@
<span @click="followFun" v-if="!baseinfo.follow"
><img src="@/static/patent/icon-gz.png" alt="" />关注</span
>
<span v-else
<span @click="cancelFun" v-else
><img src="@/static/patent/icon-gz-select.png" alt="" />已关注</span
>
</div>
......@@ -89,8 +89,8 @@
</a-form-item>
</a-form>
</a-modal>
<div style="width: 70%; visibility: hidden; overflow: hidden; height: 20px">
<!-- <div style="width: 70%"> -->
<div style="width: 70%; visibility: hidden; overflow: hidden; height: 20px">
<!-- <div style="width: 70%"> -->
<EchartsCon
:id="'applyTrend1'"
:option="option1"
......@@ -108,7 +108,7 @@
:id="'TechnicalField1'"
:dataArr="techArr1"
:style="'height:300px;width:100%;'"
v-if="techArr1.length>0"
v-if="techArr1.length > 0"
></EchartsCloud>
<EchartsCon :option="option7" :id="'apply'"></EchartsCon>
<EchartsCon :option="option8" :id="'purchase'"></EchartsCon>
......@@ -131,7 +131,7 @@ import {
} from "../../utils/indexApi.js";
import overview from "./overview.vue";
import { message } from "ant-design-vue";
import { userFollow } from "../../utils/userAPI";
import { userFollow,cancelFollow } from "../../utils/userAPI";
import cooperation from "./cooperation.vue";
import technology from "./technology.vue";
import docxtemplater from "docxtemplater";
......@@ -201,6 +201,19 @@ export default {
EchartsCloud,
},
methods: {
//取消关注
async cancelFun() {
let cancelRes = await cancelFollow({
f_type: "enterprise",
ent_or_pat_id: this.id,
});
if (cancelRes.code == 0) {
this.$router.go(0);
message.success(cancelRes.msg);
} else {
message.error(cancelRes.msg);
}
},
//关注接口
async followFun() {
let Follow = await userFollow({
......@@ -208,11 +221,11 @@ export default {
ent_or_pat_id: this.id,
name: this.baseinfo.company_name,
});
if(Follow.code == 0){
this.$router.go(0)
message.success(Follow.msg)
}else{
message.error(Follow.msg)
if (Follow.code == 0) {
this.$router.go(0);
message.success(Follow.msg);
} else {
message.error(Follow.msg);
}
},
openModal() {
......
......@@ -357,7 +357,7 @@ export default {
title: "投资方",
dataIndex: "investor",
key: "investor",
width:240
width: 240,
},
],
pagination: {
......@@ -416,6 +416,8 @@ export default {
.company_con_anchor {
margin-top: 15px;
font-weight: bold;
position: relative;
width: 180px;
color: #1c1c28;
:deep(.ant-anchor-link-title) {
color: #1c1c28;
......@@ -437,15 +439,17 @@ export default {
margin-left: 10px;
padding: 30px 15px 0;
}
#components-back-top-demo-custom {
}
#components-back-top-demo-custom .ant-back-top {
// bottom: 50%;
// right: 18.5%;
right: 370px;
top: 350px;
bottom: 55%;
right: 19%;
// right: 380px;
// top: 350px;
}
#components-back-top-demo-custom .ant-back-top-inner {
margin-top: 20px;
width: 150px;
width: 180px;
height: 60px;
background-color: #fff;
text-align: center;
......@@ -453,14 +457,5 @@ export default {
border-radius: 8px;
}
}
.back {
display: none;
margin-top: 20px;
width: 150px;
height: 60px;
background-color: #fff;
text-align: center;
line-height: 60px;
}
}
</style>
......@@ -334,8 +334,8 @@ export default {
#components-back-top-demo-custom .ant-back-top {
// bottom: 50%;
// right: 18.5%;
right: 370px;
top: 350px;
bottom: 55%;
right: 19%;
}
#components-back-top-demo-custom .ant-back-top-inner {
margin-top: 20px;
......
......@@ -148,7 +148,7 @@
/>
<span class="follow_str">关注</span>
</div>
<div class="follow" @click="follow" v-else>
<div class="follow" @click="cancelFun(item.mysql_id)" v-else>
<img
src="@/static/company/icon-yiguanzhu.png"
alt=""
......@@ -209,7 +209,7 @@
<script>
import dayjs from "dayjs";
import arealist from "../../utils/map.js";
import { userFollow } from "../../utils/userAPI";
import { userFollow,cancelFollow } from "../../utils/userAPI";
import {
enterpriseList,
industryType,
......@@ -255,6 +255,19 @@ export default {
},
components: {},
methods: {
//取消关注
async cancelFun(id) {
let cancelRes = await cancelFollow({
f_type: "enterprise",
ent_or_pat_id: id,
});
if (cancelRes.code == 0) {
this.$router.go(0);
message.success(cancelRes.msg);
} else {
message.error(cancelRes.msg);
}
},
//关注接口
async followFun(id, company_name) {
let Follow = await userFollow({
......@@ -586,6 +599,7 @@ export default {
.company {
padding: 0 30px;
width: calc(100%);
min-height: 960px;
background-color: #ebebeb;
position: relative;
.nav_bread {
......@@ -596,6 +610,7 @@ export default {
.company_con {
background-color: #f3f3f6;
width: 100%;
min-height: 960px;
// height: 95%;
display: flex;
.company_con_left {
......@@ -640,10 +655,12 @@ export default {
.follow {
position: absolute;
right: 30px;
top: 30px;
width: 112px;
height: 32px;
background: #bcbfc7;
background: #b6b4b4;
background: #b5bdc5;
border-radius: 8px 8px 8px 8px;
opacity: 1;
text-align: center;
......@@ -656,6 +673,7 @@ export default {
.follow_str {
padding-left: 8px;
color: #fff;
// color: #f2c25e;
}
}
.card_title {
......
......@@ -669,8 +669,8 @@ export default {
#components-back-top-demo-custom .ant-back-top {
// bottom: 50%;
// right: 18.5%;
right: 370px;
top: 350px;
bottom: 55%;
right: 19%;
}
#components-back-top-demo-custom .ant-back-top-inner {
margin-top: 20px;
......
......@@ -314,8 +314,8 @@ export default {
#components-back-top-demo-custom .ant-back-top {
// bottom: 50%;
// right: 18.5%;
right: 370px;
top: 350px;
bottom: 55%;
right: 19%;
}
#components-back-top-demo-custom .ant-back-top-inner {
margin-top: 20px;
......
<template>
<div class="history">
<a-breadcrumb class="nav_bread">
<a-breadcrumb-item><router-link :to="'/home'">首页</router-link></a-breadcrumb-item>
<a-breadcrumb-item
><router-link :to="'/home'">首页</router-link></a-breadcrumb-item
>
<a-breadcrumb-item>我的关注</a-breadcrumb-item>
</a-breadcrumb>
<!-- 主体 -->
......@@ -11,22 +13,28 @@
:columns="columnshistory"
:data-source="dataHistory"
:pagination="false"
:customRow="rowClick"
>
<template #bodyCell="{ column, text, record }">
<template v-if="column.dataIndex == 'action'">
<a-button type="primary" danger @click="openModal"
<a-button type="primary" danger @click="openModal(record)"
>取消关注</a-button
>
</template>
<template v-if="column.dataIndex == 'f_type'">
{{ text == "patent" ? "专利" : "公司" }}
</template>
</template>
</a-table>
<br />
<a-pagination
@change="onChange"
:total="total"
v-model:current="currentPage"
:showSizeChanger="false"
/>
</div>
<a-modal
<!-- <a-modal
centered
style="text-align: center"
v-model:visible="visible"
......@@ -37,84 +45,155 @@
@onCancel="closeModal"
>
<p>是否确定从当前分组中删除该企业?</p>
</a-modal>
</a-modal> -->
</div>
</template>
<script>
import { message, Modal } from "ant-design-vue";
import { followList, cancelFollow } from "../../utils/userAPI";
export default {
name: "follow",
data() {
return {
total: 0,
visible: false,
currentPage: 1,
columnshistory: [
{
title: "序号",
dataIndex: "name",
key: "name",
dataIndex: "index",
key: "index",
width: 100,
},
{
title: "名称",
dataIndex: "age",
key: "age",
dataIndex: "name",
key: "name",
width: 300,
},
{
title: "类型",
dataIndex: "address",
key: "address 1",
},
{
title: "接受邮箱",
dataIndex: "address",
key: "address 2",
dataIndex: "f_type",
key: "f_type",
width: 200,
},
{
title: "时间",
dataIndex: "address",
key: "address 3",
title: "添加时间",
dataIndex: "follow_time",
key: "follow_time",
width: 200,
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: 200,
},
],
dataHistory: [
{
key: "1",
name: "John Brown",
age: 32,
address: "New York No. 1 Lake ",
action: 1,
},
],
dataHistory: [],
};
},
components: {},
methods: {
//初始化
init() {
followList({
page: this.currentPage,
size: 10,
}).then((res) => {
if (res.code == 0) {
this.dataHistory = res.data;
this.total = res.total;
this.dataHistory.forEach((item, index) => {
item.index = index + 1;
item.follow_time = item.follow_time.replace(/T/g, " ");
});
} else {
message.error(res.msg);
}
});
},
//跳转到专利详情或者公司详情页面
rowClick(record, index) {
if (record.f_type == "patent") {
return {
onClick: (event) => {
this.$router.push({
path: "/patentDetails",
query: {
id: record.ent_or_pat_id,
// zlcode: record.gkh,
zlcode: record.name,
},
});
},
};
} else {
return {
onClick: (event) => {
this.$router.push({
path: "/companyDetails",
query: {
id: record.ent_or_pat_id,
name:record.name ,
},
});
},
};
}
},
//改变页码
onChange() {},
onChange() {
this.init();
},
//取消关注
removeFollow() {
async removeFollow(item) {
console.log(item);
this.visible = false;
let cancelRes = await cancelFollow({
f_type: item.f_type,
ent_or_pat_id: item.ent_or_pat_id,
});
if (cancelRes.code == 0) {
this.$router.go(0);
message.success(cancelRes.msg);
} else {
message.error(cancelRes.msg);
}
},
//打开弹窗
openModal() {
openModal(record) {
let that = this;
this.visible = true;
Modal.confirm({
content: "是否确定从当前分组中删除该企业?",
cancelText: "取消",
okText: "确认",
onOk() {
that.removeFollow(record);
},
onCancel() {
that.visible = false;
},
});
},
//关闭弹窗
closeModal() {
this.visible = false;
},
},
created() {},
created() {
this.init();
},
};
</script>
<style lang="less" scoped>
.history {
padding: 0 30px;
width: calc(100%);
min-height: 820px;
min-height: 900px;
background-color: #ebebeb;
position: relative;
.nav_bread {
......@@ -125,6 +204,8 @@ export default {
.history_con {
background-color: #fff;
padding: 20px;
height: 92%;
text-align: center;
}
:deep(.ant-modal-footer) {
......
<template>
<div class="history">
<a-breadcrumb class="nav_bread">
<a-breadcrumb-item><router-link :to="'/home'">首页</router-link></a-breadcrumb-item>
<a-breadcrumb-item
><router-link :to="'/home'">首页</router-link></a-breadcrumb-item
>
<!-- <a-breadcrumb-item>历史记录</a-breadcrumb-item> -->
<a-breadcrumb-item v-if="activeKey == 1">浏览记录</a-breadcrumb-item>
<a-breadcrumb-item v-else>导出记录</a-breadcrumb-item>
......@@ -16,9 +18,16 @@
:data-source="dataHistory"
:pagination="false"
:style="'width:90%;'"
:customRow="rowClick"
>
<template #bodyCell="{ column, text, record }">
<template v-if="column.dataIndex == 'f_type'">
{{ text == "patent" ? "专利" : "公司" }}
</template>
</template>
</a-table>
<a-pagination
v-model:current="currentPage"
@change="onChange"
:total="total"
:showSizeChanger="false"
......@@ -51,6 +60,7 @@
<a-pagination
@change="onChange"
:total="total"
v-model:current="currentPage"
:showSizeChanger="false"
/>
</a-tab-pane>
......@@ -77,11 +87,14 @@
</div>
</template>
<script>
import { message } from "ant-design-vue";
import { userBrowse } from "../../utils/userAPI";
export default {
name: "history",
data() {
return {
visible: false,
currentPage: 1,
validateMessages: {
required: "请输入邮箱",
types: {
......@@ -96,27 +109,31 @@ export default {
columnshistory: [
{
title: "序号",
dataIndex: "name",
key: "name",
dataIndex: "index",
key: "index",
width: 100,
},
{
title: "名称",
dataIndex: "age",
key: "age",
dataIndex: "name",
key: "name",
width: 300,
},
{
title: "类型",
dataIndex: "address",
key: "address 1",
dataIndex: "f_type",
key: "f_type",
width: 200,
},
{
title: "时间",
dataIndex: "address",
key: "address 3",
dataIndex: "browse_date",
key: "browse_date",
width: 200,
},
],
columnout:[
{
columnout: [
{
title: "序号",
dataIndex: "name",
key: "name",
......@@ -130,19 +147,19 @@ export default {
title: "类型",
dataIndex: "address",
key: "address 1",
width:200
width: 200,
},
{
title: "接受邮箱",
dataIndex: "address",
key: "address 3",
width:200
width: 200,
},
{
title: "时间",
dataIndex: "address",
key: "address 3",
width:200
width: 200,
},
{
title: "操作",
......@@ -150,19 +167,40 @@ export default {
key: "address 3",
},
],
dataHistory: [
{
key: "1",
name: "John Brown",
age: 32,
address: "New York No. 1 Lake Park, New York No. 1 Lake Park",
action: 1,
},
],
dataHistory: [],
};
},
components: {},
methods: {
//跳转到专利详情或者公司详情页面
rowClick(record, index) {
if (record.f_type == "patent") {
return {
onClick: (event) => {
this.$router.push({
path: "/patentDetails",
query: {
id: record.ent_or_pat_id,
// zlcode: record.gkh,
zlcode: record.name,
},
});
},
};
} else {
return {
onClick: (event) => {
this.$router.push({
path: "/companyDetails",
query: {
id: record.ent_or_pat_id,
name:record.name ,
},
});
},
};
}
},
//发送到邮箱
sendMail() {
this.visible = false;
......@@ -175,15 +213,37 @@ export default {
closeModal() {
this.visible = false;
},
//浏览记录翻页
onChange(){
this.init()
},
init() {
userBrowse({
page: this.currentPage,
size: 10,
}).then((res) => {
if (res.code == 0) {
this.dataHistory = res.data.data;
this.total = res.data.total;
this.dataHistory.forEach((item, index) => {
item.index = index + 1;
});
} else {
message.error(res.msg);
}
});
},
},
created() {
this.init();
},
created() {},
};
</script>
<style lang="less" scoped>
.history {
padding: 0 30px;
width: calc(100%);
min-height: 820px;
min-height: 900px;
background-color: #ebebeb;
position: relative;
.nav_bread {
......@@ -194,6 +254,7 @@ export default {
.history_con {
background-color: #fff;
padding: 20px;
height: 92%;
text-align: center;
// height: 600px;
}
......
......@@ -66,7 +66,11 @@
</div>
<!-- 判断是否有数据 -->
<ul v-if="innovateList.length !== 0">
<li class="rank_item" v-for="item in innovateList" @click="openDetails">
<li
class="rank_item"
v-for="item in innovateList"
@click="openDetails"
>
{{ item }}
</li>
</ul>
......@@ -82,7 +86,11 @@
<span class="more" @click="openmore('2')">更多</span>
</div>
<ul v-if="innovateList.length !== 0">
<li class="rank_item" v-for="item in innovateList" @click="openDetails">
<li
class="rank_item"
v-for="item in innovateList"
@click="openDetails"
>
{{ item }}
</li>
</ul>
......@@ -97,9 +105,13 @@
<span class="title">&nbsp;浏览记录</span>
<span class="more" @click="openHistory">更多</span>
</div>
<ul v-if="followList.length !== 0">
<li class="rank_item" v-for="item in followList">
{{ item }}
<ul v-if="historyList.length !== 0">
<li
class="rank_item"
v-for="item in historyList"
@click="openDetails(item)"
>
{{ item.name }}
</li>
</ul>
<div class="empty_img" v-else>
......@@ -114,8 +126,12 @@
<span class="more" @click="openFollow">更多</span>
</div>
<ul v-if="followList.length !== 0">
<li class="rank_item" v-for="item in followList">
{{ item }}
<li
class="rank_item"
v-for="item in followList"
@click="openDetails(item)"
>
{{ item.name }}
</li>
</ul>
<div class="empty_img" v-else>
......@@ -127,6 +143,7 @@
</div>
</template>
<script>
import { followList, userBrowse } from "../../utils/userAPI";
export default {
name: "home",
data() {
......@@ -134,6 +151,7 @@ export default {
tab_id: "1",
searchValue: "",
followList: [],
historyList: [],
innovateList: [
"山煤国际能源集团股份有限公司",
"山煤国际能源集团股份有限公司",
......@@ -143,6 +161,35 @@ export default {
},
components: {},
methods: {
//页面初始化
init() {
this.getFollow();
this.getHistory();
},
getFollow() {
followList({
page: 1,
size: 10,
}).then((res) => {
if (res.code == 0) {
this.followList = res.data;
} else {
message.error(res.msg);
}
});
},
getHistory() {
userBrowse({
page: 1,
size: 10,
}).then((res) => {
if (res.code == 0) {
this.historyList = res.data.data;
} else {
message.error(res.msg);
}
});
},
//打开历史记录
openHistory() {
this.$router.push({
......@@ -154,26 +201,44 @@ export default {
this.$router.push({
path: "/follow",
});
},
//打开企业详情或者专利
openDetails(item) {
if (item.f_type == "patent") {
this.$router.push({
path: "/patentDetails",
query: {
id: item.ent_or_pat_id,
// zlcode: record.gkh,
zlcode: item.name,
},
});
} else {
this.$router.push({
path: "/companyDetails",
query: {
id: item.ent_or_pat_id,
name: item.name,
},
});
}
},
//打开榜单
openmore(id) {
if (id == '1') {
if (id == "1") {
this.$router.push({
path: "/company",
query: {
valueInnovation: "企业科创能力",
},
});
}else{
} else {
this.$router.push({
path: "/company",
query: {
valueInnovation: "企业技术合作",
},
});
}
},
changetab(id) {
......@@ -182,36 +247,26 @@ export default {
},
onSearch() {
if (this.tab_id == "1") {
this.$router.push({
path: "/patent",
query: {
keyword: this.searchValue,
},
});
} else {
this.$router.push({
path: "/company",
query: {
keyword: this.searchValue,
},
});
}
},
//点击榜单里的企业跳转到企业详情
openDetails(){
this.$router.push({
path:'/companyDetails'
})
}
},
mounted() {},
created() {},
created() {
this.init();
},
};
</script>
<style lang="less" scoped>
......
......@@ -194,7 +194,7 @@ export default {
.home_main {
height: 100%;
min-height: 960px;
min-height: 900px;
width: 100%;
background-color: #ebebeb;
display: flex;
......
......@@ -193,6 +193,7 @@ export default {
background-color: #fafbfe;
height: 100%;
background-image: url("../../static/login/img-bg.png");
background-size: 100% 100%;
header {
height: 65px;
background-color: #fff;
......
......@@ -410,7 +410,7 @@ export default {
padding: 0 30px;
width: calc(100%);
// height: calc(100% - 65px);
min-height: 830px;
min-height: 900px;
background-color: #ebebeb;
position: relative;
.nav_bread {
......@@ -421,7 +421,7 @@ export default {
.patent_con {
background-color: #f3f3f6;
width: 100%;
height: calc(90%);
height: calc(92%);
display: flex;
justify-content: space-between;
.patent_con_left {
......
......@@ -11,8 +11,8 @@
</a-breadcrumb>
<div class="back_btn" @click="backbtn">返回</div>
<div class="details_title">
<div class="patent_num">{{ zlcode }}</div>
<div class="patent_title">{{ title }}</div>
<div class="patent_num">{{ zlcode?zlcode:details.gkh }}</div>
<div class="patent_title">{{ title?title:details.title }}</div>
</div>
<div class="btn_group">
<span style="cursor: pointer" @click="openModal"
......@@ -22,7 +22,7 @@
<span style="cursor: pointer" @click="followFun" v-if="!details.follow"
><img src="@/static/patent/icon-gz.png" alt="" />关注</span
>
<span style="cursor: pointer" @click="followFun" v-else
<span style="cursor: pointer" @click="cancelFun" v-else
><img src="@/static/patent/icon-gz-select.png" alt="" />已关注</span
>
</div>
......@@ -227,7 +227,7 @@
回到顶部
</div>
</a-back-top>
<!-- <div class="back">回到顶部</div> -->
</div>
</div>
<div class="patent_con_right">
......@@ -355,7 +355,7 @@ import * as echarts from "echarts";
import "echarts-wordcloud";
import { DownOutlined } from "@ant-design/icons-vue";
import { patentDetail, exportword, Recommend } from "../../utils/indexApi";
import { userFollow } from "../../utils/userAPI";
import { userFollow,cancelFollow } from "../../utils/userAPI";
import EchartsCloud from "../../components/EchartsCloud.vue";
import docxtemplater from "docxtemplater";
import PizZip from "pizzip";
......@@ -417,12 +417,25 @@ export default {
DownOutlined,
},
methods: {
//取消关注
async cancelFun(){
let cancelRes = await cancelFollow({
f_type:"patent",
ent_or_pat_id:this.id
})
if(cancelRes.code == 0){
this.$router.go(0)
message.success(cancelRes.msg)
}else{
message.error(cancelRes.msg)
}
},
//关注接口
async followFun() {
let Follow = await userFollow({
f_type: "patent",
ent_or_pat_id: this.id,
name: this.title,
name: this.details.gkh,
});
if(Follow.code == 0){
this.$router.go(0)
......@@ -776,6 +789,7 @@ export default {
}
.company_con_anchor {
margin-top: 15px;
font-weight: bold;
color: #1c1c28;
:deep(.ant-anchor-link-title) {
......@@ -800,8 +814,8 @@ export default {
padding: 30px 15px 0;
}
#components-back-top-demo-custom .ant-back-top {
// bottom: 50%;
// right: 18.5%;
bottom: 50%;
right: 18.5%;
right: 780px;
top: 350px;
}
......@@ -814,17 +828,9 @@ export default {
line-height: 60px;
border-radius: 8px;
}
}
.back {
display: none;
margin-top: 20px;
width: 150px;
height: 60px;
background-color: #fff;
text-align: center;
line-height: 60px;
}
.patent_con_right {
margin-top: 15px;
width: 610px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment