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
ddc1d2dc
Commit
ddc1d2dc
authored
Feb 14, 2022
by
赵宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
6e728493
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
apps/models.py
+4
-1
apps/view_index/view.py
+5
-2
No files found.
apps/models.py
View file @
ddc1d2dc
...
...
@@ -546,6 +546,7 @@ class Project(BaseModel, db.Model):
__table_args__
=
({
'comment'
:
'招商驾驶舱-重点招商项目表'
})
# 添加表注释
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
,
autoincrement
=
True
,
doc
=
'工程id'
,
comment
=
'工程id'
)
# 工程id
project_stage_id
=
db
.
Column
(
db
.
Integer
,
doc
=
'项目阶段id:落地项目为1,招商项目为2'
,
comment
=
'项目阶段id:落地项目为1,招商项目为2'
)
name
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'工程名'
,
comment
=
'工程名'
)
# 一.工程名
district
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'区县名称'
,
comment
=
'区县名称'
)
# 二.县区
type
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'工程类型'
,
comment
=
'工程类型'
)
# 三.(1)工程类型
...
...
@@ -558,6 +559,8 @@ class Project(BaseModel, db.Model):
email
=
db
.
Column
(
db
.
String
(
255
),
doc
=
'电子邮箱'
,
comment
=
'电子邮箱'
)
# 五.(3)电子邮箱
# 招商驾驶舱-产业政策
class
InduPolicy
(
db
.
Model
):
__tablename_
=
"indupolicy"
...
...
@@ -993,7 +996,7 @@ class Lab(db.Model):
cate
=
db
.
Column
(
db
.
String
(
255
))
# 创新平台分类
cateid
=
db
.
Column
(
db
.
Integer
)
# 创新平台分类id
# 工程技术中心1,国际科技合作基地2,企业技术中心3,双创基地4,院士工作站5,质量检测与测量中心6,重点实验室7
# 工程技术中心1,国际科技合作基地2,企业技术中心3,双创基地4,院士工作站5,质量检测与测量中心6,重点实验室7
,会议会展8
name
=
db
.
Column
(
db
.
String
(
255
))
# 机构现名
fax
=
db
.
Column
(
db
.
String
(
255
))
# 传真
...
...
apps/view_index/view.py
View file @
ddc1d2dc
...
...
@@ -249,9 +249,12 @@ def propol():
project
=
Project
.
query
.
all
()
policy
=
InduPolicy
.
query
.
filter_by
(
district
=
"晋城市"
)
.
order_by
(
InduPolicy
.
pubdate
.
desc
())
data_policy
=
[{
"name"
:
i
.
name
,
"id"
:
i
.
id
,
"distict"
:
"太原市"
}
for
i
in
policy
.
all
()]
data_project
=
[{
"name"
:
i
.
name
,
"id"
:
i
.
id
}
for
i
in
project
]
data_project1
=
[{
"name"
:
i
.
name
,
"id"
:
i
.
id
}
for
i
in
project
if
i
.
project_stage_id
==
1
]
data_project2
=
[{
"name"
:
i
.
name
,
"id"
:
i
.
id
}
for
i
in
project
if
i
.
project_stage_id
==
2
]
data
=
{
"project"
:
data_project
,
"project1"
:
data_project1
,
# 落地项目
"project2"
:
data_project2
,
# 招商项目
"policy"
:
data_policy
,
}
# redis缓存
...
...
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