Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
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
海康威视
web-project
Commits
ade3a35f
Commit
ade3a35f
authored
Sep 03, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
年度参数排序问题
parent
37fbc939
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
32 deletions
+11
-32
AnnualParamPage.vue
src/views/SchedulingPage/AnnualParamPage.vue
+11
-32
No files found.
src/views/SchedulingPage/AnnualParamPage.vue
View file @
ade3a35f
...
@@ -386,37 +386,16 @@ function resetSearch() {
...
@@ -386,37 +386,16 @@ function resetSearch() {
searchKey
.
value
=
''
searchKey
.
value
=
''
getData
()
getData
()
}
}
function
sortByYear
(
a
,
b
)
{
const
yearDiff
=
a
.
year
-
b
.
year
;
if
(
yearDiff
!==
0
)
return
yearDiff
;
function
customSort
(
a
,
b
)
{
const
energyLevels
=
{
'一步节能'
:
4
,
'二步节能'
:
3
,
'三步节能'
:
2
,
'四步节能'
:
1
,
'非节能'
:
5
};
let
valA
;
return
energyLevels
[
a
.
energyType
]
-
energyLevels
[
b
.
energyType
];
let
valB
;
}
if
(
a
.
energyType
===
'一步节能'
)
{
function
sortByEnergyLevel
(
a
,
b
)
{
valA
=
4
const
energyLevels
=
{
'一步节能'
:
4
,
'二步节能'
:
3
,
'三步节能'
:
2
,
'四步节能'
:
1
,
'非节能'
:
5
};
}
else
if
(
a
.
energyType
===
'二步节能'
)
{
return
energyLevels
[
a
.
energyType
]
-
energyLevels
[
b
.
energyType
];
valA
=
3
}
else
if
(
a
.
energyType
===
'三步节能'
)
{
valA
=
2
}
else
if
(
a
.
energyType
===
'四步节能'
)
{
valA
=
1
}
else
if
(
a
.
energyType
===
'非节能'
)
{
valA
=
5
}
else
{
valA
=
6
}
if
(
b
.
energyType
===
'一步节能'
)
{
valB
=
4
}
else
if
(
b
.
energyType
===
'二步节能'
)
{
valB
=
3
}
else
if
(
b
.
energyType
===
'三步节能'
)
{
valB
=
2
}
else
if
(
b
.
energyType
===
'四步节能'
)
{
valB
=
1
}
else
if
(
b
.
energyType
===
'非节能'
)
{
valB
=
5
}
else
{
valB
=
6
}
return
valA
-
valB
}
}
function
getSupply
()
{
function
getSupply
()
{
...
@@ -467,9 +446,9 @@ function getOrganizationStructure() {
...
@@ -467,9 +446,9 @@ function getOrganizationStructure() {
style="width: 100%"
style="width: 100%"
>
>
<el-table-column
label=
"序号"
type=
"index"
align=
"center"
width=
"100"
/>
<el-table-column
label=
"序号"
type=
"index"
align=
"center"
width=
"100"
/>
<el-table-column
label=
"节能类型"
sortable
:sort-method=
"customSort
"
prop=
"energyType"
width=
"150"
/>
<el-table-column
label=
"节能类型"
sortable
:sort-method=
"(a, b) => sortByEnergyLevel(a, b)"
:sort-by=
"['energyType']
"
prop=
"energyType"
width=
"150"
/>
<el-table-column
label=
"供热站名称"
prop=
"supplyName"
width=
"200"
/>
<el-table-column
label=
"供热站名称"
prop=
"supplyName"
width=
"200"
/>
<el-table-column
label=
"年度"
sortable
:sort-method=
"customSort
"
prop=
"year"
width=
"150"
/>
<el-table-column
label=
"年度"
sortable
:sort-method=
"(a, b) => sortByYear(a, b)"
:sort-by=
"['year', 'energyType']
"
prop=
"year"
width=
"150"
/>
<el-table-column
label=
"热指标(W/m²)"
prop=
"standard"
width=
"150"
/>
<el-table-column
label=
"热指标(W/m²)"
prop=
"standard"
width=
"150"
/>
<el-table-column
label=
"度日数标定值"
prop=
"degreeStandard"
width=
"200"
/>
<el-table-column
label=
"度日数标定值"
prop=
"degreeStandard"
width=
"200"
/>
<el-table-column
label=
"室内温度(℃)"
prop=
"indoorTemperature"
width=
"150"
/>
<el-table-column
label=
"室内温度(℃)"
prop=
"indoorTemperature"
width=
"150"
/>
...
...
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