提交 8ecf2737 作者: 温凯

refactor(MMCFlightControlCenter): 优化代码格式和逻辑,提升可读性

上级 53b2828b
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
</el-tooltip> </el-tooltip>
</div> </div>
<div class="row__column flex2"> <div class="row__column flex2">
<el-tooltip class="item" effect="dark" :content="item.type" placement="top-start"> <el-tooltip class="item" effect="dark" :content="item.descText" placement="top-start">
<span class="f12" <span class="f12"
:class="{ 'text-red': item.type === '忙碌', 'text-green': item.type == '空闲' }">{{ :class="{ 'text-red': item.type === '忙碌', 'text-green': item.type == '空闲' }">{{
item.type item.type
......
<template> <template>
<div class="stl-timed-task"> <div class="stl-timed-task">
<div class="cf m5 f12"> <div class="cf m5 f12">
主机库状态:<span 主机库状态:<span :class="apronInfo.masterStatus ? 'green' : ' red'">{{
:class="apronInfo.masterStatus ? 'green' : ' red'" apronInfo.masterStatus ? "正常" : apronInfo.descText
>{{ apronInfo.masterStatus ? '正常' : apronInfo.descText }}</span }}</span>
>
</div> </div>
<div class="timed-task-header"> <div class="timed-task-header">
<div class="header__column flex2">序号</div> <div class="header__column flex2">序号</div>
...@@ -47,7 +46,12 @@ ...@@ -47,7 +46,12 @@
</el-tooltip> </el-tooltip>
</div> </div>
<div class="row__column flex2"> <div class="row__column flex2">
<el-tooltip class="item" effect="dark" placement="top-start"> <el-tooltip
:content="item.descText"
class="item"
effect="dark"
placement="top-start"
>
<span <span
class="f12" class="f12"
:class="{ :class="{
...@@ -289,8 +293,8 @@ export default { ...@@ -289,8 +293,8 @@ export default {
this.$message.warning("请先接管设备"); this.$message.warning("请先接管设备");
return; return;
} }
if(!this.apronInfo.masterStatus){ if (!this.apronInfo.masterStatus) {
return this.$message.warning( this.apronInfo.descText); return this.$message.warning(this.apronInfo.descText);
} }
// 执行前先校验主机库状态 0 未正常 // 执行前先校验主机库状态 0 未正常
if (this.apronInfo && this.apronInfo.descCode != 0) { if (this.apronInfo && this.apronInfo.descCode != 0) {
......
...@@ -101,6 +101,7 @@ const actions = { ...@@ -101,6 +101,7 @@ const actions = {
}); });
} }
} }
console.log(msgList, "机库返回数据");
commit("setState", { commit("setState", {
key: "hangarRealTimeData", key: "hangarRealTimeData",
...@@ -295,7 +296,7 @@ const actions = { ...@@ -295,7 +296,7 @@ const actions = {
* @param {function} data.callback //完成回调 * @param {function} data.callback //完成回调
*/ */
async takeOff({ state }, data) { async takeOff({ state }, data) {
console.log(state.airlineData, data, '1111'); console.log(state.airlineData, data, "1111");
try { try {
// 生成架次号 // 生成架次号
const flightSortieId = await TaskInfo.flightSortieId({ const flightSortieId = await TaskInfo.flightSortieId({
...@@ -324,7 +325,7 @@ const actions = { ...@@ -324,7 +325,7 @@ const actions = {
maxFlightSpeed: 12, maxFlightSpeed: 12,
}, },
}, },
callback() { }, callback() {},
}); });
} catch (e) { } catch (e) {
console.log("一键起飞失败", e); console.log("一键起飞失败", e);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论