Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
ty_patentSys
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanxiao
ty_patentSys
Commits
c5c37576
Commit
c5c37576
authored
Aug 09, 2023
by
liudx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整智能推荐word模板
parent
66f220ea
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
public/patent.docx
+0
-0
src/views/patent/patentDetails.vue
+22
-6
No files found.
public/patent.docx
View file @
c5c37576
No preview for this file type
src/views/patent/patentDetails.vue
View file @
c5c37576
...
...
@@ -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
,
list
Recommend
,
// 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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment