Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mancheng
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
Administrator
mancheng
Commits
6d1656bf
Commit
6d1656bf
authored
Nov 18, 2022
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix20221118
parent
233866e2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
apps/inves_manage/view.py
+17
-4
No files found.
apps/inves_manage/view.py
View file @
6d1656bf
...
...
@@ -649,6 +649,12 @@ def add_project():
)
db
.
session
.
add
(
new_project_obj
)
db
.
session
.
commit
()
# 记录项目动态
project_id
=
new_project_obj
.
id
time1
=
datetime
.
now
()
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
write_dynamic
(
upload_people
,
project_id
,
'新增了 {} 项目。'
.
format
(
project_name
),
time1
)
return
jsonify
(
code
=
RET
.
OK
,
msg
=
'新增成功!'
)
except
Exception
as
e
:
return
jsonify
(
code
=
RET
.
DATAERR
,
msg
=
'新增失败!'
)
...
...
@@ -671,11 +677,18 @@ def batch_del():
try
:
for
select_id
in
select_id_list
:
project_obj
=
SikuProject
.
query
.
get
(
select_id
)
project_name
=
project_obj
.
project_name
if
not
project_obj
:
return
jsonify
(
code
=
RET
.
NODATA
,
msg
=
"查无此项目!"
)
project_obj
.
is_delete
=
1
db
.
session
.
commit
()
# 记录项目动态
for
project_id
in
select_id_list
:
time1
=
datetime
.
now
()
.
strftime
(
"
%
Y-
%
m-
%
d
%
H:
%
M:
%
S"
)
write_dynamic
(
user_name
,
project_id
,
'删除了 {} 项目。'
.
format
(
project_name
),
time1
)
continue
return
jsonify
(
code
=
RET
.
OK
,
msg
=
"批量删除成功!"
)
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
...
...
@@ -1505,7 +1518,7 @@ def batch_export_project1():
current_app
.
logger
.
error
(
e
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"用户信息校验失败,请重新登陆后尝试!"
)
select_id_list
=
req_dic
[
"select_id_list"
]
path
=
'./apps/static
s
/project_file/'
path
=
'./apps/static/project_file/'
# pro_path = 'D:/中研项目代码/flask_jincheng/apps/statics/project_file/'
pro_path
=
'http://39.100.39.50:5050/static/project_file/'
# 项目路径
if
not
select_id_list
:
...
...
@@ -1600,7 +1613,7 @@ def batch_export_project2():
current_app
.
logger
.
error
(
e
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"用户信息校验失败,请重新登陆后尝试!"
)
select_id_list
=
req_dic
[
"select_id_list"
]
path
=
'./apps/static
s
/project_file/'
path
=
'./apps/static/project_file/'
# pro_path = 'D:/中研项目代码/flask_jincheng/apps/statics/project_file/'
pro_path
=
'http://39.100.39.50:5050/static/project_file/'
# 项目路径
if
not
select_id_list
:
...
...
@@ -1710,7 +1723,7 @@ def batch_export_project3():
current_app
.
logger
.
error
(
e
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"用户信息校验失败,请重新登陆后尝试!"
)
select_id_list
=
req_dic
[
"select_id_list"
]
path
=
'./apps/static
s
/project_file/'
path
=
'./apps/static/project_file/'
# pro_path = 'D:/中研项目代码/flask_jincheng/apps/statics/project_file/'
pro_path
=
'http://39.100.39.50:5050/static/project_file/'
# 项目路径
if
not
select_id_list
:
...
...
@@ -1834,7 +1847,7 @@ def batch_export_project4():
current_app
.
logger
.
error
(
e
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"用户信息校验失败,请重新登陆后尝试!"
)
select_id_list
=
req_dic
[
"select_id_list"
]
path
=
'./apps/static
s
/project_file/'
path
=
'./apps/static/project_file/'
# pro_path = 'D:/中研项目代码/flask_jincheng/apps/statics/project_file/'
pro_path
=
'http://39.100.39.50:5050/static/project_file/'
# 项目路径
if
not
select_id_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