Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-operate-sys-cscec
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fulixin
dsk-operate-sys-cscec
Commits
0ee095ac
Commit
0ee095ac
authored
Mar 01, 2024
by
tianhongyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge
parent
fea76448
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
13 deletions
+60
-13
index.vue
dsk-operate-ui/src/components/TableListCom/index.vue
+39
-10
index.vue
...projectCostLedger/detail/components/FeedSummary/index.vue
+16
-2
index.vue
dsk-operate-ui/src/views/projectCostLedger/detail/index.vue
+5
-1
No files found.
dsk-operate-ui/src/components/TableListCom/index.vue
View file @
0ee095ac
<
template
>
<div
class=
"table-list-com-ins"
:class=
"
{'is-empty-table' : !tableDataTotal}">
<div
class=
"table-list-com-ins"
:class=
"
{'is-empty-table' : !tableDataTotal
,'no-pagination' : !hasQueryParams
}">
<div
class=
"table-item"
>
<el-table
v-if=
"tableDataTotal>0"
class=
"fixed-table"
:class=
"headerFixed ? 'headerFixed':''"
v-loading=
"tableLoading"
:data=
"tableData"
element-loading-text=
"Loading"
ref=
"tableRef"
border
fit
highlight-current-row
:default-sort=
"defaultSort?defaultSort:
{}"
...
...
@@ -9,7 +9,7 @@
:fixed=
"needSelection.fixed"
:align=
"needSelection.align"
:show-overflow-tooltip=
"needSelection.showOverflowTooltip"
>
</el-table-column>
<el-table-column
type=
"index"
v-if=
"isIndex"
label=
"序号"
:width=
"flexWidth(tableData)"
align=
"left"
:fixed=
"indexFixed"
:resizable=
"false"
>
<template
slot-scope=
"scope"
>
{{
queryParams
.
pageNum
*
queryParams
.
pageSize
-
queryParams
.
pageSize
+
scope
.
$index
+
1
}}
</
template
>
<template
slot-scope=
"scope"
>
{{
pagingHandler
(
hasQueryParams
,
queryParams
,
scope
)
}}
</
template
>
</el-table-column>
<
template
v-for=
"(item,index) in formColum"
>
<template
v-if=
"item.use !== false"
>
...
...
@@ -20,8 +20,9 @@
</el-table-column>
<!-- 序号列 -->
<el-table-column
v-else-if=
"item.type == 'index'"
type=
"index"
:key=
"item.uid ? item.uid : index"
:label=
"item.label ? item.label : '序号'"
:width=
"flexWidth(tableData)"
:align=
"item.align?item.align:'left'"
:fixed=
"item.fixed"
:resizable=
"false"
>
<template
slot-scope=
"scope"
>
{{
queryParams
.
pageNum
*
queryParams
.
pageSize
-
queryParams
.
pageSize
+
scope
.
$index
+
1
}}
</
template
>
:width=
"flexWidth(tableData,item.width)"
:min-width=
"item.minWidth"
:align=
"item.align?item.align:'left'"
:fixed=
"item.fixed"
:resizable=
"false"
>
<template
slot-scope=
"scope"
>
{{
pagingHandler
(
hasQueryParams
,
queryParams
,
scope
)
}}
</
template
>
</el-table-column>
<!-- 普通列 -->
<el-table-column
v-else
:key=
"item.uid ? item.uid : index"
:label=
"item.label"
:prop=
"item.prop"
:width=
"item.width"
...
...
@@ -63,7 +64,7 @@
</div>
</div>
<div
class=
"pagination-box"
v-if=
"show_page && tableDataTotal>queryParams.pageSize"
>
<div
class=
"pagination-box"
v-if=
"show_page &&
hasQueryParams &&
tableDataTotal>queryParams.pageSize"
>
<el-pagination
background
:current-page=
"current_page"
:page-size=
"queryParams.pageSize"
:total=
"tableDataTotal"
layout=
"prev, pager, next, jumper"
@
current-change=
"handleCurrentChange"
@
size-change=
"handleSizeChange"
/>
</div>
...
...
@@ -169,12 +170,26 @@ export default {
return
{
current_page
:
this
.
queryParams
.
pageNum
,
show_page
:
this
.
paging
,
comMaxHeight
:
null
comMaxHeight
:
null
,
hasQueryParams
:
false
};
},
watch
:
{
'queryParams.pageNum'
(
newVal
,
oldVal
)
{
this
.
current_page
=
newVal
;
},
queryParams
:
{
handler
(
newValue
)
{
const
_temp
=
newValue
?
newValue
:
{};
const
keys
=
Object
.
keys
(
_temp
);
if
(
keys
.
length
)
{
this
.
hasQueryParams
=
true
;
}
else
{
this
.
hasQueryParams
=
false
;
}
},
immediate
:
true
,
deep
:
true
}
},
created
()
{
...
...
@@ -196,6 +211,14 @@ export default {
}
},
pagingHandler
(
hasQueryParams
,
queryParams
,
scope
)
{
// 有分页参数
if
(
hasQueryParams
)
{
return
queryParams
.
pageNum
*
queryParams
.
pageSize
-
queryParams
.
pageSize
+
scope
.
$index
+
1
;
}
// 不分页
return
scope
.
$index
+
1
;
},
handleCurrentChange
(
e
)
{
if
(
this
.
MaxPage
<
e
)
{
this
.
show_page
=
false
;
...
...
@@ -217,12 +240,12 @@ export default {
selectionChange
(
selectionArray
)
{
this
.
$emit
(
"selectionChange"
,
selectionArray
);
},
flexWidth
(
tableData
)
{
let
currentMax
=
this
.
queryParams
.
pageNum
*
this
.
queryParams
.
pageSize
-
this
.
queryParams
.
pageSize
+
tableData
.
length
,
wdth
=
50
;
flexWidth
(
tableData
,
width
=
50
)
{
let
currentMax
=
this
.
queryParams
.
pageNum
*
this
.
queryParams
.
pageSize
-
this
.
queryParams
.
pageSize
+
tableData
.
length
;
if
(
currentMax
.
toString
().
length
>
3
)
{
w
dth
=
w
dth
+
(
currentMax
.
toString
().
length
-
3
)
*
10
;
w
idth
=
wi
dth
+
(
currentMax
.
toString
().
length
-
3
)
*
10
;
}
return
wdth
+
'px'
;
return
w
i
dth
+
'px'
;
}
}
}
...
...
@@ -236,6 +259,12 @@ export default {
height
:
100%
;
}
}
&
.no-pagination
{
::v-deep
.table-item
{
max-height
:
100%
;
}
}
::v-deep
.table-item
{
width
:
100%
;
max-height
:
calc
(
100%
-
40px
);
...
...
dsk-operate-ui/src/views/projectCostLedger/detail/components/FeedSummary/index.vue
View file @
0ee095ac
...
...
@@ -36,7 +36,8 @@
<!-- 数据列表部分 -->
<div
class=
"project-feedsummary-list-container"
>
<dsk-skeleton
v-if=
"tableLoading"
></dsk-skeleton>
<table-list-com
:tableData=
"tableDataList"
v-else-if=
"!tableLoading"
:tableDataTotal=
"total"
:paging=
"false"
></table-list-com>
<table-list-com
:tableData=
"tableDataList"
:formColum=
"formColum"
v-else-if=
"!tableLoading"
:maxHeight=
"true"
:tableDataTotal=
"total"
:paging=
"false"
></table-list-com>
</div>
</div>
</div>
...
...
@@ -100,7 +101,15 @@ export default {
total
:
0
,
// 列表表头
formColum
:
[
{
label
:
'序号'
,
prop
:
"staticSerialNumber"
,
type
:
"index"
,
lock
:
true
,
fixed
:
false
,
uid
:
v4
()
},
{
label
:
'序号'
,
prop
:
"staticSerialNumber"
,
type
:
"index"
,
lock
:
true
,
width
:
"52"
,
fixed
:
false
,
uid
:
v4
()
},
{
label
:
'成本科目'
,
prop
:
"cbSubjectName"
,
width
:
"137"
,
uid
:
v4
()
},
{
label
:
'公司编码'
,
prop
:
"companyNo"
,
width
:
"137"
,
uid
:
v4
()
},
{
label
:
'集团编码'
,
prop
:
"orgNo"
,
width
:
"137"
,
uid
:
v4
()
},
{
label
:
'名称'
,
prop
:
"cbName"
,
width
:
"232"
,
uid
:
v4
()
},
{
label
:
'工作内容'
,
prop
:
"jobContent"
,
width
:
"341"
,
uid
:
v4
()
},
{
label
:
'计算规则'
,
prop
:
"calculationRule"
,
width
:
"137"
,
uid
:
v4
()
},
{
label
:
'单位'
,
prop
:
"unit"
,
width
:
"57"
,
uid
:
v4
()
},
{
label
:
'甲供材料说明'
,
prop
:
"materialDescription"
,
width
:
"137"
,
uid
:
v4
()
},
],
// 已记录月份集合
monthList
:
[],
...
...
@@ -386,6 +395,11 @@ export default {
.project-feedsummary-list-container
{
width
:
100%
;
height
:
calc
(
100%
-
48px
);
/* overflow: auto; */
.table-list-com-ins
{
height
:
100%
;
}
}
}
}
...
...
dsk-operate-ui/src/views/projectCostLedger/detail/index.vue
View file @
0ee095ac
...
...
@@ -164,7 +164,11 @@ export default {
try
{
this
.
tabsDisabled
=
true
;
const
{
query
}
=
this
.
$route
;
// if (!query.projectId) return this.$message.error("缺少项目id");
// if (!query.projectId) {
// this.$message.error("缺少项目id");
// this.tabsDisabled = true;
// return;
// };
this
.
projectId
=
query
.
projectId
;
// 获取详情 保证详情获取完毕 再执行tab命中 进行生命周期
await
this
.
getProjectDetail
(
query
.
projectId
);
...
...
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