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
65cd7448
Commit
65cd7448
authored
Jan 07, 2025
by
方建宇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
计量站工艺图
parent
3ec2b72e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
501 additions
and
32 deletions
+501
-32
MeasurementArt.vue
src/components/art/MeasurementArt.vue
+67
-32
measureArt.js
src/dataJson/RealPage/measureArt.js
+434
-0
No files found.
src/components/art/MeasurementArt.vue
View file @
65cd7448
...
@@ -33,7 +33,8 @@ import { ref, reactive, onMounted, onUnmounted } from 'vue';
...
@@ -33,7 +33,8 @@ import { ref, reactive, onMounted, onUnmounted } from 'vue';
import
{
useRoute
}
from
'vue-router'
import
{
useRoute
}
from
'vue-router'
import
store
from
"../../store/index"
;
import
store
from
"../../store/index"
;
import
http
from
'../../api/http'
;
import
http
from
'../../api/http'
;
import
{
weatherArt
}
from
'../../dataJson/RealPage/boilerArt'
;
import
{
pipeRealArt
}
from
'../../dataJson/RealPage/measureArt'
;
const
props
=
defineProps
([
'id'
,
'refreshTime'
]);
const
props
=
defineProps
([
'id'
,
'refreshTime'
]);
const
route
=
useRoute
()
const
route
=
useRoute
()
const
Pipe
=
ref
();
const
Pipe
=
ref
();
...
@@ -83,7 +84,6 @@ const BackFlowSum = ref();
...
@@ -83,7 +84,6 @@ const BackFlowSum = ref();
getSupplysList
();
getSupplysList
();
function
getSupplysList
()
{
function
getSupplysList
()
{
var
result
=
store
.
getters
.
getEnterprise
();
var
result
=
store
.
getters
.
getEnterprise
();
console
.
log
(
result
);
if
(
result
)
{
if
(
result
)
{
result
.
forEach
(
element
=>
{
result
.
forEach
(
element
=>
{
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
if
(
element
.
enterpriseId
===
enterpriseId
.
value
)
{
...
@@ -112,40 +112,75 @@ function getSupplysList() {
...
@@ -112,40 +112,75 @@ function getSupplysList() {
}
}
//获取气象实时数据
//获取气象实时数据
// function getweather() {
// http.post("/api/weather/Real", SupplyId.value).then((result) => {
// temperature.value = result.data["temperature"];
// wind.value = result.data["wind"];
// illumination.value = result.data["illumination"];
// humidity.value = result.data["humidity"];
// })
// }
function
getweather
()
{
function
getweather
()
{
http
.
post
(
"/api/weather/Real"
,
SupplyId
.
value
).
then
((
result
)
=>
{
temperature
.
value
=
weatherArt
.
data
[
"temperature"
];
temperature
.
value
=
result
.
data
[
"temperature"
];
wind
.
value
=
weatherArt
.
data
[
"wind"
];
wind
.
value
=
result
.
data
[
"wind"
];
illumination
.
value
=
weatherArt
.
data
[
"illumination"
];
illumination
.
value
=
result
.
data
[
"illumination"
];
humidity
.
value
=
weatherArt
.
data
[
"humidity"
];
humidity
.
value
=
result
.
data
[
"humidity"
];
})
}
}
getPipeData
();
getPipeData
();
//获取计量站实时数据
// //获取计量站实时数据
// function getPipeData() {
// let deviceType = 8;
// http.post("/api/pipe/Real", { "enterpriseId": enterpriseId.value, "deviceType": deviceType }).then((result) => {
// // console.log(JSON.stringify(result));
// result.data.title.forEach(element => {
// result.data.realData.forEach(item => {
// if (item.id === id.value) {
// PipeData[element.enName] = item[element.enName[0].toLowerCase() + element.enName.substring(1)];
// }
// })
// })
// SupplyClearPressure.value = PipeData["SupplyClearPressure"];
// SupplyValuePressure.value = PipeData["SupplyValuePressure"];
// FirstInTemp.value = PipeData["FirstInTemp"];
// SupplyFlow.value = PipeData["SupplyFlow"];
// SupplyFlowSum.value = PipeData["SupplyFlowSum"];
// SupplyHeat.value = PipeData["SupplyHeat"];
// SupplyHeatSum.value = PipeData["SupplyHeatSum"];
// FirstOutTemp.value = PipeData["FirstOutTemp"];
// BackClearPressure.value = PipeData["BackClearPressure"];
// BackFlow.value = PipeData["BackFlow"];
// BackFlowSum.value = PipeData["BackFlowSum"];
// })
// }
//静态
function
getPipeData
()
{
function
getPipeData
()
{
let
deviceType
=
8
;
pipeRealArt
.
title
.
forEach
(
element
=>
{
http
.
post
(
"/api/pipe/Real"
,
{
"enterpriseId"
:
enterpriseId
.
value
,
"deviceType"
:
deviceType
}).
then
((
result
)
=>
{
pipeRealArt
.
realData
.
forEach
(
item
=>
{
console
.
log
(
result
);
PipeData
[
element
.
enName
]
=
item
[
element
.
enName
];
result
.
data
.
title
.
forEach
(
element
=>
{
});
result
.
data
.
realData
.
forEach
(
item
=>
{
});
if
(
item
.
id
===
id
.
value
)
{
// SupplyClearPressure.value = PipeData["SupplyClearPressure"];
PipeData
[
element
.
enName
]
=
item
[
element
.
enName
[
0
].
toLowerCase
()
+
element
.
enName
.
substring
(
1
)];
// SupplyValuePressure.value = PipeData["SupplyValuePressure"];
}
// FirstInTemp.value = PipeData["FirstInTemp"];
})
// SupplyFlow.value = PipeData["SupplyFlow"];
})
// SupplyFlowSum.value = PipeData["SupplyFlowSum"];
SupplyClearPressure
.
value
=
PipeData
[
"SupplyClearPressure"
];
// SupplyHeat.value = PipeData["SupplyHeat"];
SupplyValuePressure
.
value
=
PipeData
[
"SupplyValuePressure"
];
// SupplyHeatSum.value = PipeData["SupplyHeatSum"];
FirstInTemp
.
value
=
PipeData
[
"FirstInTemp"
];
// FirstOutTemp.value = PipeData["FirstOutTemp"];
SupplyFlow
.
value
=
PipeData
[
"SupplyFlow"
];
// BackClearPressure.value = PipeData["BackClearPressure"];
SupplyFlowSum
.
value
=
PipeData
[
"SupplyFlowSum"
];
// BackFlow.value = PipeData["BackFlow"];
SupplyHeat
.
value
=
PipeData
[
"SupplyHeat"
];
// BackFlowSum.value = PipeData["BackFlowSum"];
SupplyHeatSum
.
value
=
PipeData
[
"SupplyHeatSum"
];
SupplyClearPressure
.
value
=
0.84
;
FirstOutTemp
.
value
=
PipeData
[
"FirstOutTemp"
];
SupplyValuePressure
.
value
=
0
;
BackClearPressure
.
value
=
PipeData
[
"BackClearPressure"
];
FirstInTemp
.
value
=
87.2
;
BackFlow
.
value
=
PipeData
[
"BackFlow"
];
SupplyFlow
.
value
=
1197
;
BackFlowSum
.
value
=
PipeData
[
"BackFlowSum"
];
SupplyFlowSum
.
value
=
36897000
;
})
SupplyHeat
.
value
=
235.27
;
SupplyHeatSum
.
value
=
6602950
;
FirstOutTemp
.
value
=
38.7
;
BackClearPressure
.
value
=
0.33
;
BackFlow
.
value
=
1119
;
BackFlowSum
.
value
=
4284070
;
}
}
setInterval
(()
=>
{
setInterval
(()
=>
{
getPipeData
();
getPipeData
();
...
...
src/dataJson/RealPage/measureArt.js
0 → 100644
View file @
65cd7448
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