|
@@ -78,7 +78,7 @@
|
|
|
import Diagram from '../../components/diagram/Diagram.vue'
|
|
|
import wellPatrolAPI from '../../api/wellPatrol.js'
|
|
|
import wellParamAPI from '../../api/wellParam.js'
|
|
|
- import tempAPI from '../../api/multiTabTemp.js'
|
|
|
+ import tempAPI from '../../api/tempMgr.js'
|
|
|
import { storeToRefs } from 'pinia'
|
|
|
import { useHomeStore } from '../../store/home.js'
|
|
|
import utils from '@/utils/utils.js'
|
|
@@ -204,8 +204,8 @@
|
|
|
const patrolData=ref({})
|
|
|
const patrolAlarm=ref({})
|
|
|
const loadSingleData=(wellId)=>{
|
|
|
- wellPatrolAPI.loadData(wellId).then(resp=>{
|
|
|
- //console.log(resp)
|
|
|
+ wellPatrolAPI.loadDynParamData(wellId).then(resp=>{
|
|
|
+ console.log(resp)
|
|
|
if(resp.code!=0||!resp.data){
|
|
|
ElMessage.error(resp.msg||'未获取到实时数据')
|
|
|
return
|
|
@@ -220,6 +220,32 @@
|
|
|
}
|
|
|
|
|
|
const loadWellParam=(wellId)=>{
|
|
|
+ wellPatrolAPI.loadWellDynParamTemp(wellId).then(resp=>{
|
|
|
+ //console.log(resp)
|
|
|
+ if(resp.code!=0){
|
|
|
+ ElMessage.error(resp.msg||'获取动态参数模板失败')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(!resp.data || !resp.data.temp){
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ let tempDtl=JSON.parse(resp.data.temp.tempContent)
|
|
|
+ let unitMap=resp.data.units||{}
|
|
|
+ tempDtl.forEach(param=>{
|
|
|
+ param.displayUnit=unitMap[param.paramCode]||''
|
|
|
+ })
|
|
|
+
|
|
|
+ singleParams.value=tempDtl
|
|
|
+
|
|
|
+ nextTick(()=>{
|
|
|
+ loadSingleData(wellId)
|
|
|
+ })
|
|
|
+
|
|
|
+ }).catch(err=>{
|
|
|
+
|
|
|
+ })
|
|
|
+
|
|
|
wellParamAPI.loadWellParam(wellId).then(resp=>{
|
|
|
|
|
|
if(resp.code!=0){
|
|
@@ -227,12 +253,13 @@
|
|
|
return
|
|
|
}
|
|
|
diagramParams.value=resp.data.filter(param=>param.paramCode.indexOf('diagram')>=0)
|
|
|
+ /*
|
|
|
singleParams.value = resp.data.filter(param=>param.paramCode.indexOf('diagram')<0)
|
|
|
|
|
|
nextTick(()=>{
|
|
|
loadSingleData(wellId)
|
|
|
singleTimer=setInterval(()=>{loadSingleData(wellId)},30000)
|
|
|
- })
|
|
|
+ })*/
|
|
|
|
|
|
}).catch(err=>{
|
|
|
|
|
@@ -259,7 +286,6 @@
|
|
|
}
|
|
|
let tempDtl=JSON.parse(resp.data.temp.tempContent)
|
|
|
bindParamUnit(tempDtl,resp.data.units)
|
|
|
-
|
|
|
mixgroupCurveComp.value.init(tempDtl)
|
|
|
mixgroupCurveComp.value.drawMain()
|
|
|
|