Commit c5c37576 by liudx

调整智能推荐word模板

parent 66f220ea
No preview for this file type
......@@ -565,6 +565,21 @@ export default {
],
});
//智能推荐表格请求前10个
let listRecommend = []
Recommend({
id: that.id,
page: that.currentPage,
size: 10,
qualifications: [],
}).then((res) => {
if (res.code == 0) {
listRecommend = res.data.list;
} else {
message.error(res.msg);
}
});
setTimeout(() => {
// 加setTimeout是为了让echarts渲染完成后生成图片
JSZipUtils.getBinaryContent(
......@@ -604,9 +619,10 @@ export default {
// 设置图片模块
doc.attachModule(new ImageModule(opts));
let list = that.list;
list.forEach((item) => {
listRecommend.forEach((item,index) => {
item.index = index+1
item.qualif = [];
if (item.high_new == 1) {
item.qualif.push("高新技术企业");
......@@ -636,7 +652,7 @@ export default {
doc.setData({
...details,
today,
list,
listRecommend,
// business_scope,
// patent,
image1: myChart1.getDataURL({
......@@ -660,7 +676,7 @@ export default {
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
});
//formData文件流
that.blobToBase64(out, that.formState.email,that.details.gkh);
that.blobToBase64(out, that.formState.email, that.details.gkh);
// 将目标文件对象保存为目标类型的文件,并命名
// saveAs(out, `专利成果转移转化智能推荐报告.docx`);
that.visible = false;
......@@ -674,7 +690,7 @@ export default {
// 处理验证失败的情况
});
},
blobToBase64(blob, email,name) {
blobToBase64(blob, email, name) {
return new Promise((resolve, reject) => {
const fileReader = new FileReader();
fileReader.onload = (e) => {
......@@ -682,7 +698,7 @@ export default {
exportword({
report_data: e.target.result,
email: email,
name:name
name: name,
}).then((res) => {
if (res.code == 0) {
message.success(res.msg);
......
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