Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
Nei_Meng_An_Jian_4
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Kimber
Nei_Meng_An_Jian_4
Commits
3e8ed2e3
Commit
3e8ed2e3
authored
Nov 16, 2021
by
liuyuping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'2021-11-16'
parent
82032d57
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
728 additions
and
58 deletions
+728
-58
weikuangku.js
src/api/weikuangku.js
+179
-0
table.vue
src/components/wkk_environment/table.vue
+89
-30
item.vue
src/components/wkk_item/item.vue
+460
-28
No files found.
src/api/weikuangku.js
View file @
3e8ed2e3
...
@@ -10,6 +10,29 @@ export function environment(data) {
...
@@ -10,6 +10,29 @@ export function environment(data) {
});
});
}
}
// 获取所有设备标志
export
function
findAllDeviceId
(
companyCode
)
{
return
request5
({
url
:
"
api/environment/findAllDeviceId
"
,
method
:
"
get
"
,
params
:
{
companyCode
}
})
}
// 获取监测数据趋势
export
function
analyzeTrend
(
companyCode
,
deviceId
)
{
return
request5
({
url
:
'
api/environment/analyzeTrend
'
,
method
:
"
get
"
,
params
:
{
companyCode
,
deviceId
}
})
}
// 降雨量
// 降雨量
export
function
jiangYuLiang
(
data
)
{
export
function
jiangYuLiang
(
data
)
{
return
request5
({
return
request5
({
...
@@ -119,3 +142,159 @@ export function wkkAlarm(data) {
...
@@ -119,3 +142,159 @@ export function wkkAlarm(data) {
params
:
data
params
:
data
});
});
}
}
// 降雨量 -- 获取指定企业所有监测站
export
function
getAllSensorNamesINJYL
(
companyCode
)
{
return
request5
({
url
:
"
api/wkkJiangYuLiang/getAllSensorNames
"
,
method
:
"
get
"
,
params
:
{
companyCode
}
})
}
// 降雨量 -- 分析监测数据趋势
export
function
analyzeTrendINJYL
(
companyCode
,
sensorName
)
{
return
request5
({
url
:
"
api/wkkJiangYuLiang/analyzeTrend
"
,
method
:
"
get
"
,
params
:
{
companyCode
,
sensorName
}
})
}
// 浸润线 -- 获取企业所有监测站
export
function
getAllSensorNamesINJRX
(
companyCode
)
{
return
request5
({
url
:
"
api/wkkJinRunXian/getAllSensorNames
"
,
method
:
"
get
"
,
params
:
{
companyCode
}
})
}
// 浸润线 -- 分析监测数据趋势
export
function
analyzeTrendINJRX
(
companyCode
,
sensorName
)
{
return
request5
({
url
:
"
api/wkkJinRunXian/analyzeTrend
"
,
method
:
"
get
"
,
params
:
{
companyCode
,
sensorName
}
})
}
// 库水位 -- 获取企业所有监测站
export
function
getAllSensorNamesINKSW
(
companyCode
)
{
return
request5
({
url
:
"
api/wkkKuShuiWei/getAllSensorNames
"
,
method
:
"
get
"
,
params
:
{
companyCode
}
})
}
// 库水位 -- 分析监测数据趋势
export
function
analyzeTrendINKSW
(
companyCode
,
sensorName
)
{
return
request5
({
url
:
"
api/wkkKuShuiWei/analyzeTrend
"
,
method
:
"
get
"
,
params
:
{
companyCode
,
sensorName
}
})
}
// 干滩 -- 获取企业所有监测站
export
function
getAllSeonsorNamesINGT
(
companyCode
)
{
return
request5
({
url
:
"
api/wkkGanTan/getAllSensorNames
"
,
method
:
"
get
"
,
params
:
{
companyCode
}
})
}
// 干滩 -- 分析监测数据趋势
export
function
analyzeTrendINGT
(
companyCode
,
sensorName
)
{
return
request5
({
url
:
"
api/wkkGanTan/analyzeTrend
"
,
method
:
"
get
"
,
params
:
{
companyCode
,
sensorName
}
})
}
// 表面位移 -- 获取企业所有监测站
export
function
getAllSensorNamesINBMWY
(
companyCode
)
{
return
request5
({
url
:
"
api/wkkBiaoMianWeiYi/getAllSensorNames
"
,
method
:
"
get
"
,
params
:
{
companyCode
}
})
}
// 表面位移 -- 分析监测数据趋势
export
function
analyzeTrendINBMWY
(
companyCode
,
sensorName
)
{
return
request5
({
url
:
"
api/wkkBiaoMianWeiYi/analyzeTrend
"
,
method
:
"
get
"
,
params
:
{
companyCode
,
sensorName
}
})
}
// 内部位移沉降 -- 获取指定企业所有检测站
export
function
getAllSensorNamesINNBWYCJ
(
companyCode
)
{
return
request5
({
url
:
"
api/wkkNeiBuWeiYiChenJiang/getAllSensorNames
"
,
method
:
"
get
"
,
params
:
{
companyCode
}
})
}
// 内部位移沉降 -- 分析监测数据趋势
export
function
analyzeTrendINNBWYCJ
(
companyCode
,
sensorName
)
{
return
request5
({
url
:
"
api/wkkNeiBuWeiYiChenJiang/analyzeTrend
"
,
method
:
"
get
"
,
params
:
{
companyCode
,
sensorName
}
})
}
// 内部位移倾斜 -- 获取指定企业所有监测站
export
function
getAllSensorNamesINNBWYQX
(
companyCode
)
{
return
request5
({
url
:
"
api/neiBuWeiYiQingXie/getAllSensorNames
"
,
method
:
"
get
"
,
params
:
{
companyCode
}
})
}
// 内部位移倾斜 -- 分析监测数据趋势
export
function
analyzeTrendINNBWYQX
(
companyCode
,
sensorName
)
{
return
request5
({
url
:
"
api/neiBuWeiYiQingXie/analyzeTrend
"
,
method
:
"
get
"
,
params
:
{
companyCode
,
sensorName
}
})
}
\ No newline at end of file
src/components/wkk_environment/table.vue
View file @
3e8ed2e3
...
@@ -17,14 +17,15 @@
...
@@ -17,14 +17,15 @@
<div
class=
"tools-wrapper"
>
<div
class=
"tools-wrapper"
>
<div
class=
"device-wrapper"
>
<div
class=
"device-wrapper"
>
<span>
设备标识:
</span>
<span>
设备标识:
</span>
<el-select>
<el-select
v-model=
"curSelectDeviceId"
placeholder=
"请选择设备"
@
change=
"changeDevice"
>
<el-option
label=
"400中段风速"
value=
"400中段风速"
></el-option>
<el-option
<el-option
label=
"2 5 0 进风巷 风速"
value=
"2 5 0 进风巷 风速"
></el-option>
v-for=
"item in deviceIds"
<el-option
label=
"3 0 0 进风巷 风速"
value=
"3 0 0 进风巷 风速"
></el-option>
:key=
"item"
<el-option
label=
"7 1线温度"
value=
"7 1线温度"
></el-option>
:label=
"item"
<el-option
label=
"71二氧化碳"
value=
"71二氧化碳"
></el-option>
:value=
"item"
></el-option>
</el-select>
</el-select>
<el-button
type=
"success"
size=
"medium"
>
查询
</el-button>
<el-button
type=
"success"
size=
"medium"
@
click=
"queryCore"
>
查询
</el-button>
</div>
</div>
<div
class=
"switch-wrapper"
>
<div
class=
"switch-wrapper"
>
<el-button
type=
"primary"
size=
"medium"
@
click.stop=
"clickToSwitchTable"
>
切换
</el-button>
<el-button
type=
"primary"
size=
"medium"
@
click.stop=
"clickToSwitchTable"
>
切换
</el-button>
...
@@ -57,7 +58,7 @@
...
@@ -57,7 +58,7 @@
<
script
>
<
script
>
import
{
timeParse
,
randNum
,
getValueUnit
}
from
'
@/utils
'
import
{
timeParse
,
randNum
,
getValueUnit
}
from
'
@/utils
'
import
{
environment
}
from
'
@/api/weikuangku
'
import
{
environment
,
findAllDeviceId
,
analyzeTrend
}
from
'
@/api/weikuangku
'
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
...
@@ -72,11 +73,12 @@ export default {
...
@@ -72,11 +73,12 @@ export default {
itemUnit
:
getValueUnit
(),
itemUnit
:
getValueUnit
(),
// 设备标识
// 设备标识
deviceIds
:
[],
deviceIds
:
[],
// 当前选中的设备
curSelectDeviceId
:
''
,
// 切换
// 切换
switchTable
:
true
switchTable
:
true
}
}
},
},
methods
:
{
methods
:
{
core
()
{
core
()
{
const
compony_info
=
this
.
$store
.
state
.
compony_info
const
compony_info
=
this
.
$store
.
state
.
compony_info
...
@@ -85,9 +87,10 @@ export default {
...
@@ -85,9 +87,10 @@ export default {
page
:
this
.
page
,
page
:
this
.
page
,
size
:
10
,
size
:
10
,
sort
:
'
id,desc
'
,
sort
:
'
id,desc
'
,
deviceId
:
this
.
curSelectDeviceId
,
companycode
:
compony_info
.
companycode
,
companycode
:
compony_info
.
companycode
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
this
.
tableData
=
res
.
content
this
.
tableData
=
[...
res
.
content
]
this
.
total
=
res
.
totalElements
this
.
total
=
res
.
totalElements
})
})
...
@@ -118,25 +121,32 @@ export default {
...
@@ -118,25 +121,32 @@ export default {
},
},
clickToSwitchTable
()
{
clickToSwitchTable
()
{
// 切换图标
if
(
!
this
.
curSelectDeviceId
)
{
this
.
$message
.
error
(
"
请选择设备
"
)
return
}
this
.
switchTable
=
!
this
.
switchTable
this
.
switchTable
=
!
this
.
switchTable
analyzeTrend
(
this
.
$store
.
state
.
compony_info
.
companycode
,
this
.
curSelectDeviceId
).
then
(
res
=>
{
console
.
log
(
res
,
'
res , analyzeTrend
'
)
const
xData
=
res
.
map
(
item
=>
item
.
acquisitionDate
)
const
yData
=
res
.
map
(
item
=>
item
.
value
)
// 切换图标
if
(
this
.
switchTable
===
false
)
{
if
(
this
.
switchTable
===
false
)
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
// 画图表
// 画图表
console
.
log
(
echarts
,
'
有echarts吗
'
)
const
mychart
=
echarts
.
init
(
document
.
getElementById
(
'
enterStatistics
'
))
const
mychart
=
echarts
.
init
(
document
.
getElementById
(
'
enterStatistics
'
))
mychart
.
clear
()
mychart
.
clear
()
const
option
=
{
const
option
=
{
xAxis
:
{
xAxis
:
{
type
:
'
category
'
,
type
:
'
category
'
,
data
:
[
'
19:17
'
,
'
20:20
'
,
'
20:40
'
,
'
21:30
'
,
'
21:45
'
,
'
21:50
'
,
'
21:55
'
,
'
22:00
'
,
'
22:11
'
]
data
:
xData
},
},
yAxis
:
{
yAxis
:
{
type
:
'
value
'
type
:
'
value
'
},
},
series
:
[
series
:
[
{
{
data
:
[
150
,
230
,
224
,
118
,
110
,
55
,
280
,
360
,
780
]
,
data
:
yData
,
type
:
'
line
'
type
:
'
line
'
}
}
]
]
...
@@ -144,6 +154,46 @@ export default {
...
@@ -144,6 +154,46 @@ export default {
mychart
.
setOption
(
option
)
mychart
.
setOption
(
option
)
})
})
}
}
})
},
changeDevice
()
{
if
(
this
.
switchTable
===
false
)
{
analyzeTrend
(
this
.
$store
.
state
.
compony_info
.
companycode
,
this
.
curSelectDeviceId
).
then
(
res
=>
{
console
.
log
(
res
,
'
res , analyzeTrend
'
)
const
xData
=
res
.
map
(
item
=>
item
.
acquisitionDate
)
const
yData
=
res
.
map
(
item
=>
item
.
value
)
// 切换图标
if
(
this
.
switchTable
===
false
)
{
this
.
$nextTick
(()
=>
{
// 画图表
const
mychart
=
echarts
.
init
(
document
.
getElementById
(
'
enterStatistics
'
))
mychart
.
clear
()
const
option
=
{
xAxis
:
{
type
:
'
category
'
,
data
:
xData
},
yAxis
:
{
type
:
'
value
'
},
series
:
[
{
data
:
yData
,
type
:
'
line
'
}
]
}
mychart
.
setOption
(
option
)
})
}
})
}
},
queryCore
()
{
this
.
core
()
}
}
},
},
...
@@ -157,6 +207,15 @@ export default {
...
@@ -157,6 +207,15 @@ export default {
is_show_huan_jing_jian_ce_table
()
{
is_show_huan_jing_jian_ce_table
()
{
this
.
core
()
this
.
core
()
},
},
dialogVisible
(
newVal
,
oldVal
)
{
if
(
newVal
===
true
)
{
findAllDeviceId
(
this
.
$store
.
state
.
compony_info
.
companycode
).
then
(
res
=>
{
this
.
deviceIds
=
[...
res
]
})
}
}
},
},
}
}
</
script
>
</
script
>
...
...
src/components/wkk_item/item.vue
View file @
3e8ed2e3
This diff is collapsed.
Click to expand it.
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