Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
F
fund_report
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭熊
fund_report
Commits
2eee5b2d
Commit
2eee5b2d
authored
Dec 07, 2020
by
pengxiong@wealthgrow.cn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模版分页
parent
7f437900
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
139 additions
and
20 deletions
+139
-20
monthReportV2.html
app/templates/v2/monthReportV2.html
+135
-16
html_to_pdf.py
app/utils/html_to_pdf.py
+3
-3
jinjia2html.py
app/utils/jinjia2html.py
+1
-1
No files found.
app/templates/v2/monthReportV2.html
View file @
2eee5b2d
...
@@ -238,11 +238,13 @@
...
@@ -238,11 +238,13 @@
line-height
:
23px
;
line-height
:
23px
;
color
:
#B6172B
;
color
:
#B6172B
;
font-weight
:
bold
;
font-weight
:
bold
;
white-space
:
nowrap
;
}
}
/* 投资总览 */
/* 投资总览 */
.box2
.box2_content
{
.box2
.box2_content
{
padding
:
47px
34px
61px
34px
;
padding
:
47px
34px
61px
34px
;
page-break-after
:
always
;
}
}
/* 表格样式1 */
/* 表格样式1 */
...
@@ -421,6 +423,7 @@
...
@@ -421,6 +423,7 @@
/* 目标与业绩 */
/* 目标与业绩 */
.box3
.box3_content
{
.box3
.box3_content
{
padding
:
47px
34px
61px
34px
;
padding
:
47px
34px
61px
34px
;
page-break-after
:
always
;
}
}
/* 收益比较、相关性分析 */
/* 收益比较、相关性分析 */
...
@@ -607,11 +610,13 @@
...
@@ -607,11 +610,13 @@
/* 业绩的明细 */
/* 业绩的明细 */
.box4
.box4_content
{
.box4
.box4_content
{
padding
:
47px
34px
61px
34px
;
padding
:
47px
34px
61px
34px
;
page-break-after
:
always
;
}
}
/* 个基点评 */
/* 个基点评 */
.box5
.box5_content
{
.box5
.box5_content
{
padding
:
47px
34px
61px
34px
;
padding
:
47px
34px
61px
34px
;
page-break-after
:
always
;
}
}
.geji_list_wrap
.self_item
{
.geji_list_wrap
.self_item
{
...
@@ -718,7 +723,7 @@
...
@@ -718,7 +723,7 @@
}
}
.geji_list_wrap
.self_item
.self_item_right
{
.geji_list_wrap
.self_item
.self_item_right
{
margin
:
20px
26px
2
0px
26px
;
margin
:
30px
26px
3
0px
26px
;
}
}
.geji_list_wrap
.self_item
.self_item_right
.self_img
{
.geji_list_wrap
.self_item
.self_item_right
.self_img
{
...
@@ -791,11 +796,13 @@
...
@@ -791,11 +796,13 @@
/* 优化组合建议 */
/* 优化组合建议 */
.box6
.box6_content
{
.box6
.box6_content
{
padding
:
47px
34px
61px
34px
;
padding
:
47px
34px
61px
34px
;
page-break-after
:
always
;
}
}
/* 新增基金 */
/* 新增基金 */
.box7
.box7_content
{
.box7
.box7_content
{
padding
:
47px
34px
61px
34px
;
padding
:
47px
34px
61px
34px
;
page-break-after
:
always
;
}
}
/* 结尾 */
/* 结尾 */
...
@@ -978,7 +985,7 @@
...
@@ -978,7 +985,7 @@
<div
class=
"box_line"
></div>
<div
class=
"box_line"
></div>
<!-- 投资总览 -->
<!-- 投资总览 -->
<div
class=
"box2"
>
<div
class=
"box2"
style=
"page-break-before:always;"
>
<div
class=
"page dtable"
>
<div
class=
"page dtable"
>
<div
class=
"page_title dcell"
>
<div
class=
"page_title dcell"
>
投资总览
投资总览
...
@@ -1582,6 +1589,25 @@
...
@@ -1582,6 +1589,25 @@
</div>
</div>
<!-- 贡献分解 -->
<!-- 贡献分解 -->
<div
class=
"page dtable"
style=
"page-break-before:always;"
>
<div
class=
"page_title dcell"
>
</div>
<div
class=
"page_head dcell"
>
<div
class=
"dcell"
>
<img
src=
{{logo}}
alt=
""
class=
"page_logo"
>
</div>
<div
class=
"dcell"
>
<div
class=
"page_line"
></div>
</div>
<div
class=
"dcell"
>
<div
class=
"page_text"
>
小飞象
<br>
工作室
</div>
</div>
</div>
</div>
<div
class=
"tss2"
>
<div
class=
"tss2"
>
<div
class=
"tss2_title"
>
<div
class=
"tss2_title"
>
贡献分解
贡献分解
...
@@ -1620,22 +1646,44 @@
...
@@ -1620,22 +1646,44 @@
<div
class=
"box5_content"
>
<div
class=
"box5_content"
>
<div
class=
"geji_list_wrap"
>
<div
class=
"geji_list_wrap"
>
{% for single_fund in single_fund_data_list %}
{% for i in range(single_fund_data_list|length) %}
{% if (i+1) % 3 == 1 and i != 0%}
<div
class=
"page dtable"
>
<div
class=
"page_title dcell"
>
</div>
<div
class=
"page_head dcell"
>
<div
class=
"dcell"
>
<img
src=
{{logo}}
alt=
""
class=
"page_logo"
>
</div>
<div
class=
"dcell"
>
<div
class=
"page_line"
></div>
</div>
<div
class=
"dcell"
>
<div
class=
"page_text"
>
小飞象
<br>
工作室
</div>
</div>
</div>
</div>
{% endif %}
{% if (i+1) % 3 == 0 and i != 0%}
<div
class=
"self_item"
style=
"page-break-after:always;"
>
{% else %}
<div
class=
"self_item"
>
<div
class=
"self_item"
>
{% endif %}
<table>
<table>
<tr>
<tr>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_left"
>
<div
class=
"self_item_left"
>
<div
class=
"self_header clearfix"
>
<div
class=
"self_header clearfix"
>
<div
class=
"self_title fl"
>
<div
class=
"self_title fl"
>
{{single_fund.fund_name}}
{{single_fund
_data_list[i]
.fund_name}}
</div>
</div>
<!-- <div class="self_type fl">-->
{{single_fund_data_list[i].status}}
{{single_fund.status}}
<!-- </div>-->
</div>
</div>
<div
class=
"self_description"
>
<div
class=
"self_description"
>
{% for one in single_fund.evaluation %}
{% for one in single_fund
_data_list[i]
.evaluation %}
<div
class=
"self_description_item"
>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
<div
class=
"self_description_text"
>
...
@@ -1648,7 +1696,7 @@
...
@@ -1648,7 +1696,7 @@
</td>
</td>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_right"
>
<div
class=
"self_item_right"
>
<img
src=
{{single_fund.radar_chart_path}}
alt=
""
class=
"self_img"
>
<img
src=
{{single_fund
_data_list[i]
.radar_chart_path}}
alt=
""
class=
"self_img"
>
</div>
</div>
</td>
</td>
</tr>
</tr>
...
@@ -1659,6 +1707,26 @@
...
@@ -1659,6 +1707,26 @@
<!-- 持仓点评 -->
<!-- 持仓点评 -->
{% if single_fund_data_list|length % 3 == 0 and single_fund_data_list|length != 0%}
<div
class=
"page dtable"
>
<div
class=
"page_title dcell"
>
</div>
<div
class=
"page_head dcell"
>
<div
class=
"dcell"
>
<img
src=
{{logo}}
alt=
""
class=
"page_logo"
>
</div>
<div
class=
"dcell"
>
<div
class=
"page_line"
></div>
</div>
<div
class=
"dcell"
>
<div
class=
"page_text"
>
小飞象
<br>
工作室
</div>
</div>
</div>
</div>
{% endif %}
<div
class=
"target_comment"
>
<div
class=
"target_comment"
>
<div
class=
"comment_title"
>
<div
class=
"comment_title"
>
持仓点评
持仓点评
...
@@ -1781,6 +1849,24 @@
...
@@ -1781,6 +1849,24 @@
</div>
</div>
</div>
</div>
<!-- 收益比较、相关性分析 -->
<!-- 收益比较、相关性分析 -->
<div
class=
"page dtable"
style=
"page-break-before:always;"
>
<div
class=
"page_title dcell"
>
</div>
<div
class=
"page_head dcell"
>
<div
class=
"dcell"
>
<img
src=
{{logo}}
alt=
""
class=
"page_logo"
>
</div>
<div
class=
"dcell"
>
<div
class=
"page_line"
></div>
</div>
<div
class=
"dcell"
>
<div
class=
"page_text"
>
小飞象
<br>
工作室
</div>
</div>
</div>
</div>
<div
class=
"par clearfix"
cellpadding=
"38"
>
<div
class=
"par clearfix"
cellpadding=
"38"
>
<div
class=
"par_item fl"
>
<div
class=
"par_item fl"
>
<div
class=
"par_title"
>
<div
class=
"par_title"
>
...
@@ -1930,22 +2016,41 @@
...
@@ -1930,22 +2016,41 @@
<div
class=
"box7_content"
>
<div
class=
"box7_content"
>
<div
class=
"geji_list_wrap"
>
<div
class=
"geji_list_wrap"
>
{% for single_fund in propose_fund_data_list %}
{% for i in range(propose_fund_data_list|length) %}
{% if (i+1) % 3 == 1 and i != 0%}
<div
class=
"page dtable"
style=
"page-break-before:always;"
>
<div
class=
"page_title dcell"
>
</div>
<div
class=
"page_head dcell"
>
<div
class=
"dcell"
>
<img
src=
{{logo}}
alt=
""
class=
"page_logo"
>
</div>
<div
class=
"dcell"
>
<div
class=
"page_line"
></div>
</div>
<div
class=
"dcell"
>
<div
class=
"page_text"
>
小飞象
<br>
工作室
</div>
</div>
</div>
</div>
<div
class=
"self_item"
>
<div
class=
"self_item"
>
{% else %}
<div
class=
"self_item"
>
{% endif %}
<table>
<table>
<tr>
<tr>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_left"
>
<div
class=
"self_item_left"
>
<div
class=
"self_header clearfix"
>
<div
class=
"self_header clearfix"
>
<div
class=
"self_title fl"
>
<div
class=
"self_title fl"
>
{{
single_fund
.fund_name}}
{{
propose_fund_data_list[i]
.fund_name}}
</div>
</div>
<!-- <div class="self_type fl">-->
<!-- {{single_fund.status}}-->
<!-- </div>-->
</div>
</div>
<div
class=
"self_description"
>
<div
class=
"self_description"
>
{% for one in
single_fund
.evaluation %}
{% for one in
propose_fund_data_list[i]
.evaluation %}
<div
class=
"self_description_item"
>
<div
class=
"self_description_item"
>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_dot"
></div>
<div
class=
"self_description_text"
>
<div
class=
"self_description_text"
>
...
@@ -1958,7 +2063,7 @@
...
@@ -1958,7 +2063,7 @@
</td>
</td>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<td
style=
"padding: 0;text-align: left;vertical-align: middle;"
>
<div
class=
"self_item_right"
>
<div
class=
"self_item_right"
>
<img
src=
{{
single_fund
.radar_chart_path}}
alt=
""
class=
"self_img"
>
<img
src=
{{
propose_fund_data_list[i]
.radar_chart_path}}
alt=
""
class=
"self_img"
>
</div>
</div>
</td>
</td>
</tr>
</tr>
...
@@ -1991,6 +2096,20 @@
...
@@ -1991,6 +2096,20 @@
<!-- 结尾 -->
<!-- 结尾 -->
<div
class=
"box8"
>
<div
class=
"box8"
>
<div
class=
"cover_head dtable"
>
<div
class=
"dcell"
>
<img
src=
{{logo}}
alt=
""
class=
"cover_logo"
>
</div>
<div
class=
"dcell"
>
<div
class=
"cover_line"
></div>
</div>
<div
class=
"dcell"
>
<div
class=
"cover_text"
>
小飞象
<br>
工作室
</div>
</div>
</div>
<div
class=
"box8_content"
>
<div
class=
"box8_content"
>
<div
class=
"financial_show dtable"
>
<div
class=
"financial_show dtable"
>
...
...
app/utils/html_to_pdf.py
View file @
2eee5b2d
...
@@ -15,9 +15,9 @@ def html_to_pdf(source_path, target_path):
...
@@ -15,9 +15,9 @@ def html_to_pdf(source_path, target_path):
options
=
{
options
=
{
'--enable-local-file-access'
:
'--enable-local-file-access'
,
'--enable-local-file-access'
:
'--enable-local-file-access'
,
'encoding'
:
"utf-8"
,
'encoding'
:
"utf-8"
,
# 'page-size': '
A5
',
# 'page-size': '
Letter
',
# 'page-width': '30
0mm',
'page-width'
:
'28
0mm'
,
'page-height'
:
'
2.3
mm'
,
'page-height'
:
'
330
mm'
,
'margin-top'
:
'0mm'
,
'margin-top'
:
'0mm'
,
'margin-right'
:
'0mm'
,
'margin-right'
:
'0mm'
,
'margin-bottom'
:
'0mm'
,
'margin-bottom'
:
'0mm'
,
...
...
app/utils/jinjia2html.py
View file @
2eee5b2d
...
@@ -205,7 +205,7 @@ class DataIntegrate:
...
@@ -205,7 +205,7 @@ class DataIntegrate:
'group_hoding_info_total'
:
self
.
group_hoding_info_total
,
'group_hoding_info_total'
:
self
.
group_hoding_info_total
,
'old_evaluation'
:
self
.
old_evaluation
,
'old_evaluation'
:
self
.
old_evaluation
,
'contribution_decomposition'
:
self
.
contribution_decomposition
,
'contribution_decomposition'
:
self
.
contribution_decomposition
,
'single_fund_data_list'
:
self
.
single_fund_data_list
,
'single_fund_data_list'
:
[
*
self
.
single_fund_data_list
,
*
self
.
single_fund_data_list
,
*
self
.
single_fund_data_list
]
,
'old_correlation'
:
self
.
old_correlation
,
'old_correlation'
:
self
.
old_correlation
,
'new_correlation'
:
self
.
new_correlation
,
'new_correlation'
:
self
.
new_correlation
,
'propose_fund_data_list'
:
self
.
propose_fund_data_list
,
'propose_fund_data_list'
:
self
.
propose_fund_data_list
,
...
...
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