Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
data_report
/
daw
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit fd234e02
authored
Jul 10, 2026
by
江名洋
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 修复查询结果可能非列表类型的问题
1 parent
5598c2e5
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
17 additions
and
10 deletions
__pycache__/main.cpython-313.pyc
app/api/__pycache__/endpoints.cpython-313.pyc
app/core/__pycache__/config.cpython-313.pyc
app/services/strategy_service.py
app/templates/analysis.html
app/templates/dw.html
app/templates/harmony.html
app/templates/index.html
app/templates/ods.html
app/templates/strategy.html
app/templates/strategy_detail.html
app/templates/strategy_info.html
main.py
__pycache__/main.cpython-313.pyc
View file @
fd234e0
No preview for this file type
app/api/__pycache__/endpoints.cpython-313.pyc
View file @
fd234e0
No preview for this file type
app/core/__pycache__/config.cpython-313.pyc
View file @
fd234e0
No preview for this file type
app/services/strategy_service.py
View file @
fd234e0
...
...
@@ -268,7 +268,7 @@ class StrategyService:
try
:
with
conn
.
cursor
()
as
cur
:
cur
.
execute
(
sql
,
(
merchant_id
,
start_date
,
end_date
))
return
cur
.
fetchall
(
)
return
list
(
cur
.
fetchall
()
)
finally
:
conn
.
close
()
...
...
app/templates/analysis.html
View file @
fd234e0
...
...
@@ -15,7 +15,7 @@
<a
class=
"nav-item"
href=
"./dw"
>
DWS/DWM/DWA 任务
</a>
<a
class=
"nav-item active"
href=
"./analysis"
>
问界生态系数分析
</a>
<a
class=
"nav-item"
href=
"./harmony"
>
鸿蒙生态分析
</a>
<a
class=
"nav-item"
href=
"./strategy"
>
策略效果盯防
</a>
<a
class=
"nav-item"
href=
"./strategy"
>
策略效果盯防
(开发中)
</a>
</nav>
<div
class=
"user-info"
id=
"user-info"
>
管理员
</div>
</header>
...
...
app/templates/dw.html
View file @
fd234e0
...
...
@@ -15,7 +15,7 @@
<a
class=
"nav-item active"
href=
"./dw"
>
DWS/DWM/DWA 任务
</a>
<a
class=
"nav-item"
href=
"./analysis"
>
问界生态系数分析
</a>
<a
class=
"nav-item"
href=
"./harmony"
>
鸿蒙生态分析
</a>
<a
class=
"nav-item"
href=
"./strategy"
>
策略效果盯防
</a>
<a
class=
"nav-item"
href=
"./strategy"
>
策略效果盯防
(开发中)
</a>
</nav>
<div
class=
"user-info"
id=
"user-info"
>
管理员
</div>
</header>
...
...
app/templates/harmony.html
View file @
fd234e0
...
...
@@ -15,7 +15,7 @@
<a
class=
"nav-item"
href=
"./dw"
>
DWS/DWM/DWA 任务
</a>
<a
class=
"nav-item"
href=
"./analysis"
>
问界生态系数分析
</a>
<a
class=
"nav-item active"
href=
"./harmony"
>
鸿蒙生态分析
</a>
<a
class=
"nav-item"
href=
"./strategy"
>
策略效果盯防
</a>
<a
class=
"nav-item"
href=
"./strategy"
>
策略效果盯防
(开发中)
</a>
</nav>
<div
class=
"user-info"
id=
"user-info"
>
管理员
</div>
</header>
...
...
app/templates/index.html
View file @
fd234e0
...
...
@@ -20,7 +20,7 @@
<a
class=
"nav-item"
href=
"./dw"
>
DWS/DWM/DWA 任务
</a>
<a
class=
"nav-item"
href=
"./analysis"
>
问界生态系数分析
</a>
<a
class=
"nav-item"
href=
"./harmony"
>
鸿蒙生态分析
</a>
<a
class=
"nav-item"
href=
"./strategy"
>
策略效果盯防
</a>
<a
class=
"nav-item"
href=
"./strategy"
>
策略效果盯防
(开发中)
</a>
</nav>
<div
class=
"user-info"
id=
"user-info"
>
管理员
</div>
</header>
...
...
app/templates/ods.html
View file @
fd234e0
...
...
@@ -15,7 +15,7 @@
<a
class=
"nav-item"
href=
"./dw"
>
DWS/DWM/DWA 任务
</a>
<a
class=
"nav-item"
href=
"./analysis"
>
问界生态系数分析
</a>
<a
class=
"nav-item"
href=
"./harmony"
>
鸿蒙生态分析
</a>
<a
class=
"nav-item"
href=
"./strategy"
>
策略效果盯防
</a>
<a
class=
"nav-item"
href=
"./strategy"
>
策略效果盯防
(开发中)
</a>
</nav>
<div
class=
"user-info"
id=
"user-info"
>
管理员
</div>
</header>
...
...
app/templates/strategy.html
View file @
fd234e0
...
...
@@ -86,6 +86,8 @@
.btn-analyze.analyzing
{
background
:
#fa8c16
;
}
.btn-detail
{
padding
:
5px
12px
;
border
:
1px
solid
#d9d9d9
;
background
:
#fff
;
border-radius
:
4px
;
cursor
:
pointer
;
font-size
:
12px
;
color
:
#666
;
}
.btn-detail
:hover
{
color
:
#1890ff
;
border-color
:
#1890ff
;
}
.btn-info
{
padding
:
5px
12px
;
border
:
1px
solid
#722ed1
;
background
:
#f9f0ff
;
border-radius
:
4px
;
cursor
:
pointer
;
font-size
:
12px
;
color
:
#722ed1
;
}
.btn-info
:hover
{
background
:
#efdbff
;
}
.row-actions
{
display
:
flex
;
gap
:
6px
;
justify-content
:
center
;
}
/* 详情弹窗 */
...
...
@@ -188,7 +190,7 @@
<a
class=
"nav-item"
href=
"./dw"
>
DWS/DWM/DWA 任务
</a>
<a
class=
"nav-item"
href=
"./analysis"
>
问界生态系数分析
</a>
<a
class=
"nav-item"
href=
"./harmony"
>
鸿蒙生态分析
</a>
<a
class=
"nav-item active"
href=
"./strategy"
>
策略效果盯防
</a>
<a
class=
"nav-item active"
href=
"./strategy"
>
策略效果盯防
(开发中)
</a>
</nav>
<div
class=
"user-info"
id=
"user-info"
>
管理员
</div>
</header>
...
...
@@ -385,7 +387,7 @@
'<td class="right"><div class="change-cell"><span class="change-ratio '
+
getChangeClass
(
bt
.
pp_change
)
+
'">'
+
(
bt
.
pp_change
!=
null
?
(
bt
.
pp_change
>
0
?
'↑'
:
(
bt
.
pp_change
<
0
?
'↓'
:
'→'
))
+
' '
+
Math
.
abs
(
bt
.
pp_change
).
toFixed
(
1
)
+
'pp'
:
'-'
)
+
'</span><span class="change-detail">'
+
(
bt
.
old_rate
!=
null
?
bt
.
old_rate
.
toFixed
(
1
)
+
'%→'
+
bt
.
new_rate
.
toFixed
(
1
)
+
'%'
:
'-'
)
+
'</span></div></td>'
,
'<td class="center"><span class="effect-tag '
+
row
.
effect_class
+
'">'
+
escapeHtml
(
row
.
effect
||
'-'
)
+
'</span></td>'
,
'<td class="center" style="white-space:nowrap">'
+
refreshDisplay
+
'</td>'
,
'<td class="center"><div class="row-actions"><button class="btn-analyze" onclick="analyzeSingle('
+
row
.
id
+
', this)">刷新分析</button><button class="btn-detail" onclick="showDetail('
+
row
.
id
+
')">详情</button></div></td>'
,
'<td class="center"><div class="row-actions"><button class="btn-analyze" onclick="analyzeSingle('
+
row
.
id
+
', this)">刷新分析</button><button class="btn-detail" onclick="showDetail('
+
row
.
id
+
')">详情</button><
button class="btn-info" onclick="showInfo('
+
row
.
id
+
')">渗透率分析</button><
/div></td>'
,
'</tr>'
);
});
...
...
@@ -768,6 +770,10 @@
}
};
window
.
showInfo
=
function
(
id
)
{
window
.
location
.
href
=
'./strategy/info?id='
+
id
;
};
window
.
refreshInModal
=
async
function
()
{
if
(
!
currentModalId
)
return
;
const
btn
=
document
.
getElementById
(
'modal-btn-refresh'
);
...
...
app/templates/strategy_detail.html
View file @
fd234e0
...
...
@@ -198,7 +198,7 @@
<a
class=
"nav-item"
href=
"./dw"
>
DWS/DWM/DWA 任务
</a>
<a
class=
"nav-item"
href=
"./analysis"
>
问界生态系数分析
</a>
<a
class=
"nav-item"
href=
"./harmony"
>
鸿蒙生态分析
</a>
<a
class=
"nav-item active"
href=
"./strategy"
>
策略效果盯防
</a>
<a
class=
"nav-item active"
href=
"./strategy"
>
策略效果盯防
(开发中)
</a>
</nav>
<div
class=
"user-info"
id=
"user-info"
>
管理员
</div>
</header>
...
...
app/templates/strategy_info.html
View file @
fd234e0
...
...
@@ -198,7 +198,7 @@
<a
class=
"nav-item"
href=
"./dw"
>
DWS/DWM/DWA 任务
</a>
<a
class=
"nav-item"
href=
"./analysis"
>
问界生态系数分析
</a>
<a
class=
"nav-item"
href=
"./harmony"
>
鸿蒙生态分析
</a>
<a
class=
"nav-item active"
href=
"./strategy"
>
策略效果盯防
</a>
<a
class=
"nav-item active"
href=
"./strategy"
>
策略效果盯防
(开发中)
</a>
</nav>
<div
class=
"user-info"
id=
"user-info"
>
管理员
</div>
</header>
...
...
main.py
View file @
fd234e0
...
...
@@ -123,6 +123,7 @@ PAGE_ROUTES = {
"/harmony"
:
"harmony.html"
,
"/strategy"
:
"strategy.html"
,
"/strategy/detail"
:
"strategy_detail.html"
,
"/strategy/info"
:
"strategy_info.html"
,
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment