Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qsh-wc
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
honghuiliu
qsh-wc
Commits
cb5b2d6f
Commit
cb5b2d6f
authored
Sep 26, 2022
by
honghuiliu
💬
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
019f8c25
1794765e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
110 additions
and
42 deletions
+110
-42
index.js
pc/src/api/methods/index.js
+9
-1
home.vue
pc/src/views/home.vue
+4
-2
site-detail.vue
pc/src/views/site-detail.vue
+97
-39
No files found.
pc/src/api/methods/index.js
View file @
cb5b2d6f
...
@@ -19,5 +19,13 @@ export default {
...
@@ -19,5 +19,13 @@ export default {
//工单详情
//工单详情
getPatrolDetail
(
params
)
{
getPatrolDetail
(
params
)
{
return
http
.
post
(
'web/patrol/getPatrolDetail'
,
params
)
return
http
.
post
(
'web/patrol/getPatrolDetail'
,
params
)
}
},
//获取历史数据列表
getHistoryDataList
(
params
)
{
return
http
.
post
(
'web/data/getHistoryDataList'
,
params
)
},
//获取液位
getYewei
(
params
)
{
return
http
.
post
(
'web/data/getYewei'
,
params
)
},
}
}
pc/src/views/home.vue
View file @
cb5b2d6f
...
@@ -152,11 +152,13 @@
...
@@ -152,11 +152,13 @@
}
}
function
loadScript
()
{
function
loadScript
()
{
const
script
=
document
.
createElement
(
"script"
);
const
script
=
document
.
createElement
(
"script"
);
script
.
src
=
"https://api.map.baidu.com/api?v=1.0&type=webgl&ak=fklOeUwr7Y1amxhGFZL8lvE6QvIKpGNi
&callback=initMap
"
;
script
.
src
=
"https://api.map.baidu.com/api?v=1.0&type=webgl&ak=fklOeUwr7Y1amxhGFZL8lvE6QvIKpGNi"
;
}
}
onMounted
(()
=>
{
onMounted
(()
=>
{
nextTick
(()
=>
{
nextTick
(()
=>
{
setTimeout
(()
=>
{
initMap
();
initMap
();
},
2000
);
state
.
timer
=
setInterval
(()
=>
{
state
.
timer
=
setInterval
(()
=>
{
state
.
time
=
myPublic
.
dateFormat
.
format
(
Date
.
now
(),
'HH:mm:ss YYYY年MM月DD日'
);
state
.
time
=
myPublic
.
dateFormat
.
format
(
Date
.
now
(),
'HH:mm:ss YYYY年MM月DD日'
);
},
1000
)
},
1000
)
...
...
pc/src/views/site-detail.vue
View file @
cb5b2d6f
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
<div
class=
"filter-one"
>
<div
class=
"filter-one"
>
<p
class=
"filter-name"
>
类型筛选
</p>
<p
class=
"filter-name"
>
类型筛选
</p>
<div
class=
"filter-content"
>
<div
class=
"filter-content"
>
<el-select
v-model=
"filter.type
"
class=
"m-2"
placeholder=
"请选择类型"
@
change=
"()=>get
List()"
>
<el-select
v-model=
"filter.type
_name"
class=
"m-2"
placeholder=
"请选择类型"
@
change=
"()=>getHistoryData
List()"
>
<el-option
<el-option
v-for=
"item in [
{name:'全部类型',value:'',prop:''},...typeList]"
v-for=
"item in [
{name:'全部类型',value:'',prop:''},...typeList]"
:key="item.prop"
:key="item.prop"
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,7 @@
end-placeholder=
"结束时间"
end-placeholder=
"结束时间"
:teleported=
"false"
:teleported=
"false"
:editable=
"true"
:editable=
"true"
@
change=
"()=>getList()"
@
change=
"()=>get
HistoryData
List()"
/>
/>
</div>
</div>
</div>
</div>
...
@@ -123,13 +123,13 @@
...
@@ -123,13 +123,13 @@
</div>
</div>
</div>
</div>
<div
class=
"table-body"
>
<div
class=
"table-body"
>
<div
class=
"row"
v-for=
"(item,index) in typeList"
:key=
"index"
>
<div
class=
"row"
v-for=
"(item,index) in typeList
.filter(one=>one.show)
"
:key=
"index"
>
<div
class=
"cell flex_2"
>
<div
class=
"cell flex_2"
>
<span
class=
"point"
:style=
"`background-color:$
{item.color}`">
</span>
<span
class=
"point"
:style=
"`background-color:$
{item.color}`">
</span>
<span
:style=
"`color:$
{item.color}`">
{{
item
.
name
}}
</span>
<span
:style=
"`color:$
{item.color}`">
{{
item
.
name
}}
</span>
</div>
</div>
<div
class=
"cell flex_3"
>
{{
item
.
value
}}
{{
item
.
unit
}}
</div>
<div
class=
"cell flex_3"
>
{{
item
.
value
}}
{{
item
.
unit
}}
</div>
<div
class=
"cell"
>
{{
item
.
create_time
}}
</div>
<div
class=
"cell"
>
{{
item
.
CreatedAt
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -283,7 +283,7 @@
...
@@ -283,7 +283,7 @@
detail
:
{
detail
:
{
poster
:[],
poster
:[],
index
:
0
,
index
:
0
,
yewei
:
0
.7
,
yewei
:
0
,
type
:
1
,
type
:
1
,
accessToken
:
'at.bvx2ea007tfqqdvkcb9iuhk70q6gjodm-7smdnjfh9j-1wdmw5f-mal3go2vz'
,
accessToken
:
'at.bvx2ea007tfqqdvkcb9iuhk70q6gjodm-7smdnjfh9j-1wdmw5f-mal3go2vz'
,
url
:
'ezopen://open.ys7.com/E77565052/1.live'
,
url
:
'ezopen://open.ys7.com/E77565052/1.live'
,
...
@@ -319,7 +319,7 @@
...
@@ -319,7 +319,7 @@
tab
:
'base'
,
tab
:
'base'
,
myChart
:
null
,
myChart
:
null
,
filter
:{
filter
:{
type
:
''
,
type
_name
:
''
,
order_type
:
''
,
order_type
:
''
,
time
:[
''
,
''
],
time
:[
''
,
''
],
time_order
:[
''
,
''
]
time_order
:[
''
,
''
]
...
@@ -327,67 +327,75 @@
...
@@ -327,67 +327,75 @@
typeList
:[
typeList
:[
{
{
name
:
'液位'
,
name
:
'液位'
,
prop
:
'
a1
'
,
prop
:
'
液位
'
,
value
:
0.7
,
value
:
0.7
,
unit
:
'm'
,
unit
:
'm'
,
color
:
'#09a8ae'
,
color
:
'#09a8ae'
,
create_time
:
'2022-09-01 10:00'
CreatedAt
:
''
,
show
:
false
},
},
{
{
name
:
'调解池流量'
,
name
:
'调解池流量'
,
prop
:
'
a2
'
,
prop
:
'
调解池流量
'
,
value
:
1
,
value
:
0
,
unit
:
'm
^
3/h'
,
unit
:
'm3/h'
,
color
:
'#ff6b6b'
,
color
:
'#ff6b6b'
,
create_time
:
'2022-09-01 10:00'
CreatedAt
:
''
,
show
:
false
},
},
{
{
name
:
'出水池流量'
,
name
:
'出水池流量'
,
prop
:
'
a3
'
,
prop
:
'
出水池流量
'
,
value
:
1
,
value
:
0
,
unit
:
'm
^
3/h'
,
unit
:
'm3/h'
,
color
:
'#946fd0'
,
color
:
'#946fd0'
,
create_time
:
'2022-09-01 10:00'
CreatedAt
:
''
,
show
:
false
},
},
{
{
name
:
'厌氧池PH值'
,
name
:
'厌氧池PH值'
,
prop
:
'
a4
'
,
prop
:
'
厌氧池PH值
'
,
value
:
8
,
value
:
0
,
unit
:
''
,
unit
:
''
,
color
:
'#3396fb'
,
color
:
'#3396fb'
,
create_time
:
'2022-09-01 10:00'
CreatedAt
:
''
,
show
:
false
},
},
{
{
name
:
'好氧池PH值'
,
name
:
'好氧池PH值'
,
prop
:
'
a5
'
,
prop
:
'
好氧池PH值
'
,
value
:
8
,
value
:
0
,
unit
:
''
,
unit
:
''
,
color
:
'#28ae09'
,
color
:
'#28ae09'
,
create_time
:
'2022-09-01 10:00'
CreatedAt
:
''
,
show
:
false
},
},
{
{
name
:
'出水池PH值'
,
name
:
'出水池PH值'
,
prop
:
'
a6
'
,
prop
:
'
出水池PH值
'
,
value
:
8
,
value
:
0
,
unit
:
''
,
unit
:
''
,
color
:
'#ffc019'
,
color
:
'#ffc019'
,
create_time
:
'2022-09-01 10:00'
CreatedAt
:
''
,
show
:
false
},
},
{
{
name
:
'好氧池DO值'
,
name
:
'好氧池DO值'
,
prop
:
'
a7
'
,
prop
:
'
好氧池DO值
'
,
value
:
1
,
value
:
0
,
unit
:
'mg/l'
,
unit
:
'mg/l'
,
color
:
'#f8893f'
,
color
:
'#f8893f'
,
create_time
:
'2022-09-01 10:00'
CreatedAt
:
''
,
show
:
false
},
},
{
{
name
:
'MBR池DO值'
,
name
:
'MBR池DO值'
,
prop
:
'
a8
'
,
prop
:
'
MBR池DO值
'
,
value
:
1
,
value
:
0
,
unit
:
'mg/l'
,
unit
:
'mg/l'
,
color
:
'#eb509d'
,
color
:
'#eb509d'
,
create_time
:
'2022-09-01 10:00'
CreatedAt
:
''
,
show
:
false
}
}
],
],
typeList_order
:[
typeList_order
:[
...
@@ -422,11 +430,12 @@
...
@@ -422,11 +430,12 @@
}
}
nextTick
(()
=>
{
nextTick
(()
=>
{
state
.
showBanner
=
true
;
state
.
showBanner
=
true
;
})
})
;
Object
.
assign
(
state
.
detail
,{...
res
.
data
});
Object
.
assign
(
state
.
detail
,{...
res
.
data
});
if
(
state
.
detail
.
type
==
1
){
if
(
state
.
detail
.
type
==
1
){
state
.
tabs
.
find
(
one
=>
one
.
value
==
'process'
).
show
=
true
;
state
.
tabs
.
find
(
one
=>
one
.
value
==
'process'
).
show
=
true
;
}
}
getYewei
();
}
}
});
});
}
}
...
@@ -447,17 +456,32 @@
...
@@ -447,17 +456,32 @@
function
tabActive
(
item
)
{
function
tabActive
(
item
)
{
if
(
state
.
tab
!=
item
.
value
)
{
if
(
state
.
tab
!=
item
.
value
)
{
state
.
tab
=
item
.
value
;
state
.
tab
=
item
.
value
;
state
.
list
.
data
=
[];
state
.
list
.
page
=
1
;
if
(
item
.
value
==
'base'
){
if
(
item
.
value
==
'base'
){
initGauge
();
initGauge
();
getYewei
();
}
}
if
(
item
.
value
==
'history'
){
if
(
item
.
value
==
'monitor'
){
getList
();
// getList();
}
if
(
item
.
value
==
'history'
||
item
.
value
==
'process'
){
getHistoryDataList
();
}
}
if
(
item
.
value
==
'order'
){
if
(
item
.
value
==
'order'
){
getOrderList
();
getOrderList
();
}
}
}
}
}
}
function
getYewei
()
{
api
.
getYewei
({
toilet_id
:
props
.
site_id
}).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
if
(
res
.
data
.
value
){
state
.
detail
.
yewei
=
Number
(
res
.
data
.
value
);
}
}
});
}
function
initGauge
(){
function
initGauge
(){
nextTick
(()
=>
{
nextTick
(()
=>
{
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
@@ -546,7 +570,7 @@
...
@@ -546,7 +570,7 @@
radius
:
"95%"
,
radius
:
"95%"
,
startAngle
:
210
,
startAngle
:
210
,
endAngle
:
-
30
,
endAngle
:
-
30
,
max
:
1
max
:
20
}
}
]
]
};
};
...
@@ -556,8 +580,42 @@
...
@@ -556,8 +580,42 @@
},
500
)
},
500
)
})
})
}
}
function
getList
(){
function
getHistoryDataList
(
page
=
1
){
let
p
=
{
page
:
page
,
page_size
:
state
.
list
.
pageSize
,
toilet_id
:
props
.
site_id
};
if
(
state
.
filter
.
type_name
){
p
.
type_name
=
state
.
filter
.
type_name
;
}
if
(
state
.
filter
.
time
&&
state
.
filter
.
time
[
0
]
&&
state
.
filter
.
time
[
1
]){
p
.
start_time
=
state
.
filter
.
time
[
0
];
p
.
end_time
=
state
.
filter
.
time
[
1
];
}
state
.
list
.
page
=
page
;
api
.
getHistoryDataList
(
p
).
then
((
res
)
=>
{
state
.
typeList
.
forEach
((
item
)
=>
{
item
.
show
=
false
;
item
.
value
=
0
;
item
.
unit
=
''
;
item
.
CreatedAt
=
''
;
});
if
(
res
.
code
==
0
){
if
(
Array
.
isArray
(
res
.
data
.
list
)){
res
.
data
.
list
.
forEach
((
item
)
=>
{
if
(
state
.
typeList
.
find
(
one
=>
one
.
name
==
item
.
typeName
)){
state
.
typeList
.
find
(
one
=>
one
.
name
==
item
.
typeName
).
show
=
true
;
state
.
typeList
.
find
(
one
=>
one
.
name
==
item
.
typeName
).
value
=
item
.
value
;
state
.
typeList
.
find
(
one
=>
one
.
name
==
item
.
typeName
).
unit
=
item
.
unit
;
state
.
typeList
.
find
(
one
=>
one
.
name
==
item
.
typeName
).
CreatedAt
=
myPublic
.
dateFormat
.
format
(
item
.
CreatedAt
);
}
});
state
.
list
.
data
=
res
.
data
.
list
;
state
.
list
.
total
=
res
.
data
.
total
;
}
}
})
}
}
function
getOrderList
(
page
=
1
){
function
getOrderList
(
page
=
1
){
let
p
=
{
let
p
=
{
...
@@ -578,7 +636,7 @@
...
@@ -578,7 +636,7 @@
if
(
Array
.
isArray
(
res
.
data
.
list
)){
if
(
Array
.
isArray
(
res
.
data
.
list
)){
res
.
data
.
list
.
forEach
((
item
)
=>
{
res
.
data
.
list
.
forEach
((
item
)
=>
{
item
.
CreatedAt
=
myPublic
.
dateFormat
.
format
(
item
.
CreatedAt
);
item
.
CreatedAt
=
myPublic
.
dateFormat
.
format
(
item
.
CreatedAt
);
})
})
;
state
.
list
.
data
=
res
.
data
.
list
;
state
.
list
.
data
=
res
.
data
.
list
;
state
.
list
.
total
=
res
.
data
.
total
;
state
.
list
.
total
=
res
.
data
.
total
;
}
}
...
@@ -609,8 +667,8 @@
...
@@ -609,8 +667,8 @@
close
,
close
,
tabActive
,
tabActive
,
typeChange
,
typeChange
,
getList
,
getOrderList
,
getOrderList
,
getHistoryDataList
,
seeDetail
,
seeDetail
,
wcTypeChange
wcTypeChange
}
}
...
...
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