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
16d572bd
Commit
16d572bd
authored
Aug 01, 2024
by
朱超
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitee.com/tj-wang-yahui/AMS_HeatSys_Vue_V10
parents
dd39eb09
1a42eac2
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
531 additions
and
7 deletions
+531
-7
AlarmInfoPage.vue
src/views/AlarmPage/AlarmInfoPage.vue
+2
-1
HisPatrolPage.vue
src/views/PatrolPage/HisPatrolPage.vue
+310
-3
TodayPatrolPage.vue
src/views/PatrolPage/TodayPatrolPage.vue
+219
-3
No files found.
src/views/AlarmPage/AlarmInfoPage.vue
View file @
16d572bd
...
...
@@ -108,7 +108,7 @@ function sortMethod({ order, prop }){
direction
=
'DESC'
}
if
(
i
===
"name"
){
sortname
=
"
n
ame"
;
sortname
=
"
UnitN
ame"
;
}
else
if
(
i
===
"alarmDate"
){
sortname
=
"alarmDate"
;
}
...
...
@@ -305,6 +305,7 @@ function gettransfer() {
}
http
.
post
(
"/api/alarm/"
+
type
.
value
,
AlarmInfo
).
then
((
result
)
=>
{
console
.
log
(
result
.
data
);
console
.
log
(
AlarmInfo
);
if
(
result
.
data
!==
null
){
tableData
.
value
=
result
.
data
.
dataInfoList
;
total
.
value
=
result
.
data
.
rowCount
;
...
...
src/views/PatrolPage/HisPatrolPage.vue
View file @
16d572bd
This diff is collapsed.
Click to expand it.
src/views/PatrolPage/TodayPatrolPage.vue
View file @
16d572bd
<
template
>
换热站巡更
</
template
>
\ No newline at end of file
<!-- 条件筛选卡片 -->
<el-card
class=
"card-contianer"
>
<div
class=
"div-header"
>
<el-form-item
label=
"设备:"
>
<el-cascader
:options=
"options"
v-model=
"AlarmInfo"
:props=
"props"
collapse-tags
clearable
:show-all-levels=
"false"
placeholder=
"请选择"
style=
"min-width: 210px;"
/>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"getdata"
style=
"min-width: 70px;"
>
查询
</el-button>
</el-form-item>
</div>
</el-card>
<el-card
class=
"moduleCard"
:height=
"tableHeight"
>
<el-table
:data=
"tableData"
:row-class-name=
"rowClassName"
:height=
"tableHeight"
v-loading=
"loading"
:cell-style=
"setCellStyle"
id=
"out-table"
border
highlight-current-row
:header-cell-style=
"setHeaderCellStyle"
:header-cell-class-name=
"handleHeadAddClass"
>
<el-table-column
prop=
"index"
label=
"编号"
:sortable=
"false"
width=
"70px"
fixed
/>
<el-table-column
prop=
"transferName"
label=
"换热站"
:sortable=
"false"
width=
"170px"
fixed
/>
<el-table-column
prop=
"realName"
label=
"巡更人"
:sortable=
"false"
width=
"150px"
fixed
/>
<el-table-column
prop=
"times"
label=
"日巡次数"
:sortable=
"false"
width=
"120px"
fixed
/>
<el-table-column
prop=
"patrolStatus"
label=
"巡更记录"
:sortable=
"false"
width=
"400px"
fixed
>
<template
#
default=
"scope"
>
<p
v-html=
"getImgUrl(scope.row.patrolStatus)"
></p>
<!--
<span>
{{
getImgUrl
(
scope
.
row
.
patrolStatus
)
}}
</span>
-->
<!--
<div
class=
"div-form-img"
>
<el-image
class=
"img-center"
v-if=
"getImgUrl(scope,scope.column.property)"
style=
"width: 20px; height: 20px"
:src=
"getImgUrl(scope,scope.column.property)"
:fit=
"'cover'"
/>
</div>
-->
</
template
>
</el-table-column>
</el-table>
</el-card>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
reactive
,
onMounted
,
onUnmounted
}
from
'vue'
;
import
http
from
'../../api/http'
;
import
store
from
"../../store/index"
;
const
options
=
reactive
([]);
const
tableData
=
ref
([]);
const
tableHeight
=
ref
(
500
);
const
enterpriseId
=
ref
();
const
loading
=
ref
(
true
);
const
sortField
=
reactive
({});
getEnterprise
();
function
getEnterprise
(){
var
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
}
}
const
props
=
{
multiple
:
true
,
emitPath
:
false
}
function
setContentHeight
()
{
tableHeight
.
value
=
window
.
innerHeight
-
195
;
}
function
handleHeadAddClass
({
column
})
{
if
(
sortField
[
column
.
property
])
{
column
.
order
=
sortField
[
column
.
property
]
}
}
const
AlarmInfo
=
ref
([])
getSupplys
();
getdata
();
function
getdata
()
{
gettransfer
();
}
//获取换热机组列表
function
getSupplys
(){
loading
.
value
=
true
;
tableData
.
length
=
0
;
options
.
length
=
0
;
AlarmInfo
.
length
=
0
;
var
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
console
.
log
(
result
)
result
.
forEach
(
element
=>
{
if
(
element
.
enterpriseId
===
enterpriseId
.
value
){
if
(
element
.
enterpriseId
===
"9BCA54BC-8F27-4849-8D7D-50C5099E1949"
.
toLowerCase
()){
element
.
serviceCenterList
.
forEach
(
center
=>
{
let
c
=
[];
center
.
supplyList
.
forEach
(
supply
=>
{
let
chi
=
[];
supply
.
transferList
.
forEach
(
unit
=>
{
chi
.
push
({
value
:
unit
.
unitId
,
label
:
unit
.
unitName
});
});
c
.
push
({
children
:
chi
,
label
:
supply
.
supplyName
});
});
options
.
push
({
children
:
c
,
label
:
center
.
serviceCenterName
});
})
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
let
chi
=
[];
element
.
transferList
.
forEach
(
unit
=>
{
chi
.
push
({
value
:
unit
.
unitId
,
label
:
unit
.
unitName
});
})
options
.
push
({
children
:
chi
,
label
:
element
.
supplyName
});
})
}
}
});
}
AlarmInfo
.
value
.
push
(
options
[
0
].
children
[
0
].
children
[
0
].
value
);
}
//获取数据列表
function
gettransfer
()
{
loading
.
value
=
true
;
http
.
post
(
"/api/patrol/GetPatrolTodeyData"
,
AlarmInfo
.
value
).
then
((
result
)
=>
{
console
.
log
(
result
.
data
);
if
(
result
.
data
!==
null
){
tableData
.
value
=
result
.
data
;
}
if
(
result
.
data
===
null
){
tableData
.
value
=
null
;
}
loading
.
value
=
false
;
});
}
function
setCellStyle
({
row
,
column
,
rowIndex
,
columnIndex
})
{
let
css_color
=
{};
css_color
[
'padding-left'
]
=
'px'
;
css_color
[
'padding-right'
]
=
'0px'
;
css_color
[
'borderColor'
]
=
'#97d5fd'
;
css_color
[
'padding'
]
=
'5px'
;
return
css_color
;
}
function
setHeaderCellStyle
({
row
,
column
,
rowIndex
,
columnIndex
})
{
let
css_color
;
var
backcolor
=
'd9f1ff'
;
css_color
=
{
'background-color'
:
'#'
+
backcolor
,
'padding-left'
:
'0px'
,
'padding-right'
:
'0px'
,
'borderColor'
:
'#97d5fd'
,
'color'
:
'#000'
,
'text-align'
:
'center'
,
'vertical-align'
:
'top'
};
var
backcolor
=
'd9f1ff'
;
css_color
=
{
'background-color'
:
'#'
+
backcolor
,
'padding-left'
:
'0px'
,
'padding-right'
:
'0px'
,
'borderColor'
:
'#97d5fd'
,
'color'
:
'#000'
,
'text-align'
:
'center'
,
'vertical-align'
:
'top'
};
return
css_color
;
}
function
getImgUrl
(
item
)
{
item
=
item
.
replaceAll
(
"N"
,
'<img style="width: 20px; height: 20px" src="/imgs/status/status_off.png" />'
)
item
=
item
.
replaceAll
(
"N"
,
'<img style="width: 20px; height: 20px" src="/imgs/status/status_run.png" />'
)
console
.
log
(
item
)
return
item
;
}
onMounted
(()
=>
{
setContentHeight
();
window
.
addEventListener
(
'resize'
,
setContentHeight
);
})
onUnmounted
(()
=>
{
window
.
removeEventListener
(
'resize'
,
setContentHeight
);
})
</
script
>
<
style
lang=
"less"
scoped
>
.moduleCard {
width: auto;
overflow: auto;
padding: 0px;
::v-deep .el-card__body {
padding: 0px;
}
}
.pagination {
padding: 4px;
margin-left: 20px;
height: 30px;
//background-color: #8939cf;
vertical-align: middle;
}
//鼠标所在行的颜色
::v-deep .el-table__body tr:hover>td {
background: linear-gradient(to top, rgb(0, 198, 255), rgb(255, 255, 255)) !important;
}
::v-deep .el-table__body tr.current-row>td {
background-color: #92cbf1 !important;
}
.card-contianer {
width: auto;
height: 70px;
.div-header {
width: 100%;
display: flex;
margin: 20px;
}
}
.el-form-item {
margin-top: -20px;
margin-right: 30px;
}
.el-tag--mini {
height: 21px !important
}
.el-cascader .el-input .el-input__inner:focus, .el-cascader .el-input.is-focus .el-input__inner{
height: 33px; //这里高度根据需求自己设定
}
.el-cascader__tags {
display: inline-flex;
margin-right: 10px;
flex-wrap: nowrap;
}
:deep(.div-form-img) {
display: flex;
align-items: center;
justify-content: center;
}
</
style
>
\ No newline at end of file
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