Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yanshouyi-Minipro
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
xinzhedeai
yanshouyi-Minipro
Commits
1d7d4dcc
Commit
1d7d4dcc
authored
Mar 04, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 温度版页面
parent
d8fa4e78
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
339 additions
and
51 deletions
+339
-51
config.js
common/config.js
+2
-3
mixin.js
common/mixin.js
+49
-15
pages.json
pages.json
+7
-0
blueMeasure.vue
pages/home/blueMeasure.vue
+35
-19
home.vue
pages/home/home.vue
+2
-1
version.vue
pages/home/version.vue
+213
-0
login.vue
pages/user/login.vue
+1
-1
fangbao.png
static/image/paokong/fangbao.png
+0
-0
right-arow.png
static/image/paokong/right-arow.png
+0
-0
version-bg.png
static/image/paokong/version-bg.png
+0
-0
wait-bg.png
static/image/paokong/wait-bg.png
+0
-0
wait.png
static/image/paokong/wait.png
+0
-0
water.png
static/image/paokong/water.png
+0
-0
wendu.png
static/image/paokong/wendu.png
+0
-0
index.js
store/index.js
+30
-12
No files found.
common/config.js
View file @
1d7d4dcc
// const BASEURL = 'http://192.168.2.14:8080
';
const
BASEURL
=
'
http://192.168.2.14:8088
'
;
const
BASEURL
=
'
https://ltpk.kuangshanzhixing.cn:8088
'
;
//
const BASEURL = 'https://ltpk.kuangshanzhixing.cn:8088';
const
REQUESTIMEOUT
=
30000
;
const
REQUESTIMEOUT
=
30000
;
export
{
export
{
BASEURL
,
BASEURL
,
REQUESTIMEOUT
REQUESTIMEOUT
...
...
common/mixin.js
View file @
1d7d4dcc
...
@@ -335,27 +335,61 @@ const blueToothMixin = {
...
@@ -335,27 +335,61 @@ const blueToothMixin = {
}
}
// 设置电量值:
// 设置电量值:
const
recBlueResData
=
JSON
.
parse
(
recStr
)
const
recBlueResData
=
JSON
.
parse
(
recStr
)
// console.log('设备检测值:', recBlueResData.angle)
console
.
log
(
'
设备检测值:
'
,
JSON
.
stringify
(
recBlueResData
))
if
(
recBlueResData
.
power1
){
this
.
$store
.
commit
(
'
setPower
'
,
{
const
qiuId
=
recBlueResData
.
id
power1
:
recBlueResData
.
power1
,
const
power1
=
recBlueResData
.
power1
power2
:
recBlueResData
.
power2
,
const
power2
=
recBlueResData
.
power2
qiuId
:
recBlueResData
.
id
const
ks
=
recBlueResData
.
ks
const
ss
=
recBlueResData
.
ss
const
wd
=
recBlueResData
.
wd
if
(
qiuId
){
this
.
$store
.
commit
(
'
setMeasureVal
'
,
{
qiuId
})
})
commonStateCodeDeal
(
2
,
'
监听到设备反馈信息->
电量
'
+
JSON
.
stringify
(
recBlueResData
)
)
commonStateCodeDeal
(
2
,
'
监听到设备反馈信息->
小球ID
'
+
qiuId
)
}
}
// 设置测试值:
if
(
recBlueResData
.
ks
){
if
(
power1
){
const
temp4ks
=
recBlueResData
.
ks
/
100
this
.
$store
.
commit
(
'
setMeasureVal
'
,
{
const
temp4ss
=
recBlueResData
.
ss
/
100
power1
})
commonStateCodeDeal
(
2
,
'
监听到设备反馈信息->仪器电量
'
+
power1
)
}
if
(
power2
){
this
.
$store
.
commit
(
'
setMeasureVal
'
,
{
power2
,
})
commonStateCodeDeal
(
2
,
'
监听到设备反馈信息->小球电量
'
+
power2
)
}
if
(
ks
){
// 孔深
const
temp4ks
=
ks
/
100
this
.
$store
.
commit
(
'
setMeasureVal
'
,
{
this
.
$store
.
commit
(
'
setMeasureVal
'
,
{
actualDepth
:
parseFloat
(
temp4ks
.
toFixed
(
2
)),
// 默认回传单位为cm
actualDepth
:
parseFloat
(
temp4ks
.
toFixed
(
2
)),
// 默认回传单位为cm
})
commonStateCodeDeal
(
2
,
'
监听到设备反馈信息->测量孔深
'
+
temp4ks
)
}
if
(
ss
){
// 水深
const
temp4ss
=
ss
/
100
this
.
$store
.
commit
(
'
setMeasureVal
'
,
{
actualWaterLevel
:
parseFloat
(
temp4ss
.
toFixed
(
2
)),
actualWaterLevel
:
parseFloat
(
temp4ss
.
toFixed
(
2
)),
})
})
commonStateCodeDeal
(
2
,
'
监听到设备反馈信息->测量深度
'
+
JSON
.
stringify
(
recBlueResData
))
commonStateCodeDeal
(
2
,
'
监听到设备反馈信息->测量水深
'
+
temp4ss
)
}
// 接收到监测深度值,回复主机DATAOK
// 设置测试值:
if
(
wd
){
// 温度
const
temp4wd
=
wd
this
.
$store
.
commit
(
'
setMeasureVal
'
,
{
actualHeat
:
parseFloat
(
temp4wd
.
toFixed
(
2
)),
// 默认回传单位为摄氏度
})
commonStateCodeDeal
(
2
,
'
监听到设备反馈信息->测量温度
'
+
temp4wd
)
}
// 接收到监测值,回复主机DATAOK
if
(
ks
||
ss
||
wd
){
blueToother
.
writeBLECharacteristicValue
(
'
DATAOK
'
)
blueToother
.
writeBLECharacteristicValue
(
'
DATAOK
'
)
}
}
});
});
...
...
pages.json
View file @
1d7d4dcc
...
@@ -13,6 +13,13 @@
...
@@ -13,6 +13,13 @@
},
},
"pages"
:
[
"pages"
:
[
//
pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
//
pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/home/version"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
{
"path"
:
"pages/home/home"
,
"path"
:
"pages/home/home"
,
"style"
:
"style"
:
...
...
pages/home/blueMeasure.vue
View file @
1d7d4dcc
...
@@ -71,7 +71,7 @@
...
@@ -71,7 +71,7 @@
</uni-col>
</uni-col>
</uni-row>
</uni-row>
</view>
</view>
<view
class=
"only-read-row unboder"
>
<view
class=
"only-read-row unboder"
v-if=
"['wendu', 'shuishen'].includes(version)"
>
<uni-row
class=
"demo-uni-row mb-10"
>
<uni-row
class=
"demo-uni-row mb-10"
>
<uni-col
:span=
"7"
class=
"_title"
>
<uni-col
:span=
"7"
class=
"_title"
>
<view>
测量孔深度
</view>
<view>
测量孔深度
</view>
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
</uni-row>
</uni-row>
</view>
</view>
<view
class=
"only-read-row unboder"
>
<view
class=
"only-read-row unboder"
v-if=
"['wendu', 'shuishen'].includes(version)"
>
<uni-row
class=
"demo-uni-row mb-10 demo-uni-row-unborder"
>
<uni-row
class=
"demo-uni-row mb-10 demo-uni-row-unborder"
>
<uni-col
:span=
"7"
class=
"_title"
>
<uni-col
:span=
"7"
class=
"_title"
>
<view>
测量孔水位
</view>
<view>
测量孔水位
</view>
...
@@ -96,6 +96,18 @@
...
@@ -96,6 +96,18 @@
</uni-col>
</uni-col>
</uni-row>
</uni-row>
</view>
</view>
<view
class=
"only-read-row unboder wendu"
v-if=
"['wendu'].includes(version)"
>
<uni-row
class=
"demo-uni-row mb-10 demo-uni-row-unborder"
>
<uni-col
:span=
"7"
class=
"_title"
>
<view>
测量温度
</view>
</uni-col>
<uni-col
:span=
"15"
>
<view
class=
"_content"
>
<view>
{{
actualHeat
||
'
-
'
}}
</view>
</view>
</uni-col>
</uni-row>
</view>
<view
class=
"demo-uni-row unboder"
>
<view
class=
"demo-uni-row unboder"
>
<uni-row
class=
"demo-uni-row mb-10"
>
<uni-row
class=
"demo-uni-row mb-10"
>
<uni-col
:span=
"7"
class=
"_title"
>
<uni-col
:span=
"7"
class=
"_title"
>
...
@@ -171,6 +183,7 @@
...
@@ -171,6 +183,7 @@
'
expectedDepth
'
:
''
,
'
expectedDepth
'
:
''
,
'
actualDepth
'
:
''
,
'
actualDepth
'
:
''
,
'
actualWaterLevel
'
:
''
,
'
actualWaterLevel
'
:
''
,
actualHeat
:
''
,
remark
:
''
remark
:
''
},
},
dataList
:
[],
dataList
:
[],
...
@@ -191,7 +204,7 @@
...
@@ -191,7 +204,7 @@
this
.
getDictInfo
()
this
.
getDictInfo
()
},
},
computed
:
{
computed
:
{
...
mapState
([
'
actualDepth
'
,
'
actualWaterLevel
'
])
...
mapState
([
'
actualDepth
'
,
'
actualWaterLevel
'
,
'
actualHeat
'
,
'
version
'
])
},
},
methods
:
{
methods
:
{
openPopup
()
{
openPopup
()
{
...
@@ -210,10 +223,8 @@
...
@@ -210,10 +223,8 @@
this
.
form
[
key
]
=
''
this
.
form
[
key
]
=
''
}
}
this
[
'
form
'
][
'
status
'
]
=
'
0
'
this
[
'
form
'
][
'
status
'
]
=
'
0
'
this
.
$store
.
commit
(
'
setMeasureVal
'
,
{
// 清空测量值
// 清空测量值
actualDepth
:
''
,
this
.
$store
.
commit
(
'
clearMeasureVal
'
)
actualWaterLevel
:
''
})
},
},
gobackDeal
()
{
gobackDeal
()
{
// this.resetForm()
// this.resetForm()
...
@@ -363,7 +374,8 @@
...
@@ -363,7 +374,8 @@
this
.
form
[
'
expectedDepth
'
]
=
res
[
'
expectedDepth
'
]
this
.
form
[
'
expectedDepth
'
]
=
res
[
'
expectedDepth
'
]
this
.
$store
.
commit
(
'
setMeasureVal
'
,
{
this
.
$store
.
commit
(
'
setMeasureVal
'
,
{
actualDepth
:
res
[
'
actualDepth
'
],
actualDepth
:
res
[
'
actualDepth
'
],
actualWaterLevel
:
res
[
'
actualWaterLevel
'
]
actualWaterLevel
:
res
[
'
actualWaterLevel
'
],
actualHeat
:
res
[
'
actualHeat
'
]
})
})
return
return
}
}
...
@@ -372,7 +384,7 @@
...
@@ -372,7 +384,7 @@
})
})
},
},
async
saveData
()
{
// 保存当前表单数据到本地
async
saveData
()
{
let
formFieldArr
=
[
let
formFieldArr
=
[
'
productName
'
,
'
artilleryAreaName
'
,
'
cannonHoleArrayNum
'
,
'
productName
'
,
'
artilleryAreaName
'
,
'
cannonHoleArrayNum
'
,
'
cannonHoleNum
'
,
'
expectedDepth
'
'
cannonHoleNum
'
,
'
expectedDepth
'
...
@@ -392,24 +404,22 @@
...
@@ -392,24 +404,22 @@
return
return
}
}
if
(
!
this
.
actualDepth
||
!
this
.
actualWaterLevel
)
{
//
if (!this.actualDepth || !this.actualWaterLevel) {
showCustomModal
({
//
showCustomModal({
content
:
`孔深水位不能为空`
//
content: `孔深水位不能为空`
})
//
})
return
//
return
}
//
}
this
.
form
[
'
actualDepth
'
]
=
this
.
actualDepth
this
.
form
[
'
actualDepth
'
]
=
this
.
actualDepth
this
.
form
[
'
actualWaterLevel
'
]
=
this
.
actualWaterLevel
this
.
form
[
'
actualWaterLevel
'
]
=
this
.
actualWaterLevel
this
.
form
[
'
actualHeat
'
]
=
this
.
actualHeat
let
res
=
await
saveData
({
let
res
=
await
saveData
({
...
this
.
form
...
this
.
form
})
})
if
(
res
)
{
if
(
res
)
{
// showCustomToast({
// title: '保存成功',
// })
this
.
openPopup
()
this
.
openPopup
()
this
.
resetForm
()
this
.
resetForm
()
}
}
...
@@ -487,7 +497,7 @@
...
@@ -487,7 +497,7 @@
border-bottom
:
none
;
border-bottom
:
none
;
}
}
}
}
.only-read-row
{
.only-read-row
{
background
:
#E3E6EC
!
important
;
background
:
#E3E6EC
!
important
;
height
:
108rpx
;
height
:
108rpx
;
...
@@ -511,6 +521,12 @@
...
@@ -511,6 +521,12 @@
color
:
#000000
;
color
:
#000000
;
}
}
}
}
.wendu
{
&
:after
{
content
:
'摄氏度'
;
width
:
120rpx
;
}
}
::v-deep
.uni-row
::after
{
::v-deep
.uni-row
::after
{
clear
:
both
;
clear
:
both
;
...
...
pages/home/home.vue
View file @
1d7d4dcc
...
@@ -169,7 +169,7 @@
...
@@ -169,7 +169,7 @@
const
header
=
[
'
productName
'
,
'
artilleryAreaName
'
,
'
cannonHoleArrayNum
'
,
const
header
=
[
'
productName
'
,
'
artilleryAreaName
'
,
'
cannonHoleArrayNum
'
,
'
cannonHoleNum
'
,
'
expectedDepth
'
,
'
cannonHoleNum
'
,
'
expectedDepth
'
,
'
actualDepth
'
,
'
actualWaterLevel
'
,
'
actualDepth
'
,
'
actualWaterLevel
'
,
'
afterActualDepth
'
,
'
afterActualWaterLevel
'
,
'
afterActualDepth
'
,
'
afterActualWaterLevel
'
,
'
actualHeat
'
,
'
remark
'
,
'
remark
'
,
];
];
const
headerName
=
{
const
headerName
=
{
...
@@ -182,6 +182,7 @@
...
@@ -182,6 +182,7 @@
actualWaterLevel
:
'
实测水深
'
,
actualWaterLevel
:
'
实测水深
'
,
afterActualDepth
:
'
装药后孔深
'
,
afterActualDepth
:
'
装药后孔深
'
,
afterActualWaterLevel
:
'
装药后水深
'
,
afterActualWaterLevel
:
'
装药后水深
'
,
actualHeat
:
'
实测温度
'
,
remark
:
'
备注
'
remark
:
'
备注
'
};
};
...
...
pages/home/version.vue
0 → 100644
View file @
1d7d4dcc
<
template
>
<view
class=
"wrapper"
>
<view
class=
"body-wrapper"
>
<view
class=
"logo-wrapper"
>
<image
class=
"logoImg"
src=
"/static/image/home/logo.png"
alt=
""
/>
<h3>
露天炮孔测孔仪
</h3>
</view>
<p
class=
"list-item"
@
click=
"navTo('shuishen')"
style=
"margin-top: -14rpx;"
>
<image
src=
"/static/image/paokong/water.png"
alt=
""
/>
<span>
水深版
</span>
<image
class=
"version_bg"
src=
"/static/image/paokong/version-bg.png"
alt=
""
/>
<image
class=
"version_arrow"
src=
"/static/image/paokong/right-arow.png"
alt=
""
/>
</p>
<p
class=
"list-item"
@
click=
"navTo('wendu')"
>
<image
src=
"/static/image/paokong/wendu.png"
alt=
""
/>
<span>
温度版
</span>
<image
class=
"version_bg"
src=
"/static/image/paokong/version-bg.png"
alt=
""
/>
<image
class=
"version_arrow"
src=
"/static/image/paokong/right-arow.png"
alt=
""
/>
</p>
<p
class=
"list-item"
@
click=
"navTo('wait')"
>
<image
src=
"/static/image/paokong/wait.png"
alt=
""
/>
<span>
防爆版
</span>
<image
class=
"version_bg"
src=
"/static/image/paokong/wait-bg.png"
alt=
""
/>
</p>
<p
class=
"list-item"
@
click=
"navTo('wait')"
>
<image
src=
"/static/image/paokong/wait.png"
alt=
""
/>
<span>
敬请期待
</span>
<image
class=
"version_bg"
src=
"/static/image/paokong/wait-bg.png"
alt=
""
/>
</p>
<p
class=
"list-item"
@
click=
"navTo('wait')"
>
<image
src=
"/static/image/paokong/wait.png"
alt=
""
/>
<span>
敬请期待
</span>
<image
class=
"version_bg"
src=
"/static/image/paokong/wait-bg.png"
alt=
""
/>
</p>
<view
class=
"footer"
>
<span>
威海晶合数字矿山技术有限公司
</span>
</view>
</view>
</view>
</
template
>
<
script
>
import
{
stringToBytes
,
showCustomModal
,
showCustomToast
,
commonStateCodeDeal
,
popup
,
storager
,
pager
,
blueToother
}
from
"
../../common/util.js
"
import
*
as
XLSX
from
'
@/common/excel.js
'
import
{
getExportData
,
}
from
'
../../api/home.js
'
import
{
getDict
}
from
'
../../api/blueToothMeasure.js
'
import
{
BASEURL
}
from
"
../../common/config.js
"
;
import
{
mapState
}
from
"
vuex
"
;
console
.
log
(
'
mapState
'
,
mapState
)
export
default
{
data
()
{
return
{
deviceInfo
:
{},
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
uni
.
hideLoading
()
},
onShow
()
{
uni
.
hideLoading
()
},
mounted
()
{
uni
.
hideTabBar
()
},
computed
:{
},
methods
:
{
navTo
(
flag
)
{
if
(
flag
===
'
wait
'
)
{
showCustomToast
({
title
:
'
敬请期待
'
})
return
}
storager
.
set
(
'
version
'
,
flag
)
this
.
$store
.
commit
(
'
setVersion
'
,
flag
)
pager
.
navTo
(
'
/pages/home/home
'
)
}
}
}
</
script
>
<
style
lang=
"scss"
>
.wrapper
{
width
:
100vw
;
height
:
calc
(
100vh-55rpx
);
padding-top
:
55rpx
;
background
:
linear-gradient
(
180deg
,
#007AFF
0%
,
#419AFF
16%
,
#EFF1F4
43%
);
position
:
relative
;
.footer
{
width
:
100%
;
text-align
:
center
;
span
{
font-weight
:
400
;
font-size
:
27rpx
;
color
:
#A0A7AE
;
}
}
}
.body-wrapper
{
display
:
flex
;
justify-content
:
center
;
flex-direction
:
column
;
align-items
:
center
;
gap
:
20rpx
;
background-color
:
linear-gradient
(
180deg
,
#007AFF
0%
,
#419AFF
16%
,
#EFF1F4
43%
);
padding-top
:
50rpx
;
padding-bottom
:
20rpx
;
}
.logo-wrapper
{
position
:
relative
;
height
:
300rpx
;
display
:
flex
;
justify-content
:
center
;
flex-direction
:
column
;
align-items
:
center
;
gap
:
50rpx
;
font-family
:
Source
Han
Sans
SC
;
.logoImg
{
width
:
454rpx
;
height
:
98rpx
;
}
h3
{
color
:
#ffffff
;
font-size
:
37rpx
;
font-weight
:
bold
;
}
}
.list-item
{
width
:
660rpx
;
height
:
140rpx
;
// border-top: 1px solid rgba(187,187,187,1);
background-image
:
url(/static/image/paokong/version-bg.png)
;
display
:
flex
;
justify-content
:
flex-start
;
align-items
:
center
;
gap
:
0px
20px
;
padding
:
10px
;
background-color
:
#ffffff
;
border-radius
:
10rpx
;
padding-left
:
40rpx
;
background
:
linear-gradient
(
270deg
,
#E0EEFF
0%
,
#FFFFFF
100%
);
box-shadow
:
0rpx
2rpx
47rpx
4rpx
rgba
(
7
,
36
,
72
,
0
.1
);
border-radius
:
10rpx
;
.version_bg
{
width
:
119rpx
;
height
:
136rpx
;
position
:
absolute
;
right
:
140rpx
;
}
image
:nth-child
(
1
)
{
width
:
49rpx
;
height
:
57rpx
;
}
.version_arrow
{
width
:
19rpx
;
height
:
30rpx
;
margin-left
:
40rpx
;
}
span
{
display
:
inline-block
;
width
:
420rpx
;
font-family
:
PingFangSC-regular
;
color
:
rgba
(
0
,
0
,
0
,
1
);
font-size
:
18px
;
font-weight
:
bold
;
}
.funcBtn
{
width
:
120rpx
;
height
:
62rpx
;
line-height
:
62rpx
;
background
:
#FFFFFF
;
border-radius
:
36rpx
;
border
:
2rpx
solid
#007AFF
;
color
:
#007AFF
;
padding
:
0
;
// font-size: 27rp;
font-family
:
Source
Han
Sans
SC
;
font-weight
:
bold
;
}
}
</
style
>
\ No newline at end of file
pages/user/login.vue
View file @
1d7d4dcc
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
if
(
res
)
{
if
(
res
)
{
storager
.
set
(
'
token
'
,
res
.
token
)
storager
.
set
(
'
token
'
,
res
.
token
)
console
.
log
(
'
获取token
'
,
res
.
token
)
console
.
log
(
'
获取token
'
,
res
.
token
)
pager
.
relaunchTo
(
'
/pages/home/
home
'
)
pager
.
relaunchTo
(
'
/pages/home/
version
'
)
}
}
},
},
async
getExistedUser
()
{
async
getExistedUser
()
{
...
...
static/image/paokong/fangbao.png
0 → 100644
View file @
1d7d4dcc
1.1 KB
static/image/paokong/right-arow.png
0 → 100644
View file @
1d7d4dcc
519 Bytes
static/image/paokong/version-bg.png
0 → 100644
View file @
1d7d4dcc
69.8 KB
static/image/paokong/wait-bg.png
0 → 100644
View file @
1d7d4dcc
14.6 KB
static/image/paokong/wait.png
0 → 100644
View file @
1d7d4dcc
1.48 KB
static/image/paokong/water.png
0 → 100644
View file @
1d7d4dcc
947 Bytes
static/image/paokong/wendu.png
0 → 100644
View file @
1d7d4dcc
1.91 KB
store/index.js
View file @
1d7d4dcc
...
@@ -25,27 +25,46 @@ const store = createStore({
...
@@ -25,27 +25,46 @@ const store = createStore({
// univerifyErrorMsg: ''
// univerifyErrorMsg: ''
actualDepth
:
0
,
// 孔深
actualDepth
:
0
,
// 孔深
actualWaterLevel
:
0
,
// 水深
actualWaterLevel
:
0
,
// 水深
actualHeat
:
0
,
// 温度
power1
:
0
,
power1
:
0
,
power2
:
0
,
power2
:
0
,
qiuId
:
''
,
qiuId
:
''
,
connected
:
false
,
connected
:
false
,
blueConnectLoading
:
false
,
blueConnectLoading
:
false
,
version
:
'
shuishen
'
// 系统版本 默认水深
},
},
mutations
:
{
mutations
:
{
setMeasureVal
(
state
,
testRes
){
setMeasureVal
(
state
,
testRes
){
state
.
actualDepth
=
testRes
.
actualDepth
if
(
testRes
.
power1
){
// 仪器电量
state
.
actualWaterLevel
=
testRes
.
actualWaterLevel
state
.
power1
=
testRes
.
power1
},
}
setPower
(
state
,
testRes
){
if
(
testRes
.
power2
){
// 小球电量
state
.
power1
=
testRes
.
power1
state
.
power2
=
testRes
.
power2
state
.
power2
=
testRes
.
power2
}
state
.
qiuId
=
testRes
.
qiuId
if
(
testRes
.
qiuId
){
// 小球Id
state
.
qiuId
=
testRes
.
qiuId
}
if
(
testRes
.
actualDepth
){
// 实测孔深
state
.
actualDepth
=
testRes
.
actualDepth
}
if
(
testRes
.
actualWaterLevel
){
// 实测孔深
state
.
actualWaterLevel
=
testRes
.
actualWaterLevel
}
if
(
testRes
.
actualHeat
){
// 实测孔深
state
.
actualHeat
=
testRes
.
actualHeat
}
},
},
setLinked
(
state
,
flag
){
setLinked
(
state
,
flag
){
state
.
connected
=
flag
state
.
connected
=
flag
if
(
!
flag
){
// 断开链接时,清空store的测量值
if
(
!
flag
){
// 断开链接时,清空store的测量值
// 水深版
state
.
actualDepth
=
''
state
.
actualDepth
=
''
state
.
actualWaterLevel
=
''
state
.
actualWaterLevel
=
''
// 温度版
state
.
actualHeat
=
''
// 电量
state
.
power1
=
''
state
.
power1
=
''
state
.
power2
=
''
state
.
power2
=
''
state
.
qiuId
=
''
state
.
qiuId
=
''
...
@@ -53,12 +72,11 @@ const store = createStore({
...
@@ -53,12 +72,11 @@ const store = createStore({
},
},
setBlueConnectLoading
(
state
,
flag
){
setBlueConnectLoading
(
state
,
flag
){
state
.
blueConnectLoading
=
flag
state
.
blueConnectLoading
=
flag
}
}
,
// login(state, provider) {
setVersion
(
state
,
version
)
{
// state.hasLogin = true;
state
.
version
=
version
;
// state.loginProvider = provider;
},
// },
// logout(state) {
// logout(state) {
// state.hasLogin = false
// state.hasLogin = false
// state.openid = null
// state.openid = null
...
...
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