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
9877c5c9
Commit
9877c5c9
authored
Sep 12, 2024
by
hubaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
换热站,管道温度,灭火器页面优化
parent
8477088f
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
714 additions
and
650 deletions
+714
-650
PipelineTemp.js
src/api/AIStation/PipelineTemp.js
+2
-2
TransTemp.js
src/api/AIStation/TransTemp.js
+2
-2
ExtinguisherAlarmPage.vue
...iews/AIStation/ExtinguisherPage/ExtinguisherAlarmPage.vue
+17
-31
ExtinguisherHistoryPage.vue
...ws/AIStation/ExtinguisherPage/ExtinguisherHistoryPage.vue
+20
-38
ExtinguisherNewDataPage.vue
...ws/AIStation/ExtinguisherPage/ExtinguisherNewDataPage.vue
+20
-43
index.vue
src/views/AIStation/ExtinguisherPage/index.vue
+38
-109
PipelineTempAlarmPage.vue
...iews/AIStation/PipelineTempPage/PipelineTempAlarmPage.vue
+71
-34
PipelineTempHistoryPage.vue
...ws/AIStation/PipelineTempPage/PipelineTempHistoryPage.vue
+89
-38
PipelineTempNewDataPage.vue
...ws/AIStation/PipelineTempPage/PipelineTempNewDataPage.vue
+96
-38
index.vue
src/views/AIStation/PipelineTempPage/index.vue
+53
-115
TransTempAlarmPage.vue
src/views/AIStation/TransTempPage/TransTempAlarmPage.vue
+86
-31
TransTempHistoryPage.vue
src/views/AIStation/TransTempPage/TransTempHistoryPage.vue
+88
-34
TransTempNewDataPage.vue
src/views/AIStation/TransTempPage/TransTempNewDataPage.vue
+84
-33
index.vue
src/views/AIStation/TransTempPage/index.vue
+48
-102
No files found.
src/api/AIStation/PipelineTemp.js
View file @
9877c5c9
...
...
@@ -5,11 +5,11 @@ export const getPipListNewData = (item) =>{
}
export
const
getPipListHistoryData
=
(
item
)
=>
{
return
httpTwo
.
get
(
`/buspipelinetemperature/historyList?page=
${
item
.
page
}
&rows=
${
item
.
size
}
&stationId=
${
item
.
stationId
}
&
alarmStatus=
${
item
.
alarmStatus
}
`
)
return
httpTwo
.
get
(
`/buspipelinetemperature/historyList?page=
${
item
.
page
}
&rows=
${
item
.
size
}
&stationId=
${
item
.
stationId
}
&
beginTime=
${
item
.
beginTime
}
&endTime=
${
item
.
endTime
}
`
)
}
export
const
getPipListAlarmData
=
(
item
)
=>
{
return
httpTwo
.
get
(
`/buspipelinetemperaturealarm/list?page=
${
item
.
page
}
&rows=
${
item
.
size
}
&
stationId=
${
item
.
stationId
}
&alarmStatus=
${
item
.
alarmStatus
}
`
)
return
httpTwo
.
get
(
`/buspipelinetemperaturealarm/list?page=
${
item
.
page
}
&rows=
${
item
.
size
}
&
thermalAlarmType=
${
item
.
alarmType
}
&stationId=
${
item
.
stationId
}
&beginTime=
${
item
.
beginTime
}
&endTime=
${
item
.
endTime
}
`
)
}
export
const
getPipAlarmNumber
=
()
=>
{
...
...
src/api/AIStation/TransTemp.js
View file @
9877c5c9
...
...
@@ -5,11 +5,11 @@ export const getTransListNewData = (item) =>{
}
export
const
getTransListHistoryData
=
(
item
)
=>
{
return
httpTwo
.
get
(
`/bustransfertemperature/historyList?page=
${
item
.
page
}
&rows=
${
item
.
size
}
&stationId=
${
item
.
stationId
}
&
alarmStatus=
${
item
.
alarmStatus
}
`
)
return
httpTwo
.
get
(
`/bustransfertemperature/historyList?page=
${
item
.
page
}
&rows=
${
item
.
size
}
&stationId=
${
item
.
stationId
}
&
beginTime=
${
item
.
beginTime
}
&endTime=
${
item
.
endTime
}
`
)
}
export
const
getTransListAlarmData
=
(
item
)
=>
{
return
httpTwo
.
get
(
`/bustransfertemperaturealarm/list?page=
${
item
.
page
}
&rows=
${
item
.
size
}
&stationId=
${
item
.
stationId
}
&alarm
Status=
${
item
.
alarmStatus
}
`
)
return
httpTwo
.
get
(
`/bustransfertemperaturealarm/list?page=
${
item
.
page
}
&rows=
${
item
.
size
}
&stationId=
${
item
.
stationId
}
&alarm
Type=
${
item
.
alarmType
}
&beginTime=
${
item
.
beginTime
}
&endTime=
${
item
.
endTime
}
`
)
}
export
const
getTransAlarmNumber
=
()
=>
{
...
...
src/views/AIStation/ExtinguisherPage/ExtinguisherAlarmPage.vue
View file @
9877c5c9
<
script
setup
>
import
{
ref
,
defineProps
,
defineEmits
,
computed
,
isRef
,
onMounted
,
watchEffect
,
reactive
,
watch
}
from
"vue"
;
import
{
getAlarmListData
,
getListHistoryData
}
from
"../../../api/AIStation/Extinguisher.js"
;
import
{
ref
,
defineProps
,
reactive
,
watch
}
from
"vue"
;
import
{
getAlarmListData
}
from
"../../../api/AIStation/Extinguisher.js"
;
let
AlarmData
=
ref
([])
...
...
@@ -31,21 +31,14 @@ const handleCurrentChange = (val) => {
};
const
props
=
defineProps
({
searchData
:
{
type
:
Object
,
required
:
true
},
option
:
{
type
:
Array
,
required
:
true
},
queryParams
:
{
type
:
Object
,
required
:
true
}
});
getData
()
function
getData
(){
function
getData
()
{
const
item
=
reactive
({
page
:
Page
.
page
,
size
:
Page
.
rows
,
...
...
@@ -62,38 +55,31 @@ function getData(){
Page
.
rows
=
res
.
pageSize
})
}
function
getDataByParams
(){
function
getDataByParams
()
{
getAlarmListData
(
params
.
value
).
then
(
res
=>
{
AlarmData
.
value
=
res
.
rows
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
}
function
getName
(
name
){
const
option
=
options
.
value
.
find
(
item
=>
item
.
stationId
===
name
);
return
option
.
stationName
}
watch
(
()
=>
props
.
searchData
,
(
newData
)
=>
{
AlarmData
=
props
.
searchData
.
rows
;
}
);
watch
(
()
=>
props
.
queryParams
,
(
newData
)
=>
{
params
.
value
=
newData
console
.
log
(
'值eeeee'
,
params
.
value
)
getDataNew
(
params
.
value
)
console
.
log
(
'值eeeee'
,
params
.
value
)
}
)
watch
(
()
=>
props
.
option
,
(
newVal
)
=>
{
options
.
value
=
props
.
option
console
.
log
(
'值eeeerrrrr'
,
options
.
value
)
},
{
deep
:
true
}
)
function
getDataNew
(
item
)
{
getAlarmListData
(
item
).
then
(
res
=>
{
AlarmData
.
value
=
res
.
rows
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
}
</
script
>
<
template
>
...
...
src/views/AIStation/ExtinguisherPage/ExtinguisherHistoryPage.vue
View file @
9877c5c9
<
script
setup
>
import
{
reactive
,
ref
,
watch
}
from
"vue"
;
import
analysisImage
from
'@/assets/imgs/dengluanniu_wx.png'
import
{
getListHistoryData
,
getListNewData
}
from
"../../../api/AIStation/Extinguisher.js"
;
import
{
getListHistoryData
}
from
"../../../api/AIStation/Extinguisher.js"
;
let
HistoryData
=
ref
([])
...
...
@@ -10,14 +10,6 @@ const historyPage = reactive({total: 0, rows: 20, page: 1});
//子组件接收父组件传递过来的值
const
props
=
defineProps
({
searchData
:
{
type
:
Object
,
required
:
true
},
option
:
{
type
:
Array
,
required
:
true
},
queryParams
:
{
type
:
Object
,
required
:
true
...
...
@@ -56,60 +48,50 @@ const handleCurrentChange = (val) => {
getDataByParams
()
};
getData
()
function
getData
()
{
console
.
log
(
222222222
)
const
item
=
reactive
({
page
:
historyPage
.
page
,
size
:
historyPage
.
rows
,
stationId
:
''
,
alarmStatus
:
''
,
alarmType
:
''
,
alarmStatus
:
''
,
alarmType
:
''
,
beginTime
:
''
,
endTime
:
''
})
getListHistoryData
(
item
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
console
.
log
(
'res'
,
res
)
HistoryData
.
value
=
res
.
rows
historyPage
.
total
=
res
.
total
historyPage
.
rows
=
res
.
pageSize
console
.
log
(
'HistoryData.value'
,
HistoryData
.
value
)
console
.
log
(
'HistoryData.value'
,
HistoryData
.
value
)
})
}
function
getDataByParams
(){
function
getDataByParams
()
{
getListHistoryData
(
params
.
value
).
then
(
res
=>
{
data
.
value
=
res
.
rows
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
}
function
getName
(
name
){
const
option
=
options
.
value
.
find
(
item
=>
item
.
stationId
===
name
);
return
option
.
stationName
}
watch
(
()
=>
props
.
searchData
,
(
newData
)
=>
{
console
.
log
(
'值'
,
props
.
searchData
)
HistoryData
=
props
.
searchData
.
rows
;
historyPage
.
total
=
props
.
searchData
.
total
}
);
watch
(
()
=>
props
.
queryParams
,
(
newData
)
=>
{
params
.
value
=
newData
console
.
log
(
'值eeeee'
,
params
.
value
)
console
.
log
(
'值
ooo'
,
props
.
queryParams
)
getDataNew
(
params
.
value
)
console
.
log
(
'值
eeeee'
,
params
.
value
)
}
)
watch
(
()
=>
props
.
option
,
(
newVal
)
=>
{
options
.
value
=
props
.
option
console
.
log
(
'值ooo'
,
options
.
value
)
},
{
deep
:
true
}
)
function
getDataNew
(
item
)
{
getListHistoryData
(
item
).
then
(
res
=>
{
HistoryData
.
value
=
res
.
rows
historyPage
.
total
=
res
.
total
historyPage
.
rows
=
res
.
pageSize
})
}
</
script
>
<
template
>
...
...
@@ -126,7 +108,7 @@ watch(
>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"stationName"
align=
"center"
label=
"换热站"
sortable
/>
<el-table-column
prop=
"
relateDeviceId
"
align=
"center"
label=
"设备"
sortable
/>
<el-table-column
prop=
"
srcName
"
align=
"center"
label=
"设备"
sortable
/>
<el-table-column
prop=
"acquisitionTime"
align=
"center"
width=
"180px"
label=
"采集时间"
sortable
/>
<el-table-column
prop=
"picUrl"
align=
"center"
label=
"图片"
>
<template
#
default=
"scope"
>
...
...
src/views/AIStation/ExtinguisherPage/ExtinguisherNewDataPage.vue
View file @
9877c5c9
...
...
@@ -3,19 +3,10 @@ import {onMounted, reactive, ref, toRefs, watch} from "vue";
import
analysisImage
from
'@/assets/imgs/dengluanniu_wx.png'
;
import
{
getListNewData
}
from
"../../../api/AIStation/Extinguisher.js"
;
// let data = ref([])
const
data
=
ref
([])
//子组件接收父组件传递过来的值
const
props
=
defineProps
({
searchData
:
{
type
:
Object
,
required
:
true
},
option
:
{
type
:
Array
,
required
:
true
},
queryParams
:
{
type
:
Object
,
required
:
true
...
...
@@ -49,27 +40,22 @@ const getImageSrc = (row) => {
};
const
params
=
ref
({})
const
options
=
ref
([])
function
getName
(
name
){
const
option
=
options
.
value
.
find
(
item
=>
item
.
stationId
===
name
);
return
option
.
stationName
}
const
loading
=
ref
(
true
);
function
detail
(
row
)
{
singleDetails
.
value
=
row
detailOpen
.
value
=
true
}
onMounted
(
()
=>
{
getData
()
}
)
function
getData
(){
getData
()
function
getData
()
{
const
item
=
reactive
({
page
:
Page
.
page
,
size
:
Page
.
rows
,
stationId
:
''
,
alarmStatus
:
''
,
alarmType
:
''
,
alarmStatus
:
''
,
alarmType
:
''
,
beginTime
:
''
,
endTime
:
''
})
...
...
@@ -79,7 +65,8 @@ function getData(){
Page
.
rows
=
res
.
pageSize
})
}
function
getDataByParams
(){
function
getDataByParams
()
{
getListNewData
(
params
.
value
).
then
(
res
=>
{
data
.
value
=
res
.
rows
Page
.
total
=
res
.
total
...
...
@@ -87,31 +74,21 @@ function getDataByParams(){
})
}
watch
(
()
=>
props
.
searchData
,
(
newData
)
=>
{
console
.
log
(
'值'
,
props
.
searchData
)
data
.
value
=
props
.
searchData
.
rows
;
console
.
log
(
'值w'
,
data
.
value
)
Page
.
total
=
props
.
searchData
.
total
}
);
watch
(
()
=>
props
.
queryParams
,
(
newData
)
=>
{
params
.
value
=
newData
console
.
log
(
'值eeeee'
,
params
.
value
)
console
.
log
(
'值ooo'
,
props
.
queryParams
)
getDataNew
(
params
.
value
)
}
)
watch
(
()
=>
props
.
option
,
(
newVal
)
=>
{
options
.
value
=
props
.
option
console
.
log
(
'值ooo'
,
options
.
value
)
},
{
deep
:
true
}
)
function
getDataNew
(
item
)
{
getListNewData
(
item
).
then
(
res
=>
{
data
.
value
=
res
.
rows
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
}
</
script
>
<
template
>
...
...
@@ -128,7 +105,7 @@ watch(
>
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"stationName"
align=
"center"
label=
"换热站"
sortable
/>
<el-table-column
prop=
"
relateDeviceId
"
align=
"center"
label=
"设备"
sortable
/>
<el-table-column
prop=
"
srcName
"
align=
"center"
label=
"设备"
sortable
/>
<el-table-column
prop=
"acquisitionTime"
align=
"center"
width=
"180px"
label=
"采集时间"
sortable
/>
<el-table-column
prop=
"picUrl"
align=
"center"
label=
"图片"
>
<template
#
default=
"scope"
>
...
...
src/views/AIStation/ExtinguisherPage/index.vue
View file @
9877c5c9
...
...
@@ -7,16 +7,12 @@ import zhCn from "element-plus/dist/locale/zh-cn.mjs"
import
store
from
"../../../store/index.js"
;
import
{
handleGetAIToken
}
from
'../AItoken'
import
{
getAlarmListData
,
getAlarmNumData
,
getListHistoryData
,
getListNewData
,
exportNewExtinguisherData
,
exportHistoryExtinguisherData
,
exportExtinguisherAlarmData
}
from
"../../../api/AIStation/Extinguisher.js"
;
import
{
getMoveAlarmNumber
}
from
"../../../api/AIStation/MoveMonitor.js"
;
import
{
provide
}
from
'vue'
;
import
{
provide
}
from
'vue'
;
provide
(
'getAIToken'
,
handleGetAIToken
);
const
options
=
ref
([]);
...
...
@@ -43,7 +39,6 @@ const selectedComponent = ref(ExtinguisherNewDataPage);
// 当前选中的标签页名称
const
activeName
=
ref
(
ExtinguisherNewDataPage
);
const
optionsList
=
ref
([])
// 报警数量
const
alarmNum
=
ref
(
0
);
// 查询结果数据
...
...
@@ -56,7 +51,6 @@ const handleTabClick = (tab, event) => {
if
(
selectedItem
)
{
selectedComponent
.
value
=
selectedItem
.
component
;
selectedBtn
.
value
=
selectedItem
.
id
;
getSupplys
()
resetSearch
();
}
};
...
...
@@ -73,7 +67,7 @@ const alarmStatusList = [
}
]
const
Page
=
reactive
({
total
:
0
,
rows
:
20
,
page
:
1
});
const
childParams
=
ref
({})
const
queryParams
=
reactive
({
page
:
Page
.
page
,
size
:
Page
.
rows
,
...
...
@@ -95,30 +89,24 @@ const search = () => {
beginTime
:
queryParams
.
beginTime
,
endTime
:
queryParams
.
endTime
,
})
if
(
selectedBtn
.
value
===
1
)
{
getListNewData
(
item
).
then
(
res
=>
{
searchData
.
value
=
res
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
}
else
if
(
selectedBtn
.
value
===
2
){
getListHistoryData
(
item
).
then
(
res
=>
{
searchData
.
value
=
res
Page
.
total
=
res
.
total
})
}
else
if
(
selectedBtn
.
value
===
3
){
getAlarmListData
(
item
).
then
(
res
=>
{
searchData
.
value
=
res
Page
.
total
=
res
.
total
})
if
(
selectedBtn
.
value
===
1
)
{
childParams
.
value
=
item
}
else
if
(
selectedBtn
.
value
===
2
)
{
childParams
.
value
=
item
}
else
if
(
selectedBtn
.
value
===
3
)
{
childParams
.
value
=
item
}
console
.
log
(
'查询:'
,
item
);
}
getNumber
()
function
getNumber
()
{
getAlarmNumData
().
then
(
res
=>
{
console
.
log
(
'123123123123-----------'
,
res
.
data
)
alarmNum
.
value
=
res
.
data
})
}
console
.
log
(
'查询:'
,
item
);
console
.
log
(
'传值:'
,
searchData
.
value
);
};
handleGetAIToken
();
/** 导出按钮操作 */
const
handleExport
=
()
=>
{
...
...
@@ -129,9 +117,7 @@ const handleExport = () => {
beginTime
:
queryParams
.
beginTime
,
endTime
:
queryParams
.
endTime
,
})
console
.
log
(
'selectedBtn.value:'
,
selectedBtn
.
value
)
if
(
selectedBtn
.
value
===
1
){
console
.
log
(
'11111'
)
if
(
selectedBtn
.
value
===
1
)
{
exportNewExtinguisherData
(
item
).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
])
const
downloadElement
=
document
.
createElement
(
'a'
)
...
...
@@ -143,8 +129,7 @@ const handleExport = () => {
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
})
}
else
if
(
selectedBtn
.
value
===
2
){
console
.
log
(
'22222'
)
}
else
if
(
selectedBtn
.
value
===
2
)
{
exportHistoryExtinguisherData
(
item
).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
])
const
downloadElement
=
document
.
createElement
(
'a'
)
...
...
@@ -156,8 +141,7 @@ const handleExport = () => {
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
})
}
else
if
(
selectedBtn
.
value
===
3
){
console
.
log
(
'33333'
)
}
else
if
(
selectedBtn
.
value
===
3
)
{
exportExtinguisherAlarmData
(
item
).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
])
const
downloadElement
=
document
.
createElement
(
'a'
)
...
...
@@ -181,34 +165,8 @@ const resetSearch = () => {
queryParams
.
alarmType
=
''
queryParams
.
stationId
=
''
searchData
.
value
=
{}
const
item
=
reactive
({
page
:
Page
.
page
,
size
:
Page
.
rows
,
stationId
:
''
,
alarmStatus
:
''
,
alarmType
:
''
,
beginTime
:
''
,
endTime
:
''
})
// if (selectedBtn.value === 1) {
// getListNewData(item).then(res => {
// searchData.value = res
// })
// } else if (selectedBtn.value === 2) {
// getListHistoryData(item).then(res => {
// searchData.value = res
// })
// } else if (selectedBtn.value === 3) {
// getAlarmListData(item).then(res => {
// searchData.value = res
// })
// getAlarmNumData().then(res => {
// alarmNum.value = res.data
// })
// }
}
const
loading
=
ref
(
true
);
getEnterprise
();
...
...
@@ -219,82 +177,53 @@ function getEnterprise() {
}
}
//获取换热机组列表
// function getSupplys(){
// loading.value = true;
// // tableData.length = 0;
// options.length = 0;
// stationId.length = 0;
// const result = store.getters.getEnterprise();
// console.log('result:',result)
// if (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});
// })
// }
// }
// });
// }
// // stationId.value.push(options[0].children[0].children[0].value);
// }
getSupplys
()
//获取换热机组列表
function
getSupplys
(){
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
result
.
forEach
(
element
=>
{
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9BCA54BC-8F27-4849-8D7D-50C5099E1949"
.
toLowerCase
())
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9BCA54BC-8F27-4849-8D7D-50C5099E1949"
.
toLowerCase
())
{
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
)
{
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
})
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
optionsList
.
value
=
options
.
value
console
.
log
(
'optionsList'
,
optionsList
.
value
)
});
}
}
...
...
@@ -359,7 +288,7 @@ function getSupplys(){
>
</el-tab-pane>
</el-tabs>
<component
:is=
"selectedComponent"
:
option=
"optionsList"
:queryParams =
'queryParams'
:search-data=
"searchData"
></component>
<component
:is=
"selectedComponent"
:
queryParams=
'childParams'
></component>
</div>
</div>
...
...
src/views/AIStation/PipelineTempPage/PipelineTempAlarmPage.vue
View file @
9877c5c9
<
script
setup
>
import
{
ref
,
defineProps
,
defineEmits
,
computed
,
isRef
,
onMounted
,
watchEffect
,
reactive
,
watch
}
from
"vue"
;
import
{
getMoveListAlarmNewData
}
from
"../../../api/AIStation/MoveMonitor.js"
;
import
{
ref
,
defineProps
,
reactive
,
watch
}
from
"vue"
;
import
{
getPipListAlarmData
}
from
"../../../api/AIStation/PipelineTemp.js"
;
import
{
getAlarmListData
}
from
"../../../api/AIStation/Extinguisher
.js"
;
import
store
from
"../../../store/index
.js"
;
let
AlarmData
=
ref
([])
const
params
=
ref
({})
const
options
=
ref
([])
const
enterpriseId
=
ref
();
const
loading
=
ref
(
true
);
const
tableHeaderClass
=
data
=>
{
// 表头样式
return
'table-header-class'
}
...
...
@@ -33,41 +34,27 @@ const handleCurrentChange = (val) => {
};
//子组件接收父组件传递过来的值
const
props
=
defineProps
({
searchData
:
{
type
:
Object
,
required
:
true
},
option
:
{
type
:
Array
,
required
:
true
},
queryParams
:
{
type
:
Object
,
required
:
true
}
});
watch
(
()
=>
props
.
searchData
,
(
newData
)
=>
{
AlarmData
=
props
.
searchData
.
rows
;
Page
.
total
=
props
.
searchData
.
total
;
}
);
watch
(
()
=>
props
.
queryParams
,
(
newData
)
=>
{
params
.
value
=
newData
getDataNew
(
params
.
value
)
console
.
log
(
'值eeeee'
,
params
.
value
)
}
)
watch
(
()
=>
props
.
option
,
(
newVal
)
=>
{
options
.
value
=
props
.
option
console
.
log
(
'值eeeerrrrr'
,
options
.
value
)
},
{
deep
:
true
}
)
function
getDataNew
(
item
){
getPipListAlarmData
(
item
).
then
(
res
=>
{
AlarmData
.
value
=
res
.
rows
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
}
getData
()
function
getData
(){
const
item
=
reactive
({
...
...
@@ -94,9 +81,59 @@ function getDataByParams(){
})
}
function
getName
(
name
){
const
option
=
options
.
value
.
find
(
item
=>
item
.
stationId
===
name
);
return
option
.
stationName
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
()
</
script
>
<
template
>
...
...
@@ -121,12 +158,12 @@ function getName(name){
<el-table-column
prop=
"eventTime"
align=
"center"
label=
"报警时间"
sortable
/>
<el-table-column
prop=
"thermalAlarmType"
align=
"center"
label=
"报警类型"
>
<
template
#
default=
"scope"
>
<span
v-if=
"scope.row.
a
larmType=== '0'"
>
定温报警
</span>
<span
v-else-if=
"scope.row.
a
larmType=== '1'"
>
温升报警
</span>
<span
v-else-if=
"scope.row.
a
larmType=== '2'"
>
温差报警
</span>
<span
v-else-if=
"scope.row.
a
larmType=== '3'"
>
温降报警
</span>
<span
v-else-if=
"scope.row.
a
larmType=== '4'"
>
断纤报警
</span>
<span
v-else-if=
"scope.row.
a
larmType=== '5'"
>
热成像温度报警
</span>
<span
v-if=
"scope.row.
thermalA
larmType=== '0'"
>
定温报警
</span>
<span
v-else-if=
"scope.row.
thermalA
larmType=== '1'"
>
温升报警
</span>
<span
v-else-if=
"scope.row.
thermalA
larmType=== '2'"
>
温差报警
</span>
<span
v-else-if=
"scope.row.
thermalA
larmType=== '3'"
>
温降报警
</span>
<span
v-else-if=
"scope.row.
thermalA
larmType=== '4'"
>
断纤报警
</span>
<span
v-else-if=
"scope.row.
thermalA
larmType=== '5'"
>
热成像温度报警
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
...
...
src/views/AIStation/PipelineTempPage/PipelineTempHistoryPage.vue
View file @
9877c5c9
<
script
setup
>
import
{
reactive
,
ref
,
watch
}
from
"vue"
;
import
analysisImage
from
'@/assets/imgs/dengluanniu_wx.png'
import
{
getMoveListHistoryData
}
from
"../../../api/AIStation/MoveMonitor.js"
;
import
{
getPipListAlarmData
,
getPipListHistoryData
}
from
"../../../api/AIStation/PipelineTemp.js"
;
import
{
getPipListHistoryData
}
from
"../../../api/AIStation/PipelineTemp.js"
;
import
store
from
"../../../store/index.js"
;
let
HistoryData
=
ref
([])
const
params
=
ref
({})
const
options
=
ref
([])
const
enterpriseId
=
ref
();
const
loading
=
ref
(
true
);
const
historyPage
=
reactive
({
total
:
0
,
rows
:
20
,
page
:
1
});
// 供热站
...
...
@@ -38,74 +39,124 @@ const handleCurrentChange = (val) => {
};
//子组件接收父组件传递过来的值
const
props
=
defineProps
({
searchData
:
{
type
:
Object
,
required
:
true
},
option
:
{
type
:
Array
,
required
:
true
},
queryParams
:
{
type
:
Object
,
required
:
true
}
});
watch
(
()
=>
props
.
searchData
,
(
newData
)
=>
{
console
.
log
(
'值'
,
props
.
searchData
)
HistoryData
=
props
.
searchData
.
rows
;
historyPage
.
total
=
props
.
searchData
.
total
}
);
watch
(
()
=>
props
.
queryParams
,
(
newData
)
=>
{
params
.
value
=
newData
console
.
log
(
'值eeeee'
,
params
.
value
)
console
.
log
(
'
值ooo'
,
props
.
queryParams
)
getDataNew
(
params
.
value
)
console
.
log
(
'
data值eeeee---------'
,
data
.
value
)
}
)
watch
(
()
=>
props
.
option
,
(
newVal
)
=>
{
options
.
value
=
props
.
option
console
.
log
(
'值ooo'
,
options
.
value
)
},
{
deep
:
true
}
)
function
getDataNew
(
item
)
{
getPipListHistoryData
(
item
).
then
(
res
=>
{
HistoryData
.
value
=
res
.
rows
historyPage
.
total
=
res
.
total
historyPage
.
rows
=
res
.
pageSize
})
}
getData
()
function
getData
()
{
console
.
log
(
222222222
)
const
item
=
reactive
({
page
:
historyPage
.
page
,
size
:
historyPage
.
rows
,
stationId
:
''
,
alarmStatus
:
''
,
alarmType
:
''
,
alarmStatus
:
''
,
alarmType
:
''
,
beginTime
:
''
,
endTime
:
''
})
getPipListHistoryData
(
item
).
then
(
res
=>
{
console
.
log
(
'res'
,
res
)
console
.
log
(
'res'
,
res
)
HistoryData
.
value
=
res
.
rows
historyPage
.
total
=
res
.
total
historyPage
.
rows
=
res
.
pageSize
console
.
log
(
'HistoryData.value'
,
HistoryData
.
value
)
console
.
log
(
'HistoryData.value'
,
HistoryData
.
value
)
})
}
function
getDataByParams
(){
function
getDataByParams
()
{
getPipListHistoryData
(
params
.
value
).
then
(
res
=>
{
HistoryData
.
value
=
res
.
rows
historyPage
.
total
=
res
.
total
historyPage
.
rows
=
res
.
pageSize
})
}
function
getName
(
name
){
const
option
=
options
.
value
.
find
(
item
=>
item
.
stationId
===
name
);
return
option
.
stationName
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
()
</
script
>
<
template
>
...
...
@@ -123,7 +174,7 @@ function getName(name){
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"stationId"
align=
"center"
label=
"换热站名称"
sortable
>
<template
#
default=
"scope"
>
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</span>
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"deviceIndexCode"
align=
"center"
label=
"光纤设备"
sortable
/>
...
...
src/views/AIStation/PipelineTempPage/PipelineTempNewDataPage.vue
View file @
9877c5c9
<
script
setup
>
import
{
onMounted
,
reactive
,
ref
,
watch
}
from
"vue"
;
import
analysisImage
from
'@/assets/imgs/dengluanniu_wx.png'
;
import
{
getMoveListNewData
}
from
"../../../api/AIStation/MoveMonitor.js"
;
import
{
reactive
,
ref
,
watch
}
from
"vue"
;
import
{
getPipListNewData
}
from
"../../../api/AIStation/PipelineTemp.js"
;
import
store
from
"../../../store/index.js"
;
const
data
=
ref
([])
const
params
=
ref
({})
...
...
@@ -34,74 +33,133 @@ function detail(row) {
singleDetails
.
value
=
row
detailOpen
.
value
=
true
}
//子组件接收父组件传递过来的值
const
props
=
defineProps
({
searchData
:
{
type
:
Object
,
required
:
true
},
option
:
{
type
:
Array
,
required
:
true
},
queryParams
:
{
type
:
Object
,
required
:
true
}
});
watch
(
()
=>
props
.
searchData
,
(
newData
)
=>
{
console
.
log
(
'值'
,
props
.
searchData
)
data
.
value
=
props
.
searchData
.
rows
;
console
.
log
(
'值w'
,
data
.
value
)
Page
.
total
=
props
.
searchData
.
total
}
);
watch
(
()
=>
props
.
queryParams
,
(
newData
)
=>
{
params
.
value
=
newData
console
.
log
(
'值eeeee'
,
params
.
value
)
console
.
log
(
'值ooo'
,
props
.
queryParams
)
getPipListNewData
(
params
.
value
).
then
(
res
=>
{
data
.
value
=
res
.
rows
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
console
.
log
(
'data值eeeee---------'
,
data
.
value
)
}
)
watch
(
()
=>
props
.
option
,
(
newVal
)
=>
{
options
.
value
=
props
.
option
console
.
log
(
'值ooo'
,
options
.
value
)
},
{
deep
:
true
}
)
getData
()
function
getData
(){
function
getData
()
{
const
item
=
reactive
({
page
:
Page
.
page
,
size
:
Page
.
rows
,
stationId
:
''
,
alarmStatus
:
''
,
alarmType
:
''
,
alarmStatus
:
''
,
alarmType
:
''
,
beginTime
:
''
,
endTime
:
''
})
getPipListNewData
(
item
).
then
(
res
=>
{
data
.
value
=
res
.
rows
console
.
log
(
'data============='
,
data
.
value
)
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
}
function
getDataByParams
(){
function
getDataByParams
()
{
getPipListNewData
(
params
.
value
).
then
(
res
=>
{
data
.
value
=
res
.
rows
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
}
function
getName
(
name
){
const
option
=
options
.
value
.
find
(
item
=>
item
.
stationId
===
name
);
return
option
.
stationName
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
(
()
=>
options
,
(
newData
)
=>
{
if
(
!
options
.
value
.
length
>
0
)
{
getSupplys
();
}
}
)
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
()
</
script
>
<
template
>
...
...
@@ -119,7 +177,7 @@ function getName(name){
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"stationId"
align=
"center"
label=
"换热站名称"
sortable
>
<template
#
default=
"scope"
>
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</span>
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"deviceIndexCode"
align=
"center"
label=
"光纤设备"
sortable
/>
...
...
src/views/AIStation/PipelineTempPage/index.vue
View file @
9877c5c9
...
...
@@ -5,21 +5,15 @@ import PipelineTempHistoryPage from './PipelineTempHistoryPage.vue' // 导入组
import
PipelineTempAlarmPage
from
'./PipelineTempAlarmPage.vue'
// 导入组件
import
zhCn
from
"element-plus/dist/locale/zh-cn.mjs"
import
store
from
"../../../store/index.js"
;
import
{
getMoveAlarmNumber
,
getMoveListAlarmNewData
,
getMoveListHistoryData
,
getMoveListNewData
}
from
"../../../api/AIStation/MoveMonitor.js"
;
import
{
getPipAlarmNumber
,
getPipListAlarmData
,
getPipListHistoryData
,
getPipListNewData
,
exportPipelineTempNewData
,
exportPipelineTempHistoryData
,
exportPipelineTempAlarmData
}
from
"../../../api/AIStation/PipelineTemp.js"
;
const
{
proxy
}
=
getCurrentInstance
();
// 列表
const
topBtn
=
ref
([
...
...
@@ -72,7 +66,7 @@ const alarmStatusList = [
const
queryParams
=
reactive
({
stationId
:
''
,
alarmStatus
:
''
,
a
larmType
:
''
,
thermalA
larmType
:
''
,
startTime
:
''
,
endTime
:
''
,
});
...
...
@@ -104,38 +98,35 @@ const thermalAlarmTypeList = [
value
:
'thermalImaging'
}
]
const
childParams
=
ref
({})
const
search
=
()
=>
{
const
item
=
{
page
:
Page
.
page
,
size
:
Page
.
rows
,
stationId
:
queryParams
.
stationId
,
alarmStatus
:
queryParams
.
alarmStatus
,
alarmType
:
queryParams
.
a
larmType
,
alarmType
:
queryParams
.
thermalA
larmType
,
startTime
:
queryParams
.
startTime
,
endTime
:
queryParams
.
endTime
,
}
if
(
selectedBtn
.
value
===
1
)
{
getPipListNewData
(
item
).
then
(
res
=>
{
searchData
.
value
=
res
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
}
else
if
(
selectedBtn
.
value
===
2
){
getPipListHistoryData
(
item
).
then
(
res
=>
{
searchData
.
value
=
res
Page
.
total
=
res
.
total
})
}
else
if
(
selectedBtn
.
value
===
3
){
getPipListAlarmData
(
item
).
then
(
res
=>
{
searchData
.
value
=
res
Page
.
total
=
res
.
total
})
getPipAlarmNumber
().
then
(
res
=>
{
alarmNum
.
value
=
res
.
data
})
if
(
selectedBtn
.
value
===
1
)
{
childParams
.
value
=
item
}
else
if
(
selectedBtn
.
value
===
2
)
{
childParams
.
value
=
item
}
else
if
(
selectedBtn
.
value
===
3
)
{
childParams
.
value
=
item
}
console
.
log
(
'查询:'
,
item
);
};
getNumber
()
function
getNumber
()
{
getPipAlarmNumber
().
then
(
res
=>
{
console
.
log
(
'123123123123-----------'
,
res
.
data
)
alarmNum
.
value
=
res
.
data
})
}
/** 导出按钮操作 */
const
handleExport
=
()
=>
{
...
...
@@ -146,8 +137,8 @@ const handleExport = () => {
startTime
:
queryParams
.
startTime
,
endTime
:
queryParams
.
endTime
,
}
console
.
log
(
'selectedBtn.value:'
,
selectedBtn
.
value
)
if
(
selectedBtn
.
value
===
1
){
console
.
log
(
'selectedBtn.value:'
,
selectedBtn
.
value
)
if
(
selectedBtn
.
value
===
1
)
{
console
.
log
(
'11111'
)
exportPipelineTempNewData
(
item
).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
])
...
...
@@ -160,7 +151,7 @@ const handleExport = () => {
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
})
}
else
if
(
selectedBtn
.
value
===
2
){
}
else
if
(
selectedBtn
.
value
===
2
)
{
console
.
log
(
'22222'
)
exportPipelineTempHistoryData
(
item
).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
])
...
...
@@ -173,7 +164,7 @@ const handleExport = () => {
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
})
}
else
if
(
selectedBtn
.
value
===
3
){
}
else
if
(
selectedBtn
.
value
===
3
)
{
console
.
log
(
'33333'
)
exportPipelineTempAlarmData
(
item
).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
])
...
...
@@ -198,122 +189,69 @@ const resetSearch = () => {
queryParams
.
alarmType
=
''
queryParams
.
stationId
=
''
searchData
.
value
=
{}
const
item
=
reactive
({
page
:
Page
.
page
,
size
:
Page
.
rows
,
stationId
:
''
,
alarmStatus
:
''
,
alarmType
:
''
,
beginTime
:
''
,
endTime
:
''
})
// if (selectedBtn.value === 1) {
// getPipListNewData(item).then(res => {
// searchData.value = res
// })
// } else if (selectedBtn.value === 2) {
// getPipListHistoryData(item).then(res => {
// searchData.value = res
// })
// } else if (selectedBtn.value === 3) {
// getPipListAlarmData(item).then(res => {
// searchData.value = res
// })
// getPipAlarmNumber().then(res => {
// alarmNum.value = res.data
// })
// }
}
const
options
=
ref
([]);
const
enterpriseId
=
ref
();
const
props
=
{
multiple
:
true
,
emitPath
:
false
}
const
props
=
{
multiple
:
true
,
emitPath
:
false
}
const
loading
=
ref
(
true
);
getEnterprise
();
function
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;
// stationId.length = 0;
// const result = store.getters.getEnterprise();
// if (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});
// })
// }
// }
// });
// }
// // stationId.value.push(options[0].children[0].children[0].value);
// }
//获取换热机组列表
function
getSupplys
(){
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
console
.
log
(
'result:'
,
result
)
result
.
forEach
(
element
=>
{
//
console.log('result:',result)
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9BCA54BC-8F27-4849-8D7D-50C5099E1949"
.
toLowerCase
())
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9BCA54BC-8F27-4849-8D7D-50C5099E1949"
.
toLowerCase
())
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
console
.
log
(
'supply:'
,
supply
)
//
console.log('supply:',supply)
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
)
{
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
})
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
optionsList
.
value
=
allItems
;
});
}
}
getSupplys
();
</
script
>
...
...
@@ -322,8 +260,8 @@ getSupplys();
<div
class=
"search-wrapper"
>
<el-form
:model=
"queryParams"
:inline=
"true"
style=
"padding: 10px 0 0 10px"
>
<el-form-item
label=
"换热站:"
>
<!--
<el-cascader
:options=
"options"
v-model=
"stationId"
:props=
"props"
collapse-tags
clearable
:show-all-levels=
"false"
--
>
<!-- placeholder="请选择" style="min-width: 210px;" />-->
<!--
<el-cascader
:options=
"options"
v-model=
"stationId"
:props=
"props"
collapse-tags
clearable
:show-all-levels=
"false"
--
>
<!-- placeholder="请选择" style="min-width: 210px;" />-->
<el-select
v-model=
"queryParams.stationId"
placeholder=
"请选择"
style=
"min-width: 210px"
filterable
clearable
>
<el-option
v-for=
"item in options"
...
...
@@ -382,7 +320,7 @@ getSupplys();
>
</el-tab-pane>
</el-tabs>
<component
:is=
"selectedComponent"
:
option=
"optionsList"
:queryParams =
'queryParams'
:search-data=
"searchData"
></component>
<component
:is=
"selectedComponent"
:
queryParams=
'childParams'
></component>
</div>
</div>
</
template
>
...
...
src/views/AIStation/TransTempPage/TransTempAlarmPage.vue
View file @
9877c5c9
<
script
setup
>
import
{
ref
,
defineProps
,
defineEmits
,
computed
,
isRef
,
onMounted
,
watchEffect
,
reactive
,
watch
}
from
"vue"
;
import
analysisImage
from
'@/assets/imgs/dengluanniu_wx.png'
;
import
{
getRecycleListAlarmData
}
from
"../../../api/AIStation/RecyclePump.js"
;
import
{
getTransListAlarmData
}
from
"../../../api/AIStation/TransTemp.js"
;
import
store
from
"../../../store/index.js"
;
const
TransTempAlarmData
=
ref
([])
const
params
=
ref
({})
const
options
=
ref
([])
const
enterpriseId
=
ref
();
const
loading
=
ref
(
true
);
const
tableHeaderClass
=
data
=>
{
// 表头样式
return
'table-header-class'
}
...
...
@@ -37,43 +39,24 @@ const handleCurrentChange = (val) => {
};
//子组件接收父组件传递过来的值
const
props
=
defineProps
({
searchData
:
{
type
:
Object
,
required
:
true
},
option
:
{
type
:
Array
,
required
:
true
},
queryParams
:
{
type
:
Object
,
required
:
true
}
});
watch
(
()
=>
props
.
searchData
,
(
newData
)
=>
{
TransTempAlarmData
.
value
=
props
.
searchData
.
rows
;
Page
.
total
=
props
.
searchData
.
total
;
}
);
watch
(
()
=>
props
.
queryParams
,
(
newData
)
=>
{
params
.
value
=
newData
console
.
log
(
'值eeeee'
,
params
.
value
)
getDataNew
(
params
.
value
)
console
.
log
(
'值eeeee'
,
params
.
value
)
}
)
watch
(
()
=>
props
.
option
,
(
newVal
)
=>
{
options
.
value
=
props
.
option
console
.
log
(
'值eeeerrrrr'
,
options
.
value
)
},
{
deep
:
true
}
)
getData
()
function
getData
(){
function
getData
()
{
const
item
=
reactive
({
page
:
Page
.
page
,
size
:
Page
.
rows
,
...
...
@@ -90,17 +73,89 @@ function getData(){
Page
.
rows
=
res
.
pageSize
})
}
function
getDataByParams
(){
function
getDataByParams
()
{
getTransListAlarmData
(
params
.
value
).
then
(
res
=>
{
TransTempAlarmData
.
value
=
res
.
rows
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
}
function
getName
(
name
){
const
option
=
options
.
value
.
find
(
item
=>
item
.
stationId
===
name
);
return
option
.
stationName
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
Page
.
total
=
res
.
total
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
()
</
script
>
<
template
>
...
...
@@ -118,7 +173,7 @@ function getName(name){
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"stationId"
label=
"换热站"
align=
"center"
sortable
>
<template
#
default=
"scope"
>
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</span>
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"relateDeviceId"
label=
"设备名称"
align=
"center"
sortable
/>
...
...
src/views/AIStation/TransTempPage/TransTempHistoryPage.vue
View file @
9877c5c9
<
script
setup
>
import
{
reactive
,
ref
,
watch
}
from
"vue"
;
import
analysisImage
from
'@/assets/imgs/dengluanniu_wx.png'
;
import
{
getRecycleListHistoryData
}
from
"../../../api/AIStation/RecyclePump.js"
;
import
{
getTransListHistoryData
}
from
"../../../api/AIStation/TransTemp.js"
;
import
store
from
"../../../store/index.js"
;
const
TransTempHistoryData
=
ref
([])
const
params
=
ref
({})
const
options
=
ref
([])
const
enterpriseId
=
ref
();
const
loading
=
ref
(
true
);
// 分页
const
Page
=
reactive
({
total
:
0
,
rows
:
20
,
page
:
1
});
const
tableHeaderClass
=
data
=>
{
// 表头样式
...
...
@@ -38,53 +40,33 @@ function detail(row) {
singleDetails
.
value
=
row
detailOpen
.
value
=
true
}
//子组件接收父组件传递过来的值
const
props
=
defineProps
({
searchData
:
{
type
:
Object
,
required
:
true
},
option
:
{
type
:
Array
,
required
:
true
},
queryParams
:
{
type
:
Object
,
required
:
true
}
});
watch
(
()
=>
props
.
searchData
,
(
newData
)
=>
{
console
.
log
(
'值'
,
props
.
searchData
)
TransTempHistoryData
.
value
=
props
.
searchData
.
rows
;
Page
.
total
=
props
.
searchData
.
total
}
);
watch
(
()
=>
props
.
queryParams
,
(
newData
)
=>
{
params
.
value
=
newData
console
.
log
(
'值eeeee'
,
params
.
value
)
console
.
log
(
'值
ooo'
,
props
.
queryParams
)
getDataNew
(
params
.
value
)
console
.
log
(
'值
eeeee'
,
params
.
value
)
}
)
watch
(
()
=>
props
.
option
,
(
newVal
)
=>
{
options
.
value
=
props
.
option
console
.
log
(
'值ooo'
,
options
.
value
)
},
{
deep
:
true
}
)
getData
()
function
getData
()
{
const
item
=
reactive
({
page
:
Page
.
page
,
size
:
Page
.
rows
,
stationId
:
''
,
alarmStatus
:
''
,
alarmType
:
''
,
alarmStatus
:
''
,
alarmType
:
''
,
beginTime
:
''
,
endTime
:
''
})
...
...
@@ -94,17 +76,89 @@ function getData() {
Page
.
rows
=
res
.
pageSize
})
}
function
getDataByParams
(){
function
getDataByParams
()
{
getTransListHistoryData
(
params
.
value
).
then
(
res
=>
{
TransTempHistoryData
.
value
=
res
.
rows
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
}
function
getName
(
name
){
const
option
=
options
.
value
.
find
(
item
=>
item
.
stationId
===
name
);
return
option
.
stationName
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
Page
.
total
=
res
.
total
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
()
</
script
>
<
template
>
...
...
@@ -122,7 +176,7 @@ function getName(name){
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"stationId"
align=
"center"
label=
"换热站名称"
sortable
>
<template
#
default=
"scope"
>
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</span>
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"deviceName"
align=
"center"
label=
"设备名称"
sortable
/>
...
...
src/views/AIStation/TransTempPage/TransTempNewDataPage.vue
View file @
9877c5c9
<
script
setup
>
import
{
reactive
,
ref
,
watch
}
from
"vue"
;
import
analysisImage
from
'@/assets/imgs/dengluanniu_wx.png'
;
import
{
getRecycleListNewData
}
from
"../../../api/AIStation/RecyclePump.js"
;
import
{
getTransListNewData
}
from
"../../../api/AIStation/TransTemp.js"
;
import
store
from
"../../../store/index.js"
;
const
TransTempNewData
=
ref
([])
const
params
=
ref
({})
const
options
=
ref
([])
const
enterpriseId
=
ref
();
const
loading
=
ref
(
true
);
// 分页
const
Page
=
reactive
({
total
:
0
,
rows
:
20
,
page
:
1
});
const
tableHeaderClass
=
data
=>
{
// 表头样式
...
...
@@ -42,44 +44,21 @@ function detail(row) {
//子组件接收父组件传递过来的值
const
props
=
defineProps
({
searchData
:
{
type
:
Object
,
required
:
true
},
option
:
{
type
:
Array
,
required
:
true
},
queryParams
:
{
type
:
Object
,
required
:
true
}
});
watch
(
()
=>
props
.
searchData
,
(
newData
)
=>
{
console
.
log
(
'值'
,
props
.
searchData
)
TransTempNewData
.
value
=
props
.
searchData
.
rows
;
console
.
log
(
'值w'
,
TransTempNewData
.
value
)
Page
.
total
=
props
.
searchData
.
total
}
);
watch
(
()
=>
props
.
queryParams
,
(
newData
)
=>
{
params
.
value
=
newData
console
.
log
(
'值eeeee'
,
params
.
value
)
console
.
log
(
'值ooo'
,
props
.
queryParams
)
getDataNew
(
params
.
value
)
console
.
log
(
'值eeeee'
,
params
.
value
)
console
.
log
(
'值ooo'
,
props
.
queryParams
)
}
)
watch
(
()
=>
props
.
option
,
(
newVal
)
=>
{
options
.
value
=
props
.
option
console
.
log
(
'值ooo'
,
options
.
value
)
},
{
deep
:
true
}
)
getData
()
function
getData
()
{
...
...
@@ -98,17 +77,89 @@ function getData() {
Page
.
rows
=
res
.
pageSize
})
}
function
getDataByParams
(){
function
getDataByParams
()
{
getTransListNewData
(
params
.
value
).
then
(
res
=>
{
TransTempNewData
.
value
=
res
.
rows
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
}
function
getName
(
name
){
const
option
=
options
.
value
.
find
(
item
=>
item
.
stationId
===
name
);
return
option
.
stationName
function
getName
(
name
)
{
if
(
TransTempNewData
&&
TransTempNewData
.
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
)
{
getTransListNewData
(
item
).
then
(
res
=>
{
TransTempNewData
.
value
=
res
.
rows
Page
.
total
=
res
.
total
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
()
</
script
>
<
template
>
...
...
@@ -126,7 +177,7 @@ function getName(name){
<el-table-column
type=
"index"
label=
"序号"
align=
"center"
width=
"100"
/>
<el-table-column
prop=
"stationId"
align=
"center"
label=
"换热站名称"
sortable
>
<template
#
default=
"scope"
>
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</span>
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"deviceName"
align=
"center"
label=
"设备名称"
sortable
/>
...
...
src/views/AIStation/TransTempPage/index.vue
View file @
9877c5c9
...
...
@@ -20,6 +20,7 @@ import {
exportTransTempHistoryData
,
exportTransTempAlarmData
}
from
"../../../api/AIStation/TransTemp.js"
;
import
{
getPipAlarmNumber
}
from
"../../../api/AIStation/PipelineTemp.js"
;
const
{
proxy
}
=
getCurrentInstance
();
// 列表
...
...
@@ -30,6 +31,7 @@ const topBtn = ref([
]);
const
selectedBtn
=
ref
(
null
);
const
optionsList
=
ref
([])
const
childParams
=
ref
({})
// 默认显示的组件页面
const
selectedComponent
=
ref
(
TransTempNewDataPage
);
...
...
@@ -115,28 +117,23 @@ const search = () => {
startTime
:
queryParams
.
startTime
,
endTime
:
queryParams
.
endTime
,
}
if
(
selectedBtn
.
value
===
1
)
{
getTransListNewData
(
item
).
then
(
res
=>
{
searchData
.
value
=
res
Page
.
total
=
res
.
total
Page
.
rows
=
res
.
pageSize
})
}
else
if
(
selectedBtn
.
value
===
2
){
getTransListHistoryData
(
item
).
then
(
res
=>
{
searchData
.
value
=
res
Page
.
total
=
res
.
total
})
}
else
if
(
selectedBtn
.
value
===
3
){
getTransListAlarmData
(
item
).
then
(
res
=>
{
searchData
.
value
=
res
Page
.
total
=
res
.
total
})
getTransAlarmNumber
().
then
(
res
=>
{
alarmNum
.
value
=
res
.
data
})
if
(
selectedBtn
.
value
===
1
)
{
childParams
.
value
=
item
}
else
if
(
selectedBtn
.
value
===
2
)
{
childParams
.
value
=
item
}
else
if
(
selectedBtn
.
value
===
3
)
{
childParams
.
value
=
item
}
console
.
log
(
'查询:'
,
item
);
};
getNumber
()
function
getNumber
()
{
getTransAlarmNumber
().
then
(
res
=>
{
console
.
log
(
'123123123123-----------'
,
res
.
data
)
alarmNum
.
value
=
res
.
data
})
}
/** 导出按钮操作 */
const
handleExport
=
()
=>
{
...
...
@@ -147,8 +144,8 @@ const handleExport = () => {
beginTime
:
queryParams
.
startTime
,
endTime
:
queryParams
.
endTime
,
}
console
.
log
(
'selectedBtn.value:'
,
selectedBtn
.
value
)
if
(
selectedBtn
.
value
===
1
){
console
.
log
(
'selectedBtn.value:'
,
selectedBtn
.
value
)
if
(
selectedBtn
.
value
===
1
)
{
console
.
log
(
'11111'
)
exportTransTempNewData
(
item
).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
])
...
...
@@ -161,7 +158,7 @@ const handleExport = () => {
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
})
}
else
if
(
selectedBtn
.
value
===
2
){
}
else
if
(
selectedBtn
.
value
===
2
)
{
console
.
log
(
'22222'
)
exportTransTempHistoryData
(
item
).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
])
...
...
@@ -174,7 +171,7 @@ const handleExport = () => {
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
})
}
else
if
(
selectedBtn
.
value
===
3
){
}
else
if
(
selectedBtn
.
value
===
3
)
{
console
.
log
(
'33333'
)
exportTransTempAlarmData
(
item
).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
])
...
...
@@ -199,121 +196,70 @@ const resetSearch = () => {
queryParams
.
alarmType
=
''
queryParams
.
stationId
=
''
searchData
.
value
=
{}
const
item
=
reactive
({
page
:
Page
.
page
,
size
:
Page
.
rows
,
stationId
:
''
,
alarmStatus
:
''
,
alarmType
:
''
,
beginTime
:
''
,
endTime
:
''
})
// if (selectedBtn.value === 1) {
// getTransListNewData(item).then(res => {
// searchData.value = res
// })
// } else if (selectedBtn.value === 2) {
// getTransListHistoryData(item).then(res => {
// searchData.value = res
// })
// } else if (selectedBtn.value === 3) {
// getTransListAlarmData(item).then(res => {
// searchData.value = res
// })
// getTransAlarmNumber().then(res => {
// alarmNum.value = res.data
// })
// }
};
const
options
=
ref
([]);
const
enterpriseId
=
ref
();
const
props
=
{
multiple
:
true
,
emitPath
:
false
}
const
props
=
{
multiple
:
true
,
emitPath
:
false
}
const
loading
=
ref
(
true
);
getEnterprise
();
function
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;
// stationId.length = 0;
// const result = store.getters.getEnterprise();
// if (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});
// })
// }
// }
// });
// }
// // stationId.value.push(options[0].children[0].children[0].value);
// }
//获取换热机组列表
function
getSupplys
(){
function
getSupplys
()
{
loading
.
value
=
true
;
// tableData.length = 0;
options
.
length
=
0
;
const
result
=
store
.
getters
.
getEnterprise
();
if
(
result
)
{
console
.
log
(
'result:'
,
result
)
result
.
forEach
(
element
=>
{
console
.
log
(
'result:'
,
result
)
result
.
forEach
(
element
=>
{
let
allItems
=
[]
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9BCA54BC-8F27-4849-8D7D-50C5099E1949"
.
toLowerCase
())
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
"9BCA54BC-8F27-4849-8D7D-50C5099E1949"
.
toLowerCase
())
{
element
.
serviceCenterList
.
forEach
(
center
=>
{
//遍历一级目录下的
center
.
supplyList
.
forEach
(
supply
=>
{
//拿到一级目录下的然后遍历它二级目录下的
console
.
log
(
'supply:'
,
supply
)
console
.
log
(
'supply:'
,
supply
)
supply
.
stationList
.
forEach
(
station
=>
{
//拿到
let
unitIdList
=
[]
supply
.
transferList
.
forEach
(
unit
=>
{
//unit的stationId等于station的stationId的话,就把这个unit的unitId添加到unitIdList中
if
(
unit
.
stationId
===
station
.
stationId
)
{
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
})
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
,
unitId
:
unitId
})
});
});
})
}
else
{
}
else
{
element
.
supplyList
.
forEach
(
element
=>
{
element
.
stationList
.
forEach
(
station
=>
{
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
allItems
.
push
({
stationId
:
station
.
stationId
,
stationName
:
station
.
stationName
,
supplyId
:
station
.
supplyId
})
})
})
}
}
options
.
value
=
allItems
;
optionsList
.
value
=
allItems
;
});
}
}
getSupplys
();
</
script
>
...
...
@@ -322,8 +268,8 @@ getSupplys();
<div
class=
"search-wrapper"
>
<el-form
:model=
"queryParams"
:inline=
"true"
style=
"padding: 10px 0 0 10px"
>
<el-form-item
label=
"换热站:"
>
<!--
<el-cascader
:options=
"options"
v-model=
"stationId"
:props=
"props"
collapse-tags
clearable
:show-all-levels=
"false"
--
>
<!-- placeholder="请选择" style="min-width: 210px;" />-->
<!--
<el-cascader
:options=
"options"
v-model=
"stationId"
:props=
"props"
collapse-tags
clearable
:show-all-levels=
"false"
--
>
<!-- placeholder="请选择" style="min-width: 210px;" />-->
<el-select
v-model=
"queryParams.stationId"
placeholder=
"请选择"
style=
"min-width: 210px"
filterable
clearable
>
<el-option
v-for=
"item in options"
...
...
@@ -382,7 +328,7 @@ getSupplys();
>
</el-tab-pane>
</el-tabs>
<component
:is=
"selectedComponent"
:
option=
"optionsList"
:queryParams =
'queryParams'
:search-data=
"searchData"
></component>
<component
:is=
"selectedComponent"
:
queryParams=
'childParams'
></component>
</div>
</div>
...
...
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