Commit aa7927e4 by liudx

联调导出记录、导出、发送邮箱接口

parent 3996c299
...@@ -11,6 +11,10 @@ export const cancelFollow = p => Delete('/api/users/userFollow', p); ...@@ -11,6 +11,10 @@ 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 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); export const userBrowse = p => get('/api/users/userBrowse?page='+p.page+'&size='+p.size);
//用户导出记录
export const ExportList = p => get(' /api/users/enterprisePatentExport?page='+p.page+'&size='+p.size);
//导出记录里的发送邮箱
export const sendEmail = p => post('/api/common/sendEmail', p);
......
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
<span style="cursor: pointer" @click="openModal" <span style="cursor: pointer" @click="openModal"
><img src="@/static/patent/icon-dc.png" alt="" />导出</span ><img src="@/static/patent/icon-dc.png" alt="" />导出</span
> >
<span @click="followFun" v-if="!baseinfo.follow" <span style="cursor: pointer" @click="followFun" v-if="!baseinfo.follow"
><img src="@/static/patent/icon-gz.png" alt="" />关注</span ><img src="@/static/patent/icon-gz.png" alt="" />关注</span
> >
<span @click="cancelFun" v-else <span style="cursor: pointer" @click="cancelFun" v-else
><img src="@/static/patent/icon-gz-select.png" alt="" />已关注</span ><img src="@/static/patent/icon-gz-select.png" alt="" />已关注</span
> >
</div> </div>
...@@ -1217,7 +1217,7 @@ export default { ...@@ -1217,7 +1217,7 @@ export default {
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
}); });
//formData文件流 //formData文件流
that.blobToBase64(out, that.formState.email,that.baseinfo.company_name); that.blobToBase64(out, that.formState.email,that.baseinfo.company_name,that.id);
// 将目标文件对象保存为目标类型的文件,并命名 // 将目标文件对象保存为目标类型的文件,并命名
// saveAs(out, `企业科创能力报告.docx`); // saveAs(out, `企业科创能力报告.docx`);
} }
...@@ -1230,7 +1230,7 @@ export default { ...@@ -1230,7 +1230,7 @@ export default {
// 处理验证失败的情况 // 处理验证失败的情况
}); });
}, },
blobToBase64(blob, email,name) { blobToBase64(blob, email,name,id) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const fileReader = new FileReader(); const fileReader = new FileReader();
fileReader.onload = (e) => { fileReader.onload = (e) => {
...@@ -1239,7 +1239,8 @@ export default { ...@@ -1239,7 +1239,8 @@ export default {
report_data: e.target.result, report_data: e.target.result,
email: email, email: email,
name:name, name:name,
f_type:'enterprise' f_type:'enterprise',
ent_or_pat_id:id
}).then((res) => { }).then((res) => {
if (res.code == 0) { if (res.code == 0) {
message.success(res.msg); message.success(res.msg);
......
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
>条相关结果 >条相关结果
<!-- 筛选的标签展示 --> <!-- 筛选的标签展示 -->
<div class="filter"> <div class="filter">
<a-tag color="blue" v-for="item in filter"> <a-tag class="tags" color="blue" v-for="item in filter">
{{ item }} {{ item }}
</a-tag> </a-tag>
</div> </div>
...@@ -133,8 +133,6 @@ ...@@ -133,8 +133,6 @@
@click="openCompany(item.mysql_id, item.company_name)" @click="openCompany(item.mysql_id, item.company_name)"
> >
{{ item.company_name }} {{ item.company_name }}
</div>
<br />
<!-- 关注 --> <!-- 关注 -->
<div <div
class="follow" class="follow"
...@@ -156,6 +154,8 @@ ...@@ -156,6 +154,8 @@
/> />
<span class="follow_str">已关注</span> <span class="follow_str">已关注</span>
</div> </div>
</div>
<a-tag color="#56CA95">{{ item.status }}</a-tag> <a-tag color="#56CA95">{{ item.status }}</a-tag>
<a-tag color="#6096E6" v-if="item.quoted_company == 1">{{ <a-tag color="#6096E6" v-if="item.quoted_company == 1">{{
"上市企业" "上市企业"
...@@ -170,7 +170,6 @@ ...@@ -170,7 +170,6 @@
<a-tag color="#6096E6" v-if="item.zjtg == 1">{{ <a-tag color="#6096E6" v-if="item.zjtg == 1">{{
"专精特新中小企业" "专精特新中小企业"
}}</a-tag> }}</a-tag>
<a-divider /> <a-divider />
<div class="card_desc"> <div class="card_desc">
<a-descriptions layout="vertical"> <a-descriptions layout="vertical">
...@@ -262,7 +261,7 @@ export default { ...@@ -262,7 +261,7 @@ export default {
ent_or_pat_id: id, ent_or_pat_id: id,
}); });
if (cancelRes.code == 0) { if (cancelRes.code == 0) {
this.Filter(); this.onChange(this.currentPage);
message.success(cancelRes.msg); message.success(cancelRes.msg);
} else { } else {
message.error(cancelRes.msg); message.error(cancelRes.msg);
...@@ -278,7 +277,7 @@ export default { ...@@ -278,7 +277,7 @@ export default {
if (Follow.code == 0) { if (Follow.code == 0) {
message.success(Follow.msg); message.success(Follow.msg);
this.Filter(); this.onChange(this.currentPage);
} else { } else {
message.error(Follow.msg); message.error(Follow.msg);
} }
...@@ -366,6 +365,24 @@ export default { ...@@ -366,6 +365,24 @@ export default {
innovate: this.valueInnovation, innovate: this.valueInnovation,
}; };
//将筛选条件渲染到页面上//搜索结果标签
let filter = [];
this.filter = [];
for (var key in params) {
filter = [
...params.area,
...params.company_industry,
...params.qualification,
// params.innovate,
];
if (key == "keyword") {
params.keyword ? filter.push(params.keyword) : "";
}
if (key == "innovate") {
params.innovate ? filter.push(params.innovate) : "";
}
}
this.filter = filter;
//请求接口 //请求接口
enterpriseSelect({ ...params }).then((res) => { enterpriseSelect({ ...params }).then((res) => {
if (res.code == 0) { if (res.code == 0) {
...@@ -446,9 +463,9 @@ export default { ...@@ -446,9 +463,9 @@ export default {
//企业结果 //企业结果
this.companylist = []; this.companylist = [];
this.currentPage = 1;
let params = { let params = {
page: this.currentPage, page: 1,
size: 10, size: 10,
keyword: this.keyword ? this.keyword : null, keyword: this.keyword ? this.keyword : null,
area: area, area: area,
...@@ -484,7 +501,6 @@ export default { ...@@ -484,7 +501,6 @@ export default {
this.filter = filter; this.filter = filter;
//请求接口 //请求接口
enterpriseSelect({ ...params }).then((res) => { enterpriseSelect({ ...params }).then((res) => {
if (res.code == 0) { if (res.code == 0) {
this.companylist = res.data.list; this.companylist = res.data.list;
this.total = res.data.total; this.total = res.data.total;
...@@ -550,9 +566,7 @@ export default { ...@@ -550,9 +566,7 @@ export default {
this.formState.capital_nums_max = searchValue.capital_nums_max; this.formState.capital_nums_max = searchValue.capital_nums_max;
this.valueInnovation = searchValue.valueInnovation; this.valueInnovation = searchValue.valueInnovation;
this.keyword = searchValue.keyword; this.keyword = searchValue.keyword;
this.Filter(); this.onChange(this.currentPage);
} else {
this.Filter();
} }
}, },
}; };
...@@ -653,15 +667,23 @@ export default { ...@@ -653,15 +667,23 @@ export default {
margin-bottom: 15px; margin-bottom: 15px;
position: relative; position: relative;
margin-right: 1%; margin-right: 1%;
:deep(.ant-tag-has-color) { :deep(.ant-tag-has-color) {
padding: 5px; padding: 5px;
border-radius: 6px; border-radius: 6px;
margin: 10px 5px;
} }
.card_title {
font-family: Microsoft YaHei UI-Regular, Microsoft YaHei UI;
font-weight: 400;
color: #333333;
font-size: 20px;
cursor: pointer;
display: flex;
justify-content: space-between;
.follow { .follow {
position: absolute;
right: 30px;
top: 30px;
width: 112px; width: 112px;
height: 32px; height: 32px;
background: #b6b4b4; background: #b6b4b4;
...@@ -671,6 +693,7 @@ export default { ...@@ -671,6 +693,7 @@ export default {
text-align: center; text-align: center;
line-height: 32px; line-height: 32px;
cursor: pointer; cursor: pointer;
.follow_img { .follow_img {
width: 20px; width: 20px;
margin-top: -5px; margin-top: -5px;
...@@ -681,12 +704,6 @@ export default { ...@@ -681,12 +704,6 @@ export default {
// color: #f2c25e; // color: #f2c25e;
} }
} }
.card_title {
font-family: Microsoft YaHei UI-Regular, Microsoft YaHei UI;
font-weight: 400;
color: #333333;
font-size: 20px;
cursor: pointer;
} }
.card_desc { .card_desc {
:deep(.ant-descriptions-item-label) { :deep(.ant-descriptions-item-label) {
......
...@@ -107,10 +107,12 @@ export default { ...@@ -107,10 +107,12 @@ export default {
if (res.code == 0) { if (res.code == 0) {
this.dataHistory = res.data; this.dataHistory = res.data;
this.total = res.total; this.total = res.total;
if (this.dataHistory.length > 0) {
this.dataHistory.forEach((item, index) => { this.dataHistory.forEach((item, index) => {
item.index = (this.currentPage-1) * 10 + index+1; item.index = (this.currentPage - 1) * 10 + index + 1;
item.follow_time = item.follow_time.replace(/T/g, " "); item.follow_time = item.follow_time.replace(/T/g, " ");
}); });
}
} else { } else {
message.error(res.msg); message.error(res.msg);
} }
...@@ -118,7 +120,6 @@ export default { ...@@ -118,7 +120,6 @@ export default {
}, },
//跳转到专利详情或者公司详情页面 //跳转到专利详情或者公司详情页面
rowClick(record) { rowClick(record) {
console.log(record)
if (record.f_type == "patent") { if (record.f_type == "patent") {
this.$router.push({ this.$router.push({
path: "/patentDetails", path: "/patentDetails",
...@@ -144,14 +145,13 @@ export default { ...@@ -144,14 +145,13 @@ export default {
}, },
//取消关注 //取消关注
async removeFollow(item) { async removeFollow(item) {
console.log(item);
this.visible = false; this.visible = false;
let cancelRes = await cancelFollow({ let cancelRes = await cancelFollow({
f_type: item.f_type, f_type: item.f_type,
ent_or_pat_id: item.ent_or_pat_id, ent_or_pat_id: item.ent_or_pat_id,
}); });
if (cancelRes.code == 0) { if (cancelRes.code == 0) {
this.$router.go(0); this.onChange()
message.success(cancelRes.msg); message.success(cancelRes.msg);
} else { } else {
message.error(cancelRes.msg); message.error(cancelRes.msg);
...@@ -201,13 +201,12 @@ export default { ...@@ -201,13 +201,12 @@ export default {
padding: 20px; padding: 20px;
height: 92%; height: 92%;
text-align: center; text-align: center;
} }
:deep(.ant-modal-footer) { :deep(.ant-modal-footer) {
text-align: center !important; text-align: center !important;
} }
:deep(.ant-table-tbody){ :deep(.ant-table-tbody) {
cursor: pointer; cursor: pointer;
} }
} }
......
...@@ -39,24 +39,31 @@ ...@@ -39,24 +39,31 @@
<p style="text-align: left">系统会为您保留 30 天的导出记录</p> <p style="text-align: left">系统会为您保留 30 天的导出记录</p>
<a-table <a-table
:columns="columnout" :columns="columnout"
:data-source="dataHistory" :data-source="dataExport"
:pagination="false" :pagination="false"
:style="'width:90%'" :style="'width:90%'"
> >
<template #bodyCell="{ column, text, record }"> <template #bodyCell="{ column, text, record }">
<template v-if="column.dataIndex == 'action'"> <template v-if="column.dataIndex == 'action'">
<a-button <a-button
@click="exportPDF(record)"
style=" style="
background-color: #fa7f03; background-color: #fa7f03;
color: #fff; color: #fff;
margin-right: 10%; margin-right: 10%;
" "
>导出</a-button
> >
<a-button type="primary" @click="openModal" 导出
</a-button>
<a-button type="primary" @click="sendMail(record)"
>发送到邮箱</a-button >发送到邮箱</a-button
> >
</template> </template>
<template v-if="column.dataIndex == 'f_type'">
{{ text == "patent" ? "专利" : "公司" }}
</template>
<template v-if="column.dataIndex == 'name'"> <template v-if="column.dataIndex == 'name'">
<span @click="rowClick(record)">{{ text }}</span> <span @click="rowClick(record)">{{ text }}</span>
</template> </template>
...@@ -71,7 +78,7 @@ ...@@ -71,7 +78,7 @@
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</div> </div>
<a-modal <!-- <a-modal
v-model:visible="visible" v-model:visible="visible"
title="发送邮箱" title="发送邮箱"
@ok="sendMail" @ok="sendMail"
...@@ -88,12 +95,13 @@ ...@@ -88,12 +95,13 @@
<a-input v-model:value="formState.email" /> <a-input v-model:value="formState.email" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-modal> </a-modal> -->
</div> </div>
</template> </template>
<script> <script>
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import { userBrowse } from "../../utils/userAPI"; import { userBrowse, ExportList,sendEmail } from "../../utils/userAPI";
export default { export default {
name: "history", name: "history",
data() { data() {
...@@ -116,19 +124,19 @@ export default { ...@@ -116,19 +124,19 @@ export default {
title: "序号", title: "序号",
dataIndex: "index", dataIndex: "index",
key: "index", key: "index",
width: 100, width: 80,
}, },
{ {
title: "名称", title: "名称",
dataIndex: "name", dataIndex: "name",
key: "name", key: "name",
width: 300, width: 200,
}, },
{ {
title: "类型", title: "类型",
dataIndex: "f_type", dataIndex: "f_type",
key: "f_type", key: "f_type",
width: 200, width: 100,
}, },
{ {
title: "时间", title: "时间",
...@@ -140,31 +148,32 @@ export default { ...@@ -140,31 +148,32 @@ export default {
columnout: [ columnout: [
{ {
title: "序号", title: "序号",
dataIndex: "name", dataIndex: "index",
key: "name", key: "index",
width: 100,
}, },
{ {
title: "名称", title: "名称",
dataIndex: "age", dataIndex: "name",
key: "age", key: "name",
}, },
{ {
title: "类型", title: "类型",
dataIndex: "address", dataIndex: "f_type",
key: "address 1", key: "f_type",
width: 200, width: 100,
}, },
{ {
title: "接受邮箱", title: "接受邮箱",
dataIndex: "address", dataIndex: "email",
key: "address 3", key: "email",
width: 200, width: 200,
}, },
{ {
title: "时间", title: "时间",
dataIndex: "address", dataIndex: "export_time",
key: "address 3", key: "export_time",
width: 200, width: 150,
}, },
{ {
title: "操作", title: "操作",
...@@ -173,6 +182,7 @@ export default { ...@@ -173,6 +182,7 @@ export default {
}, },
], ],
dataHistory: [], dataHistory: [],
dataExport:[]
}; };
}, },
components: {}, components: {},
...@@ -199,8 +209,18 @@ export default { ...@@ -199,8 +209,18 @@ export default {
} }
}, },
//发送到邮箱 //发送到邮箱
sendMail() { async sendMail(record) {
this.visible = false; // this.visible = false;
let res = await sendEmail({
email:record.email,
name:record.name,
url:record.url
})
if(res.code==200){
message.success(res.msg)
}else{
message.error(res.msg)
}
}, },
//打开弹窗 //打开弹窗
openModal() { openModal() {
...@@ -222,14 +242,38 @@ export default { ...@@ -222,14 +242,38 @@ export default {
if (res.code == 0) { if (res.code == 0) {
this.dataHistory = res.data.data; this.dataHistory = res.data.data;
this.total = res.data.total; this.total = res.data.total;
if(this.dataHistory.length>0){
this.dataHistory.forEach((item, index) => { this.dataHistory.forEach((item, index) => {
item.index = (this.currentPage-1) * 10 + index+1; item.index = (this.currentPage - 1) * 10 + index + 1;
}); });
}
} else {
message.error(res.msg);
}
});
ExportList({
page: this.currentPage,
size: 10,
}).then((res) => {
if (res.code == 0) {
this.dataExport = res.data.data;
this.total = res.data.total;
if(this.dataExport.length>0){
this.dataExport.forEach((item, index) => {
item.index = (this.currentPage - 1) * 10 + index + 1;
});
}
} else { } else {
message.error(res.msg); message.error(res.msg);
} }
}); });
}, },
//导出pdf
exportPDF(record){
window.open(record.url)
}
}, },
created() { created() {
this.init(); this.init();
...@@ -255,7 +299,7 @@ export default { ...@@ -255,7 +299,7 @@ export default {
text-align: center; text-align: center;
// height: 600px; // height: 600px;
} }
:deep(.ant-table-tbody){ :deep(.ant-table-tbody) {
cursor: pointer; cursor: pointer;
} }
} }
......
...@@ -422,6 +422,9 @@ export default { ...@@ -422,6 +422,9 @@ export default {
line-height: 40px; line-height: 40px;
color: #555770; color: #555770;
cursor: pointer; cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
li::marker { li::marker {
color: #ccc; color: #ccc;
......
...@@ -457,4 +457,7 @@ export default { ...@@ -457,4 +457,7 @@ export default {
} }
} }
} }
:deep(.ant-table-tbody){
cursor: pointer;
}
</style> </style>
...@@ -252,17 +252,17 @@ ...@@ -252,17 +252,17 @@
> >
{{ item.company_name }} {{ item.company_name }}
</div> </div>
<a-tag color="#56CA95">{{ item.status }}</a-tag> <a-tag class="tags" color="#56CA95">{{ item.status }}</a-tag>
<a-tag color="#6096E6" v-if="item.quoted_company == 1">{{ <a-tag class="tags" color="#6096E6" v-if="item.quoted_company == 1">{{
"上市挂牌企业" "上市挂牌企业"
}}</a-tag> }}</a-tag>
<a-tag color="#6096E6" v-if="item.high_new == 1">{{ <a-tag class="tags" color="#6096E6" v-if="item.high_new == 1">{{
"高新技术企业" "高新技术企业"
}}</a-tag> }}</a-tag>
<a-tag color="#6096E6" v-if="item.zjtg_sjxjr == 1">{{ <a-tag class="tags" color="#6096E6" v-if="item.zjtg_sjxjr == 1">{{
"专精特新小巨人" "专精特新小巨人"
}}</a-tag> }}</a-tag>
<a-tag color="#6096E6" v-if="item.zjtg == 1">{{ <a-tag class="tags" color="#6096E6" v-if="item.zjtg == 1">{{
"专精特新中小企业" "专精特新中小企业"
}}</a-tag> }}</a-tag>
<a-divider /> <a-divider />
...@@ -483,9 +483,9 @@ export default { ...@@ -483,9 +483,9 @@ export default {
}); });
}, },
//智能推荐翻页 //智能推荐翻页
onChange() { onChange(page) {
window.scrollTo(0, 0); window.scrollTo(0, 0);
this.currentPage = 1; this.currentPage = page;
this.getRecommend(); this.getRecommend();
}, },
getRecommend() { getRecommend() {
...@@ -676,7 +676,7 @@ export default { ...@@ -676,7 +676,7 @@ export default {
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
}); });
//formData文件流 //formData文件流
that.blobToBase64(out, that.formState.email, that.details.gkh); that.blobToBase64(out, that.formState.email, that.details.gkh,this.id);
// 将目标文件对象保存为目标类型的文件,并命名 // 将目标文件对象保存为目标类型的文件,并命名
// saveAs(out, `专利成果转移转化智能推荐报告.docx`); // saveAs(out, `专利成果转移转化智能推荐报告.docx`);
that.visible = false; that.visible = false;
...@@ -699,7 +699,8 @@ export default { ...@@ -699,7 +699,8 @@ export default {
report_data: e.target.result, report_data: e.target.result,
email: email, email: email,
name: name, name: name,
f_type:'patent' f_type:'patent',
ent_or_pat_id:id
}).then((res) => { }).then((res) => {
if (res.code == 0) { if (res.code == 0) {
message.success(res.msg); message.success(res.msg);
...@@ -922,6 +923,9 @@ export default { ...@@ -922,6 +923,9 @@ export default {
color: #333333; color: #333333;
font-size: 20px; font-size: 20px;
} }
.tags{
margin: 5px;
}
.card_desc { .card_desc {
:deep(b) { :deep(b) {
color: rgba(191, 36, 40, 1); color: rgba(191, 36, 40, 1);
......
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