明树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
a9deae8e
Commit
a9deae8e
authored
Dec 05, 2025
by
yangyajing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目管理各流程页面开发
parent
d2a96b7a
Pipeline
#104202
passed with stage
in 12 seconds
Changes
8
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
2083 additions
and
966 deletions
+2083
-966
https.js
src/data/https.js
+0
-1
index.js
src/router/index.js
+35
-10
addProject.vue
src/views/managePage/addProject.vue
+1573
-742
projectAllPage.vue
src/views/managePage/projectAllPage.vue
+1
-69
projectArgument.vue
src/views/managePage/projectArgument.vue
+135
-0
projectDecision.vue
src/views/managePage/projectDecision.vue
+123
-0
projectDraft.vue
src/views/managePage/projectDraft.vue
+179
-0
projectSetUp.vue
src/views/managePage/projectSetUp.vue
+37
-144
No files found.
src/data/https.js
View file @
a9deae8e
...
@@ -47,7 +47,6 @@ export function $post ({ url, data = {}, callback }) {
...
@@ -47,7 +47,6 @@ export function $post ({ url, data = {}, callback }) {
}
}
return
response
;
return
response
;
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
log
(
err
);
ElMessage
.
error
(
err
.
msg
||
"操作失败"
);
ElMessage
.
error
(
err
.
msg
||
"操作失败"
);
if
(
err
&&
err
.
response
&&
err
.
response
.
status
===
401
)
{
if
(
err
&&
err
.
response
&&
err
.
response
.
status
===
401
)
{
router
.
replace
(
"/login"
);
router
.
replace
(
"/login"
);
...
...
src/router/index.js
View file @
a9deae8e
...
@@ -29,6 +29,40 @@ const routes = [
...
@@ -29,6 +29,40 @@ const routes = [
meta
:
{
menuName
:
'项目管理'
,
icon
:
'Management'
},
meta
:
{
menuName
:
'项目管理'
,
icon
:
'Management'
},
redirect
:
"/projectAllPage"
,
redirect
:
"/projectAllPage"
,
children
:
[
children
:
[
{
path
:
'/projectDraft'
,
name
:
'projectDraft'
,
title
:
'项目遴选'
,
component
:
()
=>
import
(
'@/views/managePage/projectDraft.vue'
),
meta
:
{
menuName
:
'项目遴选'
}
},
{
path
:
'/projectSetUp'
,
name
:
'projectSetUp'
,
title
:
'项目立项'
,
component
:
()
=>
import
(
'@/views/managePage/projectSetUp.vue'
),
meta
:
{
menuName
:
'项目立项'
}
},
{
path
:
'/projectArgument'
,
name
:
'projectArgument'
,
title
:
'项目论证'
,
component
:
()
=>
import
(
'@/views/managePage/projectArgument.vue'
),
meta
:
{
menuName
:
'项目论证'
}
},
{
path
:
'/projectDecision'
,
name
:
'projectDecision'
,
title
:
'项目决策'
,
component
:
()
=>
import
(
'@/views/managePage/projectDecision.vue'
),
meta
:
{
menuName
:
'项目决策'
}
},
{
{
path
:
'/projectAllPage'
,
path
:
'/projectAllPage'
,
name
:
'projectAllPage'
,
name
:
'projectAllPage'
,
...
@@ -37,7 +71,7 @@ const routes = [
...
@@ -37,7 +71,7 @@ const routes = [
meta
:
{
menuName
:
'项目档案库'
}
meta
:
{
menuName
:
'项目档案库'
}
},
},
{
{
path
:
'/addProject'
,
path
:
'/addProject
/:type
'
,
name
:
'addProject'
,
name
:
'addProject'
,
title
:
'新增项目'
,
title
:
'新增项目'
,
component
:
()
=>
import
(
'@/views/managePage/addProject.vue'
),
component
:
()
=>
import
(
'@/views/managePage/addProject.vue'
),
...
@@ -45,15 +79,6 @@ const routes = [
...
@@ -45,15 +79,6 @@ const routes = [
menuName
:
'新增项目'
,
menuName
:
'新增项目'
,
showInMenu
:
false
// 不在菜单中显示
showInMenu
:
false
// 不在菜单中显示
}
}
},
{
path
:
'/projectSetUp'
,
name
:
'projectSetUp'
,
title
:
'项目立项'
,
component
:
()
=>
import
(
'@/views/managePage/projectSetUp.vue'
),
meta
:
{
menuName
:
'项目立项'
}
}
}
]
]
},
},
...
...
src/views/managePage/addProject.vue
View file @
a9deae8e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/views/managePage/projectAllPage.vue
View file @
a9deae8e
...
@@ -4,14 +4,12 @@
...
@@ -4,14 +4,12 @@
<div
class=
"header-left"
></div>
<div
class=
"header-left"
></div>
<div
class=
"header-right"
>
<div
class=
"header-right"
>
<el-button
type=
"primary"
@
click=
"showFieldsModal"
>
表头筛选
</el-button>
<el-button
type=
"primary"
@
click=
"showFieldsModal"
>
表头筛选
</el-button>
<el-button
type=
"primary"
@
click=
"addProject"
>
新增
</el-button>
</div>
</div>
</div>
</div>
<div
class=
"project-manage-content"
v-loading=
"loading"
>
<div
class=
"project-manage-content"
v-loading=
"loading"
>
<common-table
<common-table
:autoHeight=
"true"
:autoHeight=
"true"
:maxRows=
"10"
:maxRows=
"10"
:rowHeight=
"40"
:data=
"tableData"
:data=
"tableData"
:columns=
"tableColumns"
:columns=
"tableColumns"
:total=
"total"
:total=
"total"
...
@@ -109,14 +107,6 @@
...
@@ -109,14 +107,6 @@
data
.
projectLzType
===
5
?
"已立项"
:
data
.
projectLzType
===
7
?
"决策填报中"
:
data
.
projectLzType
===
5
?
"已立项"
:
data
.
projectLzType
===
7
?
"决策填报中"
:
data
.
projectLzType
===
8
?
"决策审批中"
:
data
.
projectLzType
===
9
?
"已决策"
:
"待立项"
data
.
projectLzType
===
8
?
"决策审批中"
:
data
.
projectLzType
===
9
?
"已决策"
:
"待立项"
}
}
},
{
prop
:
"operations"
,
label
:
"操作"
,
width
:
160
,
slot
:
"operations"
,
fixed
:
"right"
,
align
:
"center"
}
}
]);
]);
// 获取可显示表头项
// 获取可显示表头项
...
@@ -166,14 +156,6 @@
...
@@ -166,14 +156,6 @@
data
.
projectLzType
===
5
?
"已立项"
:
data
.
projectLzType
===
7
?
"决策填报中"
:
data
.
projectLzType
===
5
?
"已立项"
:
data
.
projectLzType
===
7
?
"决策填报中"
:
data
.
projectLzType
===
8
?
"决策审批中"
:
data
.
projectLzType
===
9
?
"已决策"
:
"待立项"
data
.
projectLzType
===
8
?
"决策审批中"
:
data
.
projectLzType
===
9
?
"已决策"
:
"待立项"
}
}
},
{
prop
:
"operations"
,
label
:
"操作"
,
width
:
160
,
slot
:
"operations"
,
fixed
:
"right"
,
align
:
"center"
,
}
}
]);
]);
filedsModalShow
.
value
=
false
;
filedsModalShow
.
value
=
false
;
...
@@ -193,7 +175,7 @@
...
@@ -193,7 +175,7 @@
page
:
currentPage
.
value
,
page
:
currentPage
.
value
,
pagesize
:
pageSize
.
value
,
pagesize
:
pageSize
.
value
,
attributes
:
[],
attributes
:
[],
button
Type
:
"xmdak"
menu
Type
:
"xmdak"
},
},
callback
:
(
data
)
=>
{
callback
:
(
data
)
=>
{
tableData
.
value
=
data
.
rows
;
tableData
.
value
=
data
.
rows
;
...
@@ -212,44 +194,6 @@
...
@@ -212,44 +194,6 @@
currentPage
.
value
=
page
;
currentPage
.
value
=
page
;
getProjectData
();
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
(()
=>
{
onMounted
(()
=>
{
getTableFields
();
getTableFields
();
getProjectData
();
getProjectData
();
...
@@ -265,9 +209,6 @@
...
@@ -265,9 +209,6 @@
box-sizing: border-box;
box-sizing: border-box;
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
.tab-content{
padding: 10px 15px;
}
}
}
&-header{
&-header{
display: flex;
display: flex;
...
@@ -278,15 +219,6 @@
...
@@ -278,15 +219,6 @@
height: 0;
height: 0;
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
.table-wrap{
margin: 15px 0;
flex: 1;
height: 0;
}
.page-wrap{
display: flex;
justify-content: flex-end;
}
}
}
}
}
</
style
>
</
style
>
src/views/managePage/projectArgument.vue
0 → 100644
View file @
a9deae8e
<
template
>
<div
class=
"project-manage-container"
>
<div
class=
"project-manage-header"
>
<div
class=
"header-left"
></div>
<div
class=
"header-right"
></div>
</div>
<div
class=
"project-manage-content"
v-loading=
"loading"
>
<common-table
:autoHeight=
"true"
:maxRows=
"10"
: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=
"fillProject(row)"
>
继续填报
</el-button>
<el-button
link
type=
"primary"
size=
"small"
@
click=
"approvalProject(row)"
>
发起审批
</el-button>
</
template
>
</common-table>
</div>
</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
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
:
[],
menuType
:
"xmlz"
},
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
fillProject
=
()
=>
{};
const
approvalProject
=
()
=>
{};
onMounted
(()
=>
{
getProjectData
();
})
</
script
>
<
style
scoped
lang=
"less"
>
.project-manage{
&-container{
width: 100%;
height: 100%;
padding: 20px;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
&-header{
display: flex;
justify-content: space-between;
}
&-content{
flex: 1;
height: 0;
display: flex;
flex-direction: column;
}
}
</
style
>
src/views/managePage/projectDecision.vue
0 → 100644
View file @
a9deae8e
<
template
>
<div
class=
"project-manage-container"
>
<div
class=
"project-manage-header"
>
<div
class=
"header-left"
></div>
<div
class=
"header-right"
></div>
</div>
<div
class=
"project-manage-content"
v-loading=
"loading"
>
<common-table
:autoHeight=
"true"
:maxRows=
"10"
: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=
"getResult(row)"
>
查询决策结果
</el-button>
</
template
>
</common-table>
</div>
</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
:
"operations"
,
label
:
"操作"
,
width
:
160
,
slot
:
"operations"
,
fixed
:
"right"
,
align
:
"center"
}
]);
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
:
[],
menuType
:
"xmjc"
},
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
getResult
=
()
=>
{};
onMounted
(()
=>
{
getProjectData
();
})
</
script
>
<
style
scoped
lang=
"less"
>
.project-manage{
&-container{
width: 100%;
height: 100%;
padding: 20px;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
&-header{
display: flex;
justify-content: space-between;
}
&-content{
flex: 1;
height: 0;
display: flex;
flex-direction: column;
}
}
</
style
>
src/views/managePage/projectDraft.vue
0 → 100644
View file @
a9deae8e
<
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=
"addProject"
>
新增
</el-button>
</div>
</div>
<div
class=
"project-manage-content"
v-loading=
"loading"
>
<common-table
:autoHeight=
"true"
:maxRows=
"10"
: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>
</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
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
:
[],
menuType
:
"xmlingxuan"
},
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/xmlingxuan"
);
};
const
editProject
=
(
item
)
=>
{
router
.
push
({
name
:
"addProject"
,
params
:
{
type
:
"xmlingxuan"
},
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
(()
=>
{
getProjectData
();
})
</
script
>
<
style
scoped
lang=
"less"
>
.project-manage{
&-container{
width: 100%;
height: 100%;
padding: 20px;
box-sizing: border-box;
display: flex;
flex-direction: column;
}
&-header{
display: flex;
justify-content: space-between;
}
&-content{
flex: 1;
height: 0;
display: flex;
flex-direction: column;
}
}
</
style
>
src/views/managePage/projectSetUp.vue
View file @
a9deae8e
...
@@ -2,16 +2,12 @@
...
@@ -2,16 +2,12 @@
<div
class=
"project-manage-container"
>
<div
class=
"project-manage-container"
>
<div
class=
"project-manage-header"
>
<div
class=
"project-manage-header"
>
<div
class=
"header-left"
></div>
<div
class=
"header-left"
></div>
<div
class=
"header-right"
>
<div
class=
"header-right"
></div>
<el-button
type=
"primary"
@
click=
"showFieldsModal"
>
表头筛选
</el-button>
<el-button
type=
"primary"
@
click=
"addProject"
>
新增
</el-button>
</div>
</div>
</div>
<div
class=
"project-manage-content"
v-loading=
"loading"
>
<div
class=
"project-manage-content"
v-loading=
"loading"
>
<common-table
<common-table
:autoHeight=
"true"
:autoHeight=
"true"
:maxRows=
"10"
:maxRows=
"10"
:rowHeight=
"40"
:data=
"tableData"
:data=
"tableData"
:columns=
"tableColumns"
:columns=
"tableColumns"
:total=
"total"
:total=
"total"
...
@@ -25,52 +21,19 @@
...
@@ -25,52 +21,19 @@
@
current-page-change=
"handleCurrentPageChange"
@
current-page-change=
"handleCurrentPageChange"
>
>
<template
#
operations=
"
{ row, index }">
<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=
"primary"
size=
"small"
<el-button
link
type=
"danger"
size=
"small"
@
click=
"deleteProject(row)"
>
删除
</el-button>
v-if=
"row.projectLzType === 3"
:loading=
"row.loading"
@
click=
"getResult(row)"
>
查询审批结果
</el-button>
<!-- 已立项 -->
<el-button
link
type=
"primary"
size=
"small"
v-if=
"row.projectLzType === 5"
@
click=
"fillDecision(row)"
>
决策填报
</el-button>
</
template
>
</
template
>
</common-table>
</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>
</div>
</
template
>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -85,8 +48,6 @@
...
@@ -85,8 +48,6 @@
const
router
=
useRouter
();
const
router
=
useRouter
();
const
{
proxy
}
=
getCurrentInstance
();
const
{
proxy
}
=
getCurrentInstance
();
// 计算表格高度
let
tableData
=
ref
([]);
let
tableData
=
ref
([]);
let
tableColumns
=
ref
([
let
tableColumns
=
ref
([
{
{
...
@@ -102,61 +63,12 @@
...
@@ -102,61 +63,12 @@
{
{
prop
:
"operations"
,
prop
:
"operations"
,
label
:
"操作"
,
label
:
"操作"
,
width
:
1
6
0
,
width
:
1
9
0
,
slot
:
"operations"
,
slot
:
"operations"
,
fixed
:
"right"
,
fixed
:
"right"
,
align
:
"center"
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
:
"operations"
,
label
:
"操作"
,
width
:
160
,
slot
:
"operations"
,
fixed
:
"right"
,
align
:
"center"
,
}
]);
filedsModalShow
.
value
=
false
;
};
let
loading
=
ref
(
false
);
let
loading
=
ref
(
false
);
let
total
=
ref
(
0
);
let
total
=
ref
(
0
);
...
@@ -171,7 +83,7 @@
...
@@ -171,7 +83,7 @@
page
:
currentPage
.
value
,
page
:
currentPage
.
value
,
pagesize
:
pageSize
.
value
,
pagesize
:
pageSize
.
value
,
attributes
:
[],
attributes
:
[],
button
Type
:
"xmlx"
menu
Type
:
"xmlx"
},
},
callback
:
(
data
)
=>
{
callback
:
(
data
)
=>
{
tableData
.
value
=
data
.
rows
;
tableData
.
value
=
data
.
rows
;
...
@@ -190,46 +102,39 @@
...
@@ -190,46 +102,39 @@
currentPage
.
value
=
page
;
currentPage
.
value
=
page
;
getProjectData
();
getProjectData
();
}
}
const
addProject
=
()
=>
{
const
getResult
=
(
item
)
=>
{
router
.
push
(
"/addProject"
);
item
.
loading
=
true
;
};
proxy
.
$post
({
const
editProject
=
(
item
)
=>
{
url
:
"/api/project/queryLixiangResult"
,
data
:
{
id
:
item
.
id
},
callback
:
(
data
)
=>
{
item
.
loading
=
false
;
router
.
push
({
router
.
push
({
name
:
"addProject"
,
name
:
"addProject"
,
params
:
{
type
:
"xmlx"
},
query
:
{
query
:
{
projectId
:
item
.
id
projectId
:
item
.
id
}
}
});
});
}
})
};
};
const
previewProject
=
(
item
)
=>
{
const
fillDecision
=
(
item
)
=>
{
router
.
push
({
router
.
push
({
name
:
"addProject"
,
name
:
"addProject"
,
params
:
{
type
:
"xmlx"
},
query
:
{
query
:
{
isPreview
:
true
,
projectId
:
item
.
id
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
(()
=>
{
onMounted
(()
=>
{
getTableFields
();
getProjectData
();
getProjectData
();
})
})
</
script
>
</
script
>
...
@@ -243,9 +148,6 @@
...
@@ -243,9 +148,6 @@
box-sizing: border-box;
box-sizing: border-box;
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
.tab-content{
padding: 10px 15px;
}
}
}
&-header{
&-header{
display: flex;
display: flex;
...
@@ -256,15 +158,6 @@
...
@@ -256,15 +158,6 @@
height: 0;
height: 0;
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
.table-wrap{
margin: 15px 0;
flex: 1;
height: 0;
}
.page-wrap{
display: flex;
justify-content: flex-end;
}
}
}
}
}
</
style
>
</
style
>
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