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
84432966
Commit
84432966
authored
Sep 14, 2024
by
hubaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
循环泵页面 问题 删除了所有页面的getSupplys()方法
parent
103c1b63
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
133 additions
and
805 deletions
+133
-805
MoveMonitorAlarmPage.vue
src/views/AIStation/MoveMonitorPage/MoveMonitorAlarmPage.vue
+0
-65
MoveMonitorHistoryPage.vue
...iews/AIStation/MoveMonitorPage/MoveMonitorHistoryPage.vue
+0
-65
MoveMonitorNewDataPage.vue
...iews/AIStation/MoveMonitorPage/MoveMonitorNewDataPage.vue
+0
-65
PipelineTempAlarmPage.vue
...iews/AIStation/PipelineTempPage/PipelineTempAlarmPage.vue
+0
-54
PipelineTempHistoryPage.vue
...ws/AIStation/PipelineTempPage/PipelineTempHistoryPage.vue
+0
-66
PipelineTempNewDataPage.vue
...ws/AIStation/PipelineTempPage/PipelineTempNewDataPage.vue
+0
-67
RecyclePumpAlarmPage.vue
src/views/AIStation/RecyclePumpPage/RecyclePumpAlarmPage.vue
+27
-76
RecyclePumpHistoryPage.vue
...iews/AIStation/RecyclePumpPage/RecyclePumpHistoryPage.vue
+32
-76
RecyclePumpNewDataPage.vue
...iews/AIStation/RecyclePumpPage/RecyclePumpNewDataPage.vue
+35
-76
index.vue
src/views/AIStation/RecyclePumpPage/index.vue
+39
-3
TransTempAlarmPage.vue
src/views/AIStation/TransTempPage/TransTempAlarmPage.vue
+0
-67
TransTempHistoryPage.vue
src/views/AIStation/TransTempPage/TransTempHistoryPage.vue
+0
-66
TransTempNewDataPage.vue
src/views/AIStation/TransTempPage/TransTempNewDataPage.vue
+0
-59
No files found.
src/views/AIStation/MoveMonitorPage/MoveMonitorAlarmPage.vue
View file @
84432966
...
...
@@ -89,12 +89,6 @@ function getDataByParams(){
Page
.
rows
=
res
.
pageSize
})
}
// function getName(name) {
// if (AlarmData && AlarmData.value.length > 0 && name !== undefined && options && options.value.length > 0) {
// const option = options.value.find(item => item.stationId === name);
// return option.stationName
// }
// }
function
getDataNew
(
item
)
{
getMoveListAlarmNewData
(
item
).
then
(
res
=>
{
...
...
@@ -104,65 +98,6 @@ function getDataNew(item) {
})
}
getEnterprise
();
function
getEnterprise
()
{
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
}
}
//获取换热机组列表
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9bca54bc-8f27-4849-8d7d-50c5099e1949"
)
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
)
{
unitIdList
.
push
(
unit
.
unitId
)
}
})
//将unitIdList集合按逗号分隔成字符串
let
unitId
=
unitIdList
.
join
(
','
)
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
});
}
}
getSupplys
()
defineExpose
({
getData
});
...
...
src/views/AIStation/MoveMonitorPage/MoveMonitorHistoryPage.vue
View file @
84432966
...
...
@@ -85,12 +85,6 @@ function getDataByParams(){
historyPage
.
rows
=
res
.
pageSize
})
}
// function getName(name) {
// if (HistoryData && HistoryData.value.length > 0 && name !== undefined && options && options.value.length > 0) {
// const option = options.value.find(item => item.stationId === name);
// return option.stationName
// }
// }
function
getDataNew
(
item
)
{
getMoveListHistoryData
(
item
).
then
(
res
=>
{
...
...
@@ -100,65 +94,6 @@ function getDataNew(item) {
})
}
getEnterprise
();
function
getEnterprise
()
{
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
}
}
//获取换热机组列表
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9bca54bc-8f27-4849-8d7d-50c5099e1949"
)
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
)
{
unitIdList
.
push
(
unit
.
unitId
)
}
})
//将unitIdList集合按逗号分隔成字符串
let
unitId
=
unitIdList
.
join
(
','
)
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
});
}
}
getSupplys
()
defineExpose
({
getData
});
...
...
src/views/AIStation/MoveMonitorPage/MoveMonitorNewDataPage.vue
View file @
84432966
...
...
@@ -88,12 +88,6 @@ function getData(){
Page
.
rows
=
res
.
pageSize
})
}
// function getName(name) {
// if (data && data.value.length > 0 && name !== undefined && options && options.value.length > 0) {
// const option = options.value.find(item => item.stationId === name);
// return option.stationName
// }
// }
function
getDataNew
(
item
)
{
getMoveListNewData
(
item
).
then
(
res
=>
{
...
...
@@ -103,65 +97,6 @@ function getDataNew(item) {
})
}
getEnterprise
();
function
getEnterprise
()
{
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
}
}
//获取换热机组列表
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9bca54bc-8f27-4849-8d7d-50c5099e1949"
)
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
)
{
unitIdList
.
push
(
unit
.
unitId
)
}
})
//将unitIdList集合按逗号分隔成字符串
let
unitId
=
unitIdList
.
join
(
','
)
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
});
}
}
getSupplys
()
defineExpose
({
getData
});
...
...
src/views/AIStation/PipelineTempPage/PipelineTempAlarmPage.vue
View file @
84432966
...
...
@@ -80,60 +80,6 @@ function getDataByParams(){
Page
.
rows
=
res
.
pageSize
})
}
// function getName(name){
// if(AlarmData && AlarmData.value.length > 0 && name !== undefined && options && options.value.length>0) {
// const option = options.value.find(item => item.stationId === name);
// return option.stationName
// }
// }
getEnterprise
();
function
getEnterprise
(){
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
}
}
//获取换热机组列表
function
getSupplys
(){
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
){
if
(
element
.
enterpriseId
===
"9bca54bc-8f27-4849-8d7d-50c5099e1949"
){
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
){
unitIdList
.
push
(
unit
.
unitId
)
}
})
//将unitIdList集合按逗号分隔成字符串
let
unitId
=
unitIdList
.
join
(
','
)
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
});
}
}
getSupplys
()
defineExpose
({
getData
});
...
...
src/views/AIStation/PipelineTempPage/PipelineTempHistoryPage.vue
View file @
84432966
...
...
@@ -91,72 +91,6 @@ function getDataByParams() {
})
}
// function getName(name) {
// if (HistoryData && HistoryData.value.length > 0 && name !== undefined && options && options.value.length > 0) {
// const option = options.value.find(item => item.stationId === name);
// return option.stationName
// }
// }
getEnterprise
();
function
getEnterprise
()
{
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
}
}
//获取换热机组列表
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9bca54bc-8f27-4849-8d7d-50c5099e1949"
)
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
)
{
unitIdList
.
push
(
unit
.
unitId
)
}
})
//将unitIdList集合按逗号分隔成字符串
let
unitId
=
unitIdList
.
join
(
','
)
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
});
}
}
getSupplys
()
defineExpose
({
getData
});
...
...
src/views/AIStation/PipelineTempPage/PipelineTempNewDataPage.vue
View file @
84432966
...
...
@@ -88,14 +88,6 @@ function getDataByParams() {
Page
.
rows
=
res
.
pageSize
})
}
// function getName(name) {
// if (data && data.value.length > 0 && name !== undefined && options && options.value.length > 0) {
// const option = options.value.find(item => item.stationId === name);
// return option.stationName
// }
// }
const
enterpriseId
=
ref
();
const
loading
=
ref
(
true
);
watch
(
...
...
@@ -107,65 +99,6 @@ watch(
}
)
getEnterprise
();
function
getEnterprise
()
{
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
}
}
//获取换热机组列表
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9bca54bc-8f27-4849-8d7d-50c5099e1949"
)
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
)
{
unitIdList
.
push
(
unit
.
unitId
)
}
})
//将unitIdList集合按逗号分隔成字符串
let
unitId
=
unitIdList
.
join
(
','
)
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
});
}
}
getSupplys
()
defineExpose
({
getData
});
...
...
src/views/AIStation/RecyclePumpPage/RecyclePumpAlarmPage.vue
View file @
84432966
...
...
@@ -75,12 +75,6 @@ function getDataByParams(){
Page
.
rows
=
res
.
pageSize
})
}
function
getName
(
name
)
{
if
(
TransTempAlarmData
&&
TransTempAlarmData
.
value
.
length
>
0
&&
name
!==
undefined
&&
options
&&
options
.
value
.
length
>
0
)
{
const
option
=
options
.
value
.
find
(
item
=>
item
.
stationId
===
name
);
return
option
.
stationName
}
}
function
getDataNew
(
item
)
{
getRecycleListAlarmData
(
item
).
then
(
res
=>
{
...
...
@@ -90,65 +84,21 @@ function getDataNew(item) {
})
}
getEnterprise
();
function
getEnterprise
()
{
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
}
}
//获取换热机组列表
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9bca54bc-8f27-4849-8d7d-50c5099e1949"
)
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
)
{
unitIdList
.
push
(
unit
.
unitId
)
}
})
//将unitIdList集合按逗号分隔成字符串
let
unitId
=
unitIdList
.
join
(
','
)
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
});
defineExpose
({
getData
});
// 处理排序事件
const
handleSortChange
=
(
column
,
prop
,
order
)
=>
{
params
.
value
.
sortBy
=
prop
;
params
.
value
.
sortOrder
=
order
===
'ascending'
?
'asc'
:
'desc'
;
if
((
Object
.
keys
(
params
.
value
).
length
===
2
&&
params
.
value
.
constructor
===
Object
)){
getData
()
console
.
log
(
'空对象'
)
}
else
{
getDataByParams
();
console
.
log
(
'非空对象'
)
}
}
getSupplys
()
};
</
script
>
<
template
>
...
...
@@ -162,30 +112,31 @@ getSupplys()
height=
"calc(86vh - 170px)"
:header-cell-class-name=
"tableHeaderClass"
:row-class-name=
"tableBodyClass"
@
sort-change=
"handleSortChange"
>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"station
Id
"
label=
"换热站"
align=
"center"
sortable
>
<el-table-column
prop=
"station
Name
"
label=
"换热站"
align=
"center"
sortable
>
<template
#
default=
"scope"
>
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</span>
<span>
{{
scope
.
row
.
stationName
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"
relateDeviceId
"
label=
"设备名称"
align=
"center"
sortable
/>
<el-table-column
prop=
"
srcName
"
label=
"设备名称"
align=
"center"
sortable
/>
<el-table-column
prop=
"eventTime"
label=
"报警时间"
align=
"center"
width=
"180px"
sortable
/>
<el-table-column
prop=
"
alarm
Type"
align=
"center"
label=
"报警类型"
>
<el-table-column
prop=
"
event
Type"
align=
"center"
label=
"报警类型"
>
<
template
#
default=
"scope"
>
<span
v-if=
"scope.row.
alarmType=== '0'
"
>
最高温度
</span>
<span
v-else-if=
"scope.row.
alarmType=== '1'
"
>
最低温度
</span>
<span
v-else-if=
"scope.row.
alarmType=== '2'
"
>
平均温度
</span>
<span
v-else-if=
"scope.row.
alarmType=== '3'
"
>
温差
</span>
<span
v-else-if=
"scope.row.
alarmType=== '4'
"
>
温度突升
</span>
<span
v-else-if=
"scope.row.
alarmType=== '5'
"
>
温度突降
</span>
<span
v-if=
"scope.row.
eventType=== 0
"
>
最高温度
</span>
<span
v-else-if=
"scope.row.
eventType=== 1
"
>
最低温度
</span>
<span
v-else-if=
"scope.row.
eventType=== 2
"
>
平均温度
</span>
<span
v-else-if=
"scope.row.
eventType=== 3
"
>
温差
</span>
<span
v-else-if=
"scope.row.
eventType=== 4
"
>
温度突升
</span>
<span
v-else-if=
"scope.row.
eventType=== 5
"
>
温度突降
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"handleStatus"
align=
"center"
label=
"处理状态"
>
<
template
#
default=
"scope"
>
<span
v-if=
"scope.row.handleStatus===
'0'
"
style=
"color: red"
>
未处理
</span>
<span
v-else-if=
"scope.row.handleStatus===
'1'
"
>
已处理
</span>
<span
v-if=
"scope.row.handleStatus===
0
"
style=
"color: red"
>
未处理
</span>
<span
v-else-if=
"scope.row.handleStatus===
1
"
>
已处理
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
...
...
src/views/AIStation/RecyclePumpPage/RecyclePumpHistoryPage.vue
View file @
84432966
...
...
@@ -82,11 +82,17 @@ async function fetchAudioStream() {
return
response
.
arrayBuffer
();
// 或 response.blob() 取决于返回的流类型
}
// 初始化时选中第一行
onMounted
(()
=>
{
if
(
RecyclePumpData
.
value
.
length
>
0
)
{
selectRow
(
RecyclePumpData
.
value
[
0
],
0
);
}
});
// 初始化时选中第一行
watch
(
()
=>
RecyclePumpData
.
value
,
()
=>
{
if
(
RecyclePumpData
.
value
.
length
>
0
)
{
selectRow
(
RecyclePumpData
.
value
[
0
],
0
);
}
else
{
console
.
log
(
'没有数据'
)
}
}
)
//子组件接收父组件传递过来的值
const
props
=
defineProps
({
queryParams
:
{
...
...
@@ -129,12 +135,6 @@ function getDataByParams(){
Page
.
rows
=
res
.
pageSize
})
}
function
getName
(
name
)
{
if
(
RecyclePumpData
&&
RecyclePumpData
.
value
.
length
>
0
&&
name
!==
undefined
&&
options
&&
options
.
value
.
length
>
0
)
{
const
option
=
options
.
value
.
find
(
item
=>
item
.
stationId
===
name
);
return
option
.
stationName
}
}
function
getDataNew
(
item
)
{
getRecycleListHistoryData
(
item
).
then
(
res
=>
{
...
...
@@ -143,66 +143,21 @@ function getDataNew(item) {
Page
.
rows
=
res
.
pageSize
})
}
getEnterprise
();
function
getEnterprise
()
{
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
}
}
//获取换热机组列表
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9bca54bc-8f27-4849-8d7d-50c5099e1949"
)
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
)
{
unitIdList
.
push
(
unit
.
unitId
)
}
})
//将unitIdList集合按逗号分隔成字符串
let
unitId
=
unitIdList
.
join
(
','
)
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
});
// 处理排序事件
const
handleSortChange
=
(
column
,
prop
,
order
)
=>
{
params
.
value
.
sortBy
=
prop
;
params
.
value
.
sortOrder
=
order
===
'ascending'
?
'asc'
:
'desc'
;
if
((
Object
.
keys
(
params
.
value
).
length
===
2
&&
params
.
value
.
constructor
===
Object
)){
getData
()
console
.
log
(
'空对象'
)
}
else
{
getDataByParams
();
console
.
log
(
'非空对象'
)
}
}
getSupplys
()
};
defineExpose
({
getData
});
</
script
>
<
template
>
...
...
@@ -217,11 +172,12 @@ getSupplys()
:header-cell-class-name=
"tableHeaderClass"
:row-class-name=
"tableBodyClass"
@
row-click=
"selectRow"
@
sort-change=
"handleSortChange"
>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"station
Id
"
align=
"center"
label=
"换热站"
sortable
>
<el-table-column
prop=
"station
Name
"
align=
"center"
label=
"换热站"
sortable
>
<template
#
default=
"scope"
>
<span>
{{
getName
(
scope
.
row
.
stationId
||
'-'
)
}}
</span>
<span>
{{
scope
.
row
.
stationName
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"deviceName"
align=
"center"
label=
"设备名称"
sortable
/>
...
...
@@ -245,7 +201,7 @@ getSupplys()
<el-col
:span=
"12"
>
<div
class=
"details-item"
>
<span>
换热站:
</span>
<span>
{{ selectedRow.station
Id
}}
</span>
<span>
{{ selectedRow.station
Name
}}
</span>
</div>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -265,13 +221,13 @@ getSupplys()
<el-col
:span=
"12"
>
<div
class=
"details-item"
>
<span>
告警状态:
</span>
<span>
{{ selectedRow.alarmStatus }}
</span>
<span>
{{ selectedRow.alarmStatus
=== '0'? '正常' : '异常'
}}
</span>
</div>
</el-col>
</el-row>
<div
class=
"details-item"
>
<span>
波形图:
</span>
<span>
{{ selectedRow.audioUrl }}
</span
>
<!-- <span>{{ selectedRow.audioUrl }}</span>--
>
</div>
<div
ref=
"waveform"
style=
"width: 800px; height: 150px;"
></div>
...
...
@@ -279,7 +235,7 @@ getSupplys()
<span>
音频:
</span>
<audio
ref=
"audioPlayer"
controls
></audio>
<button
@
click=
"playAudio"
>
获取音频
</button>
<span>
{{ selectedRow.audioUrl }}
</span
>
<!-- <span>{{ selectedRow.audioUrl }}</span>--
>
</div>
</div>
</div>
...
...
src/views/AIStation/RecyclePumpPage/RecyclePumpNewDataPage.vue
View file @
84432966
...
...
@@ -43,11 +43,16 @@ function selectRow(row) {
}
// 初始化时选中第一行
onMounted
(()
=>
{
if
(
RecyclePumpData
.
value
.
length
>
0
)
{
selectRow
(
RecyclePumpData
.
value
[
0
],
0
);
}
});
watch
(
()
=>
RecyclePumpData
.
value
,
()
=>
{
if
(
RecyclePumpData
.
value
.
length
>
0
)
{
selectRow
(
RecyclePumpData
.
value
[
0
],
0
);
}
else
{
console
.
log
(
'没有数据'
)
}
}
)
//子组件接收父组件传递过来的值
const
props
=
defineProps
({
queryParams
:
{
...
...
@@ -66,7 +71,10 @@ watch(
}
)
getData
()
// getData()
if
(
localStorage
.
getItem
(
'AIToken'
)){
getData
()
}
function
getData
(){
const
item
=
reactive
({
page
:
Page
.
page
,
...
...
@@ -90,12 +98,6 @@ function getDataByParams(){
Page
.
rows
=
res
.
pageSize
})
}
function
getName
(
name
)
{
if
(
RecyclePumpData
&&
RecyclePumpData
.
value
.
length
>
0
&&
name
!==
undefined
&&
options
&&
options
.
value
.
length
>
0
)
{
const
option
=
options
.
value
.
find
(
item
=>
item
.
stationId
===
name
);
return
option
.
stationName
}
}
function
getDataNew
(
item
)
{
getRecycleListNewData
(
item
).
then
(
res
=>
{
...
...
@@ -105,65 +107,21 @@ function getDataNew(item) {
})
}
getEnterprise
();
function
getEnterprise
()
{
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
}
}
//获取换热机组列表
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9bca54bc-8f27-4849-8d7d-50c5099e1949"
)
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
)
{
unitIdList
.
push
(
unit
.
unitId
)
}
})
//将unitIdList集合按逗号分隔成字符串
let
unitId
=
unitIdList
.
join
(
','
)
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
});
// 处理排序事件
const
handleSortChange
=
(
column
,
prop
,
order
)
=>
{
params
.
value
.
sortBy
=
prop
;
params
.
value
.
sortOrder
=
order
===
'ascending'
?
'asc'
:
'desc'
;
if
((
Object
.
keys
(
params
.
value
).
length
===
2
&&
params
.
value
.
constructor
===
Object
)){
getData
()
console
.
log
(
'空对象'
)
}
else
{
getDataByParams
();
console
.
log
(
'非空对象'
)
}
}
getSupplys
()
};
defineExpose
({
getData
});
</
script
>
<
template
>
...
...
@@ -178,11 +136,12 @@ getSupplys()
:header-cell-class-name=
"tableHeaderClass"
:row-class-name=
"tableBodyClass"
@
row-click=
"selectRow"
@
sort-change=
"handleSortChange"
>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"station
Id
"
align=
"center"
label=
"换热站"
sortable
>
<el-table-column
prop=
"station
Name
"
align=
"center"
label=
"换热站"
sortable
>
<template
#
default=
"scope"
>
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</span>
<span>
{{
scope
.
row
.
stationName
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"deviceName"
align=
"center"
label=
"设备名称"
sortable
/>
...
...
@@ -206,7 +165,7 @@ getSupplys()
<el-col
:span=
"12"
>
<div
class=
"details-item"
>
<span>
换热站:
</span>
<span>
{{ selectedRow.station
Id
}}
</span>
<span>
{{ selectedRow.station
Name
}}
</span>
</div>
</el-col>
<el-col
:span=
"12"
>
...
...
@@ -226,17 +185,17 @@ getSupplys()
<el-col
:span=
"12"
>
<div
class=
"details-item"
>
<span>
告警状态:
</span>
<span>
{{ selectedRow.alarmStatus }}
</span>
<span>
{{ selectedRow.alarmStatus
=== '0'? '正常' : '异常'
}}
</span>
</div>
</el-col>
</el-row>
<div
class=
"details-item"
>
<span>
波形图:
</span>
<span>
{{ selectedRow.audioUrl }}
</span
>
<!-- <span>{{ selectedRow.audioUrl }}</span>--
>
</div>
<div
class=
"details-item"
>
<span>
音频:
</span>
<span>
{{ selectedRow.audioUrl }}
</span
>
<!-- <span>{{ selectedRow.audioUrl }}</span>--
>
</div>
</div>
</div>
...
...
src/views/AIStation/RecyclePumpPage/index.vue
View file @
84432966
<
script
setup
>
import
{
getCurrentInstance
,
onMounted
,
reactive
,
ref
}
from
'vue'
import
{
getCurrentInstance
,
onMounted
,
reactive
,
ref
,
watch
}
from
'vue'
import
RecyclePumpNewDataPage
from
'./RecyclePumpNewDataPage.vue'
// 导入组件
import
RecyclePumpHistoryPage
from
'./RecyclePumpHistoryPage.vue'
// 导入组件
import
RecyclePumpAlarmPage
from
'./RecyclePumpAlarmPage.vue'
// 导入组件
...
...
@@ -11,6 +11,8 @@ import {
exportRecyclePumpHistoryData
,
exportRecyclePumpAlarmData
,
}
from
"../../../api/AIStation/RecyclePump.js"
;
import
{
handleGetAIToken
}
from
"../AItoken.js"
;
import
{
useRoute
}
from
"vue-router"
;
const
{
proxy
}
=
getCurrentInstance
();
// 列表
...
...
@@ -106,6 +108,13 @@ const search = () => {
beginTime
:
queryParams
.
beginTime
,
endTime
:
queryParams
.
endTime
,
}
if
(
item
.
alarmStatus
===
undefined
||
item
.
alarmType
===
undefined
||
item
.
beginTime
==
null
||
item
.
endTime
==
null
||
item
.
stationId
===
undefined
){
item
.
alarmStatus
=
''
item
.
endTime
=
''
item
.
stationId
=
''
item
.
beginTime
=
''
item
.
alarmType
=
''
}
if
(
selectedBtn
.
value
===
1
)
{
childParams
.
value
=
item
}
else
if
(
selectedBtn
.
value
===
2
)
{
...
...
@@ -115,7 +124,6 @@ const search = () => {
}
console
.
log
(
'查询:'
,
item
);
};
getNumber
()
function
getNumber
()
{
getRecycleAlarmNumber
().
then
(
res
=>
{
...
...
@@ -185,7 +193,35 @@ const resetSearch = () => {
queryParams
.
alarmType
=
''
queryParams
.
stationId
=
''
searchData
.
value
=
[]
getData
()
};
const
childComponentRef
=
ref
(
null
);
const
getData
=
()
=>
{
if
(
childComponentRef
.
value
&&
childComponentRef
.
value
.
getData
)
{
console
.
log
(
'能不能成功啊'
)
childComponentRef
.
value
.
getData
();
// 调用子组件的 getData 方法
}
};
const
route
=
useRoute
()
watch
(
()
=>
route
.
path
,
// 只监听路径变化
()
=>
{
if
(
route
.
path
===
'/AIStation/RecyclePump'
)
{
// 路由变化,执行相应操作
handleGetAIToken
();
// 轮询检测 localStorage 是否更新
const
checkAIToken
=
setInterval
(()
=>
{
if
(
localStorage
.
getItem
(
'AIToken'
))
{
clearInterval
(
checkAIToken
);
// 停止轮询
getNumber
();
getData
();
}
},
100
);
// 每100ms检查一次
console
.
log
(
'route.path'
,
route
.
path
)
}
},
{
immediate
:
true
}
// 只在路径变化时触发
)
const
options
=
ref
([]);
const
enterpriseId
=
ref
();
const
props
=
{
multiple
:
true
,
emitPath
:
false
}
...
...
@@ -312,7 +348,7 @@ getSupplys();
>
</el-tab-pane>
</el-tabs>
<component
:is=
"selectedComponent"
:queryParams=
'childParams'
></component>
<component
:is=
"selectedComponent"
ref=
"childComponentRef"
:queryParams=
'childParams'
></component>
</div>
</div>
...
...
src/views/AIStation/TransTempPage/TransTempAlarmPage.vue
View file @
84432966
...
...
@@ -82,13 +82,6 @@ function getDataByParams() {
})
}
// function getName(name) {
// if (TransTempAlarmData && TransTempAlarmData.value.length > 0 && name !== undefined && options && options.value.length > 0) {
// const option = options.value.find(item => item.stationId === name);
// return option.stationName
// }
// }
function
getDataNew
(
item
)
{
getTransListAlarmData
(
item
).
then
(
res
=>
{
TransTempAlarmData
.
value
=
res
.
rows
...
...
@@ -96,66 +89,6 @@ function getDataNew(item) {
Page
.
rows
=
res
.
pageSize
})
}
getEnterprise
();
function
getEnterprise
()
{
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
}
}
//获取换热机组列表
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9bca54bc-8f27-4849-8d7d-50c5099e1949"
)
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
)
{
unitIdList
.
push
(
unit
.
unitId
)
}
})
//将unitIdList集合按逗号分隔成字符串
let
unitId
=
unitIdList
.
join
(
','
)
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
});
}
}
getSupplys
()
defineExpose
({
getData
});
...
...
src/views/AIStation/TransTempPage/TransTempHistoryPage.vue
View file @
84432966
...
...
@@ -85,13 +85,6 @@ function getDataByParams() {
})
}
// function getName(name) {
// if (TransTempHistoryData && TransTempHistoryData.value.length > 0 && name !== undefined && options && options.value.length > 0) {
// const option = options.value.find(item => item.stationId === name);
// return option.stationName
// }
// }
function
getDataNew
(
item
)
{
getTransListHistoryData
(
item
).
then
(
res
=>
{
TransTempHistoryData
.
value
=
res
.
rows
...
...
@@ -100,65 +93,6 @@ function getDataNew(item) {
})
}
getEnterprise
();
function
getEnterprise
()
{
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
}
}
//获取换热机组列表
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9bca54bc-8f27-4849-8d7d-50c5099e1949"
)
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
)
{
unitIdList
.
push
(
unit
.
unitId
)
}
})
//将unitIdList集合按逗号分隔成字符串
let
unitId
=
unitIdList
.
join
(
','
)
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
});
}
}
getSupplys
()
defineExpose
({
getData
});
...
...
src/views/AIStation/TransTempPage/TransTempNewDataPage.vue
View file @
84432966
...
...
@@ -99,65 +99,6 @@ function getDataNew(item) {
})
}
getEnterprise
();
function
getEnterprise
()
{
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
enterpriseId
.
value
=
result
[
0
].
enterpriseId
;
}
}
//获取换热机组列表
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9bca54bc-8f27-4849-8d7d-50c5099e1949"
)
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
)
{
unitIdList
.
push
(
unit
.
unitId
)
}
})
//将unitIdList集合按逗号分隔成字符串
let
unitId
=
unitIdList
.
join
(
','
)
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
});
}
}
getSupplys
()
defineExpose
({
getData
});
...
...
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