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
bcd59b45
Commit
bcd59b45
authored
Sep 13, 2024
by
hubaoshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面优化
parent
f9e743d1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
81 additions
and
30 deletions
+81
-30
httpTwo.js
src/api/httpTwo.js
+7
-2
ExtinguisherNewDataPage.vue
...ws/AIStation/ExtinguisherPage/ExtinguisherNewDataPage.vue
+14
-12
index.vue
src/views/AIStation/ExtinguisherPage/index.vue
+48
-4
PipelineTempAlarmPage.vue
...iews/AIStation/PipelineTempPage/PipelineTempAlarmPage.vue
+1
-1
TransTempAlarmPage.vue
src/views/AIStation/TransTempPage/TransTempAlarmPage.vue
+11
-11
No files found.
src/api/httpTwo.js
View file @
bcd59b45
...
...
@@ -127,8 +127,13 @@ function getToken () {
// return "";
// }
//console.log("token:" + store.getters.getToken());
const
AIToken
=
localStorage
.
getItem
(
'AIToken'
)
if
(
localStorage
.
getItem
(
'AIToken'
))
{
const
AIToken
=
'Bearer'
+
' '
+
localStorage
.
getItem
(
'AIToken'
)
return
AIToken
;
}
else
{
return
null
}
}
/*
...
...
src/views/AIStation/ExtinguisherPage/ExtinguisherNewDataPage.vue
View file @
bcd59b45
...
...
@@ -9,6 +9,10 @@ const data = ref([])
//子组件接收父组件传递过来的值
const
props
=
defineProps
({
searchData
:
{
type
:
Array
,
required
:
true
},
queryParams
:
{
type
:
Object
,
required
:
true
...
...
@@ -75,18 +79,7 @@ function getDataByParams() {
Page
.
rows
=
res
.
pageSize
})
}
// const route = useRoute()
// watch(
// () => route.path, // 只监听路径变化
// () => {
// if(route.path === '/AIStation/ExtinguisherPage/ExtinguisherNewDataPage') {
// // 路由变化,执行相应操作
// handleGetAIToken();
// console.log('route.path',route.path)
// }
// },
// { immediate: true } // 只在路径变化时触发
// )
watch
(
()
=>
props
.
queryParams
,
(
newData
)
=>
{
...
...
@@ -94,6 +87,15 @@ watch(
getDataNew
(
params
.
value
)
}
)
watch
(
()
=>
props
.
searchData
,
(
newData
)
=>
{
console
.
log
(
'ppppppppppp'
,
props
.
searchData
)
if
(
props
.
searchData
.
includes
(
1
)){
getData
()
}
},{
immediate
:
true
}
)
// TODO 等待后续优化
function
getDataNew
(
item
)
{
getListNewData
(
item
).
then
(
res
=>
{
...
...
src/views/AIStation/ExtinguisherPage/index.vue
View file @
bcd59b45
...
...
@@ -10,15 +10,18 @@ import {
getAlarmNumData
,
exportNewExtinguisherData
,
exportHistoryExtinguisherData
,
exportExtinguisherAlarmData
exportExtinguisherAlarmData
,
getListNewData
}
from
"../../../api/AIStation/Extinguisher.js"
;
import
{
useRoute
}
from
"vue-router"
;
const
options
=
ref
([]);
const
enterpriseId
=
ref
();
const
props
=
{
multiple
:
true
,
emitPath
:
false
}
const
dynamicComponent
=
ref
(
ExtinguisherNewDataPage
);
// 初始化选中的标签页
onMounted
(()
=>
{
// selectedComponent.value
activeName
.
value
=
topBtn
.
value
[
0
].
component
;
selectedBtn
.
value
=
topBtn
.
value
[
0
].
id
;
getSupplys
()
...
...
@@ -40,7 +43,7 @@ const activeName = ref(ExtinguisherNewDataPage);
// 报警数量
const
alarmNum
=
ref
(
0
);
// 查询结果数据
const
searchData
=
ref
(
{}
);
const
searchData
=
ref
(
[]
);
// 点击标签页切换事件
const
handleTabClick
=
(
tab
,
event
)
=>
{
console
.
log
(
'id'
,
tab
)
...
...
@@ -96,7 +99,7 @@ const search = () => {
}
console
.
log
(
'查询:'
,
item
);
}
getNumber
()
function
getNumber
()
{
getAlarmNumData
().
then
(
res
=>
{
...
...
@@ -225,6 +228,47 @@ function getSupplys() {
});
}
}
const
route
=
useRoute
()
const
number
=
ref
(
0
)
watch
(
()
=>
route
.
path
,
// 只监听路径变化
()
=>
{
if
(
route
.
path
===
'/AIStation/Extinguisher'
)
{
// 路由变化,执行相应操作
handleGetAIToken
();
number
.
value
=
1
console
.
log
(
'11111ppppppppppppp1'
,
number
.
value
)
getNumber
()
console
.
log
(
'route.path'
,
route
.
path
)
}
},
{
immediate
:
true
}
// 只在路径变化时触发
)
watch
(
()
=>
number
.
value
,
()
=>
{
console
.
log
(
'0000000000000'
,
number
.
value
);
if
(
number
.
value
===
1
)
{
console
.
log
(
']]]]]]]]]]]]]]]]]]]]]]'
);
searchData
.
value
.
push
(
1
);
console
.
log
(
'searchData.value'
,
searchData
.
value
)
}
},
{
immediate
:
true
}
);
function
ChildMethod
()
{
if
(
dynamicComponent
)
{
console
.
log
(
'selectedComponent.value'
,
dynamicComponent
.
value
);
if
(
typeof
dynamicComponent
.
value
.
getData
===
'function'
)
{
console
.
log
(
'子组件方法存在,开始调用...'
);
dynamicComponent
.
value
.
getData
();
}
else
{
console
.
error
(
'子组件方法不存在'
);
}
}
}
</
script
>
<
template
>
<div
class=
"app-content"
>
...
...
@@ -286,7 +330,7 @@ function getSupplys() {
>
</el-tab-pane>
</el-tabs>
<component
:is=
"selectedComponent"
:queryParams=
'childParams'
></component>
<component
:is=
"selectedComponent"
:queryParams=
'childParams'
:search-data=
"searchData"
></component>
</div>
</div>
...
...
src/views/AIStation/PipelineTempPage/PipelineTempAlarmPage.vue
View file @
bcd59b45
...
...
@@ -154,7 +154,7 @@ getSupplys()
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"src
ParentIndex
"
align=
"center"
label=
"设施名称"
sortable
/>
<el-table-column
prop=
"src
Name
"
align=
"center"
label=
"设施名称"
sortable
/>
<el-table-column
prop=
"eventTime"
align=
"center"
label=
"报警时间"
sortable
/>
<el-table-column
prop=
"thermalAlarmType"
align=
"center"
label=
"报警类型"
>
<
template
#
default=
"scope"
>
...
...
src/views/AIStation/TransTempPage/TransTempAlarmPage.vue
View file @
bcd59b45
...
...
@@ -176,23 +176,23 @@ getSupplys()
<span>
{{
getName
(
scope
.
row
.
stationId
)
||
'-'
}}
</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=
"alarmLevel"
align=
"center"
label=
"报警等级"
>
<
template
#
default=
"scope"
>
<span
v-if=
"scope.row.alarmLevel===
'0'
"
>
预警
</span>
<span
v-else-if=
"scope.row.alarmLevel===
'1'
"
>
报警
</span>
<span
v-if=
"scope.row.alarmLevel===
0
"
>
预警
</span>
<span
v-else-if=
"scope.row.alarmLevel===
1
"
>
报警
</span>
<span
v-else
>
-
</span>
</
template
>
</el-table-column>
<el-table-column
prop=
"alarmType"
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.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-else
>
-
</span>
</
template
>
</el-table-column>
...
...
@@ -211,8 +211,8 @@ getSupplys()
</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>
...
...
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