明树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
1e428006
Commit
1e428006
authored
Feb 09, 2026
by
zhanghan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
成本管理开发
parent
efe4b95d
Pipeline
#107145
passed with stage
in 18 seconds
Changes
5
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1229 additions
and
98 deletions
+1229
-98
FinancialTable.vue
src/components/FinancialTable.vue
+179
-76
routes.js
src/router/routes.js
+8
-2
cost.vue
src/views/elseManage/cost.vue
+178
-20
costAdd.vue
src/views/elseManage/costAdd.vue
+494
-0
costTab1.vue
src/views/elseManage/costTab1.vue
+370
-0
No files found.
src/components/FinancialTable.vue
View file @
1e428006
This diff is collapsed.
Click to expand it.
src/router/routes.js
View file @
1e428006
...
@@ -353,18 +353,24 @@ const routes = [
...
@@ -353,18 +353,24 @@ const routes = [
title
:
"成本管理"
,
title
:
"成本管理"
,
component
:
()
=>
import
(
"@/views/elseManage/cost.vue"
),
component
:
()
=>
import
(
"@/views/elseManage/cost.vue"
),
},
},
{
path
:
"/costAdd"
,
name
:
"costAdd"
,
title
:
"成本管理"
,
component
:
()
=>
import
(
"@/views/elseManage/costAdd.vue"
),
},
{
{
path
:
"/property"
,
path
:
"/property"
,
name
:
"property"
,
name
:
"property"
,
title
:
"
成本管理
"
,
title
:
"
资产管理情况
"
,
component
:
()
=>
import
(
"@/views/elseManage/property.vue"
),
component
:
()
=>
import
(
"@/views/elseManage/property.vue"
),
},
},
{
{
path
:
"/link"
,
path
:
"/link"
,
name
:
"link"
,
name
:
"link"
,
title
:
"
成本
管理"
,
title
:
"
链接
管理"
,
component
:
()
=>
import
(
"@/views/elseManage/link.vue"
),
component
:
()
=>
import
(
"@/views/elseManage/link.vue"
),
},
},
],
],
...
...
src/views/elseManage/cost.vue
View file @
1e428006
<
template
>
<
template
>
<div
class=
"building-container"
>
<div
class=
"manage-container"
>
<img
src=
"@/assets/images/building.png"
alt=
""
/>
<div
class=
"manage-wrap"
>
<div
class=
"title"
>
努力开发中……
</div>
<div
class=
"manage-header"
>
<div
class=
"header-left"
></div>
<div
class=
"header-right"
>
<el-button
type=
"primary"
@
click=
"costAdd"
>
新增
</el-button>
</div>
</div>
<div
class=
"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=
"previewStatement(row)"
>
查看
</el-button
>
<el-button
link
type=
"primary"
size=
"small"
@
click=
"editStatement(row)"
>
编辑
</el-button
>
<el-button
link
type=
"danger"
size=
"small"
@
click=
"deleteStatement(row)"
>
删除
</el-button
>
</
template
>
</common-table>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
setup
></
script
>
<
script
setup
>
import
{
ref
,
onMounted
,
getCurrentInstance
}
from
"vue"
;
import
{
useRouter
}
from
"vue-router"
;
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
CommonTable
from
"@/components/common/commonTable.vue"
;
<
style
lang=
"less"
>
const
router
=
useRouter
();
.building-container {
const
{
proxy
}
=
getCurrentInstance
();
width: 100%;
height: 100%;
let
tableData
=
ref
([]);
display: flex;
let
tableColumns
=
ref
([
flex-direction: column;
{
align-items: center;
prop
:
"projectName"
,
justify-content: center;
label
:
"项目信息"
,
img {
showOverflowTooltip
:
true
,
max-width: 300px;
},
}
{
.title {
prop
:
"yjzbLen"
,
font-size: 18px;
label
:
"一级指标"
,
color: #999;
showOverflowTooltip
:
true
,
}
},
}
{
prop
:
"ejzbLen"
,
label
:
"二级指标"
,
showOverflowTooltip
:
true
,
},
{
prop
:
"operations"
,
label
:
"操作"
,
width
:
170
,
slot
:
"operations"
,
fixed
:
"right"
,
align
:
"center"
,
},
]);
let
loading
=
ref
(
false
);
let
total
=
ref
(
0
);
let
currentPage
=
ref
(
1
);
let
pageSize
=
ref
(
10
);
// 获取列表数据
const
getStatementData
=
()
=>
{
loading
.
value
=
true
;
proxy
.
$post
({
url
:
"/api/project/getCbglList"
,
data
:
{
page
:
currentPage
.
value
,
pagesize
:
pageSize
.
value
,
},
callback
:
(
data
)
=>
{
const
countValidRows
=
(
arr
)
=>
{
if
(
!
Array
.
isArray
(
arr
))
return
0
;
return
arr
.
reduce
((
count
,
item
)
=>
{
if
(
Array
.
isArray
(
item
?.
fj
)
&&
item
.
fj
.
length
>
0
)
{
count
++
;
}
return
count
;
},
0
);
};
tableData
.
value
=
data
.
rows
.
map
((
it
)
=>
{
return
{
...
it
,
yjzbLen
:
`
${
it
.
yjzb
.
length
}
行`
,
ejzbLen
:
`
${
it
.
ejzb
.
length
}
行`
,
};
});
total
.
value
=
data
.
count
;
loading
.
value
=
false
;
},
});
};
// 分页
const
handleSizeChange
=
(
size
)
=>
{
pageSize
.
value
=
size
;
currentPage
.
value
=
1
;
getStatementData
();
};
const
handleCurrentPageChange
=
(
page
)
=>
{
currentPage
.
value
=
page
;
getStatementData
();
};
const
costAdd
=
()
=>
{
router
.
push
(
"/costAdd"
);
};
const
editStatement
=
(
item
)
=>
{
router
.
push
({
name
:
"costAdd"
,
query
:
{
id
:
item
.
id
,
},
});
};
const
previewStatement
=
(
item
)
=>
{
router
.
push
({
name
:
"costAdd"
,
query
:
{
isPreview
:
true
,
id
:
item
.
id
,
},
});
};
const
deleteStatement
=
(
item
)
=>
{
ElMessageBox
.
confirm
(
"确认删除该项?"
,
"提示"
,
{
confirmButtonText
:
"确认"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
proxy
.
$post
({
url
:
"/api/project/deleteCbgl"
,
data
:
{
id
:
item
.
id
,
},
callback
:
(
data
)
=>
{
ElMessage
.
success
(
"删除成功"
);
getStatementData
();
},
});
})
.
catch
(()
=>
{});
};
onMounted
(()
=>
{
getStatementData
();
});
</
script
>
<
style
scoped
lang=
"less"
>
@import "@/styles/manage.less";
</
style
>
</
style
>
src/views/elseManage/costAdd.vue
0 → 100644
View file @
1e428006
This diff is collapsed.
Click to expand it.
src/views/elseManage/costTab1.vue
0 → 100644
View file @
1e428006
This diff is collapsed.
Click to expand it.
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