【类 型】:fix

【主	题】:刷新飞机操作页面时 取一次飞机的状态码 飞机有更新时去一次状态码
【描	述】:
	[原因]:刷新页面之后 实时更新飞机的状态
	[过程]:
	[影响]:
【结	束】

# 类型 包含:
# feat:新功能(feature)
# fix:修补bug
# docs:文档(documentation)
# style: 格式(不影响代码运行的变动)
# refactor:重构(即不是新增功能,也不是修改bug的代码变动)
# test:增加测试
# chore:构建过程或辅助工具的变动
This commit is contained in:
tk 2024-07-10 19:10:42 +08:00
parent 3d47d2c32e
commit 6f83434965
3 changed files with 13 additions and 2 deletions

View File

@ -70,7 +70,7 @@
<el-button-group> <el-button-group>
<el-button size="mini" class="f-s-14" v-if="planeState & 1 && airLock" key="pubBut" type="info" <el-button size="mini" class="f-s-14" v-if="planeState & 1 && airLock" key="pubBut" type="info"
icon="iconfont el-icon-loading" disabled> icon="iconfont el-icon-loading" disabled>
<font class="m-l-5">航线锁定</font> <font class="m-l-5">注册航线</font>
</el-button> </el-button>
<el-button size="mini" class="f-s-14" v-if="planeState & 1 && !airLock" type="primary" <el-button size="mini" class="f-s-14" v-if="planeState & 1 && !airLock" type="primary"
icon="f-s-14 iconfont icon-chakanzhihangrizhi" @click="checkQuest"> icon="f-s-14 iconfont icon-chakanzhihangrizhi" @click="checkQuest">
@ -639,6 +639,8 @@ export default {
} }
}, },
created () { created () {
//
// 线 airLock
if (this.siteList && this.routeList) { if (this.siteList && this.routeList) {
this.airLock = this.siteList.some(item => { this.airLock = this.siteList.some(item => {
if (item.runing) { if (item.runing) {
@ -648,6 +650,8 @@ export default {
return false return false
}) })
} }
//
this.publishFun('{getPlaneState:1}')
}, },
watch: { watch: {
airLock (val) { airLock (val) {
@ -674,6 +678,12 @@ export default {
if (!found) { if (!found) {
this.questForm.id = '' this.questForm.id = ''
} }
},
plane (val) {
this.publishFun('{getPlaneState:1}')
},
planeState (val) {
console.log(val)
} }
} }

View File

@ -1,3 +1,4 @@
/** /**
* Parse the time to string * Parse the time to string
* @param {(Object|string|number)} time * @param {(Object|string|number)} time

View File

@ -91,7 +91,7 @@ export default {
this.form.upFile = '' this.form.upFile = ''
}, },
handleUpSuccess (res) { handleUpSuccess (res) {
this.$refs.mapbox.makeRoute(res.content)// 线 this.$refs.mapbox.makeRoute(res.content.questAss)// 线
if (res.status === 0) { if (res.status === 0) {
this.fileList = [] this.fileList = []
this.$message.error(res.msg) this.$message.error(res.msg)