明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jt_front
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
jt_front
Commits
f432e65a
Commit
f432e65a
authored
Dec 04, 2025
by
chenron
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.bridata.com:8090/root/jt_front
parents
fd84dd6b
de2f45df
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
429 additions
and
122 deletions
+429
-122
CommonMap.vue
src/components/CommonMap.vue
+9
-3
commonTable.vue
src/components/common/commonTable.vue
+3
-2
MainLayout.vue
src/layouts/MainLayout.vue
+1
-1
index.js
src/router/index.js
+30
-12
index.vue
src/views/homePage/index.vue
+1
-1
addProject.vue
src/views/managePage/addProject.vue
+80
-85
projectAllPage.vue
src/views/managePage/projectAllPage.vue
+292
-0
projectSetUp.vue
src/views/managePage/projectSetUp.vue
+13
-18
No files found.
src/components/CommonMap.vue
View file @
f432e65a
...
@@ -9,13 +9,15 @@ import { nextTick, onMounted, reactive, ref } from "vue";
...
@@ -9,13 +9,15 @@ import { nextTick, onMounted, reactive, ref } from "vue";
import
gansuLine
from
"./newLine.json"
;
import
gansuLine
from
"./newLine.json"
;
let
map
=
null
;
let
map
=
null
;
window
.
_AMapSecurityConfig
=
{
window
.
_AMapSecurityConfig
=
{
securityJsCode
:
"75a8291a9e8f7c838fc5e4dd0d538f30"
,
// securityJsCode: "75a8291a9e8f7c838fc5e4dd0d538f30",
securityJsCode
:
"7aee6d6553ba9a8178e0c57b60a51481"
,
};
};
// 初始化地图
// 初始化地图
const
handleInitMap
=
()
=>
{
const
handleInitMap
=
()
=>
{
let
selectName
=
sessionStorage
.
getItem
(
"selectedContentBtn"
);
let
selectName
=
sessionStorage
.
getItem
(
"selectedContentBtn"
);
AMapLoader
.
load
({
AMapLoader
.
load
({
key
:
"c691971f068b92c897fb908c4ddef6d4"
,
// 申请好的Web端开发者Key
// key: "c691971f068b92c897fb908c4ddef6d4", // 申请好的Web端开发者Key
key
:
"9a22433229a51dc5114d4bbf92f687ee"
,
// 申请好的Web端开发者Key
version
:
"2.0"
,
version
:
"2.0"
,
plugins
:
[
"AMap.DistrictSearch"
,
"AMap.GeoJSON"
],
plugins
:
[
"AMap.DistrictSearch"
,
"AMap.GeoJSON"
],
})
})
...
@@ -26,7 +28,8 @@ const handleInitMap = () => {
...
@@ -26,7 +28,8 @@ const handleInitMap = () => {
zoom
:
4
,
//初始化地图级别
zoom
:
4
,
//初始化地图级别
center
:
[
100.808299
,
35.791787
],
//初始化地图中心点位置
center
:
[
100.808299
,
35.791787
],
//初始化地图中心点位置
expandZoomRange
:
true
,
// 开启显示范围设置
expandZoomRange
:
true
,
// 开启显示范围设置
mapStyle
:
"amap://styles/2d017848d08f94f20b6e50aaae661148"
,
// mapStyle: "amap://styles/2d017848d08f94f20b6e50aaae661148",
mapStyle
:
"amap://styles/d9cd35cfbd75e272e528a7fde0bcfc53"
,
rotateEnable
:
false
,
// 是否可以旋转
rotateEnable
:
false
,
// 是否可以旋转
copyrightControl
:
false
,
copyrightControl
:
false
,
logoControl
:
false
,
logoControl
:
false
,
...
@@ -390,6 +393,9 @@ onMounted(() => {
...
@@ -390,6 +393,9 @@ onMounted(() => {
color: #93d2ff;
color: #93d2ff;
margin-left: 2px;
margin-left: 2px;
}
}
.amap-container{
background: none;
}
:deep(.amap-logo) {
:deep(.amap-logo) {
display: none;
display: none;
...
...
src/components/common/commonTable.vue
View file @
f432e65a
...
@@ -397,8 +397,9 @@ const computedTableHeight = computed(() => {
...
@@ -397,8 +397,9 @@ const computedTableHeight = computed(() => {
}
}
const
headerHeight
=
50
;
const
headerHeight
=
50
;
const
paginationHeight
=
props
.
pagination
?
50
:
0
;
// const paginationHeight = props.pagination ? 50 : 0;
const
baseHeight
=
headerHeight
+
paginationHeight
;
const
noDataHeight
=
tableData
.
value
.
length
?
0
:
50
;
const
baseHeight
=
headerHeight
+
noDataHeight
;
// 如果数据超过最大行数,固定显示最大行数的高度;如果数据不超过最大行数,按实际行数计算高度
// 如果数据超过最大行数,固定显示最大行数的高度;如果数据不超过最大行数,按实际行数计算高度
const
actualRows
=
Math
.
min
(
tableData
.
value
.
length
,
props
.
maxRows
);
const
actualRows
=
Math
.
min
(
tableData
.
value
.
length
,
props
.
maxRows
);
...
...
src/layouts/MainLayout.vue
View file @
f432e65a
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<span>
{{
route
.
meta
?.
menuName
||
route
.
name
}}
</span>
<span>
{{
route
.
meta
?.
menuName
||
route
.
name
}}
</span>
</
template
>
</
template
>
<
template
v-for=
"child in route.children"
:key=
"child.path"
>
<
template
v-for=
"child in route.children"
:key=
"child.path"
>
<el-menu-item
<el-menu-item
v-if=
"child.meta?.showInMenu !== false"
:index=
"child.path"
:index=
"child.path"
style=
"padding-left: 20px !important"
style=
"padding-left: 20px !important"
>
>
...
...
src/router/index.js
View file @
f432e65a
...
@@ -26,18 +26,36 @@ const routes = [
...
@@ -26,18 +26,36 @@ const routes = [
path
:
'/projectManage'
,
path
:
'/projectManage'
,
name
:
'projectManage'
,
name
:
'projectManage'
,
title
:
'项目管理'
,
title
:
'项目管理'
,
component
:
()
=>
import
(
'@/views/managePage/projectManage.vue'
),
meta
:
{
menuName
:
'项目管理'
,
icon
:
'Management'
},
meta
:
{
menuName
:
'项目管理'
,
icon
:
'Management'
}
redirect
:
"/projectAllPage"
,
},
children
:
[
{
{
path
:
'/addProject'
,
path
:
'/projectAllPage'
,
name
:
'addProject'
,
name
:
'projectAllPage'
,
title
:
'新增项目'
,
title
:
'项目档案库'
,
component
:
()
=>
import
(
'@/views/managePage/addProject.vue'
),
component
:
()
=>
import
(
'@/views/managePage/projectAllPage.vue'
),
meta
:
{
meta
:
{
menuName
:
'项目档案库'
}
menuName
:
'新增项目'
,
},
showInMenu
:
false
// 不在菜单中显示
{
}
path
:
'/addProject'
,
name
:
'addProject'
,
title
:
'新增项目'
,
component
:
()
=>
import
(
'@/views/managePage/addProject.vue'
),
meta
:
{
menuName
:
'新增项目'
,
showInMenu
:
false
// 不在菜单中显示
}
},
{
path
:
'/projectSetUp'
,
name
:
'projectSetUp'
,
title
:
'项目立项'
,
component
:
()
=>
import
(
'@/views/managePage/projectSetUp.vue'
),
meta
:
{
menuName
:
'项目立项'
}
}
]
},
},
{
{
path
:
'/templateManage'
,
path
:
'/templateManage'
,
...
...
src/views/homePage/index.vue
View file @
f432e65a
...
@@ -208,7 +208,7 @@ window.addEventListener("fullscreenchange", () => {
...
@@ -208,7 +208,7 @@ window.addEventListener("fullscreenchange", () => {
// background-position: center;
// background-position: center;
width: 100%;
width: 100%;
height: 100%;
height: 100%;
background
-color: #04427e
;
background
: linear-gradient(to bottom, #04427E, #095DCC)
;
overflow: hidden;
overflow: hidden;
color: #fff;
color: #fff;
display: flex;
display: flex;
...
...
src/views/managePage/addProject.vue
View file @
f432e65a
This diff is collapsed.
Click to expand it.
src/views/managePage/projectAllPage.vue
0 → 100644
View file @
f432e65a
<
template
>
<div
class=
"project-manage-container"
>
<div
class=
"project-manage-header"
>
<div
class=
"header-left"
></div>
<div
class=
"header-right"
>
<el-button
type=
"primary"
@
click=
"showFieldsModal"
>
表头筛选
</el-button>
<el-button
type=
"primary"
@
click=
"addProject"
>
新增
</el-button>
</div>
</div>
<div
class=
"project-manage-content"
v-loading=
"loading"
>
<common-table
:autoHeight=
"true"
:maxRows=
"10"
:rowHeight=
"40"
:data=
"tableData"
:columns=
"tableColumns"
:total=
"total"
:current-page=
"currentPage"
:page-size=
"pageSize"
:index=
"true"
:indexLabel=
"'序号'"
title=
""
:border=
"true"
@
size-change=
"handleSizeChange"
@
current-page-change=
"handleCurrentPageChange"
>
<template
#
operations=
"
{ row, index }">
<el-button
link
type=
"primary"
size=
"small"
@
click=
"previewProject(row)"
>
查看
</el-button>
<el-button
link
type=
"primary"
size=
"small"
@
click=
"editProject(row)"
>
编辑
</el-button>
<el-button
link
type=
"danger"
size=
"small"
@
click=
"deleteProject(row)"
>
删除
</el-button>
</
template
>
</common-table>
<!-- <div class="table-wrap">
<el-table :data="tableData" style="width: 100%"
empty-text="暂无数据" height="100%" border
>
<el-table-column type="index" width="50" />
<el-table-column prop="projectName" label="项目名称" />
<el-table-column prop="projectCode" label="项目编号" />
<el-table-column fixed="right" label="操作" min-width="120">
<template #default="scope">
<el-button link type="primary" size="small" @click="previewProject(scope.row)">查看</el-button>
<el-button link type="primary" size="small" @click="editProject(scope.row)">编辑</el-button>
<el-button link type="danger" size="small" @click="deleteProject(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="page-wrap">
<el-pagination background layout="prev, pager, next" :total="1000" />
</div> -->
</div>
<el-dialog
v-model=
"filedsModalShow"
modal-class=
"fields-modal"
title=
"筛选查询"
width=
"50%"
top=
"10vh"
>
<common-table
:data=
"tableFields"
:columns=
"fieldsTableColumns"
:selection=
"true"
:border=
"true"
:pagination=
"false"
:autoHeight=
"true"
:rowHeight=
"40"
@
selection-change=
"handleFieldsSelectChange"
></common-table>
<
template
#
footer
>
<div
class=
"dialog-footer"
>
<el-button
@
click=
"cancelFieldsModal"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"confirmFieldsModal"
>
确定
</el-button>
</div>
</
template
>
</el-dialog>
</div>
</template>
<
script
setup
>
import
{
reactive
,
ref
,
onMounted
,
computed
,
getCurrentInstance
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
useProjectStore
}
from
"@/stores/project.js"
;
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
CommonTable
from
"@/components/common/commonTable.vue"
;
const
projectStore
=
useProjectStore
();
const
router
=
useRouter
();
const
{
proxy
}
=
getCurrentInstance
();
// 计算表格高度
let
tableData
=
ref
([]);
let
tableColumns
=
ref
([
{
prop
:
"projectName"
,
label
:
"项目名称"
,
showOverflowTooltip
:
true
},
{
prop
:
"projectCode"
,
label
:
"项目编号"
,
showOverflowTooltip
:
true
},
{
prop
:
"projectLzType"
,
label
:
"状态"
,
width
:
120
,
align
:
"center"
,
formatter
:
(
data
)
=>
{
return
data
.
projectLzType
===
1
?
"待立项"
:
data
.
projectLzType
===
3
?
"立项审批中"
:
data
.
projectLzType
===
5
?
"已立项"
:
data
.
projectLzType
===
7
?
"决策填报中"
:
data
.
projectLzType
===
8
?
"决策审批中"
:
data
.
projectLzType
===
9
?
"已决策"
:
"待立项"
}
},
{
prop
:
"operations"
,
label
:
"操作"
,
width
:
160
,
slot
:
"operations"
,
fixed
:
"right"
,
align
:
"center"
}
]);
// 获取可显示表头项
let
filedsModalShow
=
ref
(
false
);
let
tableFields
=
reactive
([]);
const
fieldsTableColumns
=
reactive
([
{
prop
:
"comment"
,
label
:
"名称"
}
]);
const
getTableFields
=
()
=>
{
proxy
.
$post
({
url
:
"/api/project/getProjectFields"
,
data
:
{},
callback
:
(
data
)
=>
{
tableFields
=
(
data
[
0
]
&&
data
[
0
].
attributes
)
||
[];
}
})
};
const
showFieldsModal
=
()
=>
{
filedsModalShow
.
value
=
true
;
}
let
selectFields
=
ref
([]);
const
handleFieldsSelectChange
=
(
datas
)
=>
{
selectFields
.
value
=
datas
;
};
const
cancelFieldsModal
=
()
=>
{
selectFields
.
value
=
[];
filedsModalShow
.
value
=
false
;
}
const
confirmFieldsModal
=
()
=>
{
tableColumns
.
value
=
selectFields
.
value
.
map
(
item
=>
{
return
{
prop
:
item
.
fieldName
,
label
:
item
.
comment
,
showOverflowTooltip
:
true
};
}).
concat
([
{
prop
:
"projectLzType"
,
label
:
"状态"
,
width
:
120
,
align
:
"center"
,
formatter
:
(
data
)
=>
{
return
data
.
projectLzType
===
1
?
"待立项"
:
data
.
projectLzType
===
3
?
"立项审批中"
:
data
.
projectLzType
===
5
?
"已立项"
:
data
.
projectLzType
===
7
?
"决策填报中"
:
data
.
projectLzType
===
8
?
"决策审批中"
:
data
.
projectLzType
===
9
?
"已决策"
:
"待立项"
}
},
{
prop
:
"operations"
,
label
:
"操作"
,
width
:
160
,
slot
:
"operations"
,
fixed
:
"right"
,
align
:
"center"
,
}
]);
filedsModalShow
.
value
=
false
;
};
let
loading
=
ref
(
false
);
let
total
=
ref
(
0
);
let
currentPage
=
ref
(
1
);
let
pageSize
=
ref
(
10
);
// 获取列表数据
const
getProjectData
=
()
=>
{
loading
.
value
=
true
;
proxy
.
$post
({
url
:
"/api/project/listProject"
,
data
:
{
page
:
currentPage
.
value
,
pagesize
:
pageSize
.
value
,
attributes
:
[],
buttonType
:
"xmdak"
},
callback
:
(
data
)
=>
{
tableData
.
value
=
data
.
rows
;
total
.
value
=
data
.
count
;
loading
.
value
=
false
;
}
})
};
// 分页
const
handleSizeChange
=
(
size
)
=>
{
pageSize
.
value
=
size
;
currentPage
.
value
=
1
;
getProjectData
();
}
const
handleCurrentPageChange
=
(
page
)
=>
{
currentPage
.
value
=
page
;
getProjectData
();
}
const
addProject
=
()
=>
{
router
.
push
(
"/addProject"
);
};
const
editProject
=
(
item
)
=>
{
router
.
push
({
name
:
"addProject"
,
query
:
{
projectId
:
item
.
id
}
});
};
const
previewProject
=
(
item
)
=>
{
router
.
push
({
name
:
"addProject"
,
query
:
{
isPreview
:
true
,
projectId
:
item
.
id
}
})
}
const
deleteProject
=
(
item
)
=>
{
ElMessageBox
.
confirm
(
"确认删除该项?"
,
"提示"
,{
confirmButtonText
:
'确认'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
,
}).
then
(()
=>
{
proxy
.
$post
({
url
:
"/api/project/deleteProject"
,
data
:
{
id
:
item
.
id
},
callback
:
(
data
)
=>
{
ElMessage
.
success
(
"删除成功"
);
getProjectData
();
}
})
}).
catch
(()
=>
{})
}
onMounted
(()
=>
{
getTableFields
();
getProjectData
();
})
</
script
>
<
style
scoped
lang=
"less"
>
.project-manage{
&-container{
width: 100%;
height: 100%;
padding: 20px;
box-sizing: border-box;
display: flex;
flex-direction: column;
.tab-content{
padding: 10px 15px;
}
}
&-header{
display: flex;
justify-content: space-between;
}
&-content{
flex: 1;
height: 0;
display: flex;
flex-direction: column;
.table-wrap{
margin: 15px 0;
flex: 1;
height: 0;
}
.page-wrap{
display: flex;
justify-content: flex-end;
}
}
}
</
style
>
src/views/managePage/project
Manage
.vue
→
src/views/managePage/project
SetUp
.vue
View file @
f432e65a
...
@@ -144,26 +144,20 @@
...
@@ -144,26 +144,20 @@
label
:
item
.
comment
,
label
:
item
.
comment
,
showOverflowTooltip
:
true
showOverflowTooltip
:
true
};
};
}).
concat
({
}).
concat
([
prop
:
"operations"
,
{
label
:
"操作"
,
prop
:
"operations"
,
width
:
160
,
label
:
"操作"
,
slot
:
"operations"
,
width
:
160
,
fixed
:
"right"
,
slot
:
"operations"
,
align
:
"center"
,
fixed
:
"right"
,
});
align
:
"center"
,
}
]);
filedsModalShow
.
value
=
false
;
filedsModalShow
.
value
=
false
;
};
};
const
tableHeight
=
computed
(()
=>
{
const
headerHeight
=
50
;
const
rowHeight
=
45
;
// 1.如果数据超过10条,固定显示10行的高度 + 滚动条;2.如果数据不超过10条,按实际行数计算高度
const
maxRows
=
Math
.
min
(
tableData
.
value
.
length
,
10
);
const
contentHeight
=
maxRows
*
rowHeight
;
return
`
${
headerHeight
+
contentHeight
}
px`
;
});
let
loading
=
ref
(
false
);
let
loading
=
ref
(
false
);
let
total
=
ref
(
0
);
let
total
=
ref
(
0
);
let
currentPage
=
ref
(
1
);
let
currentPage
=
ref
(
1
);
...
@@ -172,11 +166,12 @@
...
@@ -172,11 +166,12 @@
const
getProjectData
=
()
=>
{
const
getProjectData
=
()
=>
{
loading
.
value
=
true
;
loading
.
value
=
true
;
proxy
.
$post
({
proxy
.
$post
({
url
:
"/api/project/
getOwnProjects
"
,
url
:
"/api/project/
listProject
"
,
data
:
{
data
:
{
page
:
currentPage
.
value
,
page
:
currentPage
.
value
,
pagesize
:
pageSize
.
value
,
pagesize
:
pageSize
.
value
,
attributes
:
[]
attributes
:
[],
buttonType
:
"xmlx"
},
},
callback
:
(
data
)
=>
{
callback
:
(
data
)
=>
{
tableData
.
value
=
data
.
rows
;
tableData
.
value
=
data
.
rows
;
...
...
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