Commit fdd55f2b by dong

fix20221121

parent 1337cddb
......@@ -1270,7 +1270,6 @@ def check_project_detail():
"id": progress_obj.id,
"time": progress_obj.add_time.strftime("%Y-%m-%d %H:%M:%S"),
"info": progress_obj.info
# } for progress_obj in progress_obj_list if progress_obj.flag == flag]
} for progress_obj in progress_obj_list]
progress_data = sorted(progress_data, key=lambda x: x['time'], reverse=True)
......@@ -1284,7 +1283,7 @@ def check_project_detail():
file_data = [{
"id": file_obj.id,
"file_url": file_obj.file_url,
"file_name": file_obj.file_name,
"name": file_obj.file_name,
"project_id": file_obj.project_id,
"file_type": file_obj.file_type
} for file_obj in file_obj_list if file_obj.file_type == 1 and file_obj.flag == flag]
......@@ -1303,7 +1302,7 @@ def check_project_detail():
img_data = [{
"id": img_obj.id,
"file_url": img_obj.file_url,
"file_name": img_obj.file_name,
"name": img_obj.file_name,
"project_id": img_obj.project_id,
"file_type": img_obj.file_type
} for img_obj in file_obj_list if img_obj.file_type == 2 and img_obj.flag == flag]
......@@ -2031,7 +2030,7 @@ def get_project_log():
per_page = req_dic['per_page']
try:
log_obj_list = ProjectDynamicLog.query.filter(ProjectDynamicLog.project_id == project_id)
size = len(log_obj_list)
size = len(log_obj_list.all())
log_obj_list = log_obj_list.order_by(ProjectDynamicLog.time.desc()).paginate(page, per_page).items
data = [{
"id": log_obj.id,
......
......@@ -1169,6 +1169,7 @@ class ProjectManagement(db.Model):
# 基本信息
id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='主键id')
project_stalker = db.Column(db.String(30), comment='项目跟踪')
project_stalker_explain = db.Column(db.String(30), comment='项目跟踪说明')
project_name = db.Column(db.String(30), comment='项目名称')
district = db.Column(db.String(20), comment='项目所在地')
development_area = db.Column(db.String(20), comment='开发区')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment