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 5005b25a
authored
Jul 08, 2026
by
江名洋
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 使用相对路径修复 API 请求路由问题
1 parent
24605b34
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
app/static/js/app.js
app/static/js/app.js
View file @
5005b25
...
@@ -104,7 +104,7 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -104,7 +104,7 @@ document.addEventListener('DOMContentLoaded', () => {
if
(
type
)
currentHistoryType
=
type
;
if
(
type
)
currentHistoryType
=
type
;
try
{
try
{
const
historyRes
=
await
fetch
(
'api/etl/history?limit=15'
);
const
historyRes
=
await
fetch
(
'
./
api/etl/history?limit=15'
);
const
history
=
await
historyRes
.
json
();
const
history
=
await
historyRes
.
json
();
const
tbody
=
document
.
getElementById
(
'history-tbody'
);
const
tbody
=
document
.
getElementById
(
'history-tbody'
);
tbody
.
innerHTML
=
''
;
tbody
.
innerHTML
=
''
;
...
@@ -162,7 +162,7 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -162,7 +162,7 @@ document.addEventListener('DOMContentLoaded', () => {
btn
.
textContent
=
'任务已启动...'
;
btn
.
textContent
=
'任务已启动...'
;
try
{
try
{
const
res
=
await
fetch
(
'api/etl/run-ods'
,
{
method
:
'POST'
});
const
res
=
await
fetch
(
'
./
api/etl/run-ods'
,
{
method
:
'POST'
});
const
data
=
await
res
.
json
();
const
data
=
await
res
.
json
();
if
(
data
.
status
===
'success'
)
{
if
(
data
.
status
===
'success'
)
{
setTimeout
(()
=>
{
btn
.
disabled
=
false
;
btn
.
textContent
=
'立即同步 ODS'
;
},
2000
);
setTimeout
(()
=>
{
btn
.
disabled
=
false
;
btn
.
textContent
=
'立即同步 ODS'
;
},
2000
);
...
@@ -199,7 +199,7 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -199,7 +199,7 @@ document.addEventListener('DOMContentLoaded', () => {
btn
.
textContent
=
'加工中...'
;
btn
.
textContent
=
'加工中...'
;
try
{
try
{
const
res
=
await
fetch
(
'api/etl/run-dw'
,
{
method
:
'POST'
,
body
:
formData
});
const
res
=
await
fetch
(
'
./
api/etl/run-dw'
,
{
method
:
'POST'
,
body
:
formData
});
const
data
=
await
res
.
json
();
const
data
=
await
res
.
json
();
if
(
data
.
status
===
'success'
)
{
if
(
data
.
status
===
'success'
)
{
setTimeout
(()
=>
{
btn
.
disabled
=
false
;
btn
.
textContent
=
'开始加工'
;
},
2000
);
setTimeout
(()
=>
{
btn
.
disabled
=
false
;
btn
.
textContent
=
'开始加工'
;
},
2000
);
...
@@ -368,7 +368,7 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -368,7 +368,7 @@ document.addEventListener('DOMContentLoaded', () => {
if (hasEcology) uploadForm.append('ecology_factory_file', ecologyFactoryInput.files[0]);
if (hasEcology) uploadForm.append('ecology_factory_file', ecologyFactoryInput.files[0]);
if (hasNature) uploadForm.append('nature_factory_file', natureFactoryInput.files[0]);
if (hasNature) uploadForm.append('nature_factory_file', natureFactoryInput.files[0]);
const uploadRes = await fetch('api/analysis/upload', {
const uploadRes = await fetch('
./
api/analysis/upload', {
method: 'POST',
method: 'POST',
body: uploadForm
body: uploadForm
});
});
...
...
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