Merge branch 'master' of http://82.156.39.91:8418/amr.core/web-amr
This commit is contained in:
commit
35596ffb58
@ -378,6 +378,7 @@ interface RobotInfo {
|
||||
canOrder?: boolean; // 接单状态
|
||||
canStop?: boolean; // 急停状态
|
||||
canControl?: boolean; // 控制状态
|
||||
targetPoint?: string; // 目标点位(名称)
|
||||
}
|
||||
export interface RobotDetail extends RobotInfo {
|
||||
isSimulative?: 0 | 1; // 是否仿真机器人
|
||||
|
5
mocks/scene/pushById
Normal file
5
mocks/scene/pushById
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"code": 200,
|
||||
"success": true,
|
||||
"message": "模拟提示"
|
||||
}
|
@ -450,14 +450,24 @@
|
||||
background-color: none;
|
||||
box-shadow: none !important;
|
||||
|
||||
& > .ant-message-error {
|
||||
& > .ant-message-custom-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 8px 15px;
|
||||
font: 400 14px/22px Roboto;
|
||||
color: get-color(text1);
|
||||
background-color: get-color(error_bg);
|
||||
border: 1px solid get-color(error_border);
|
||||
border-radius: 2px;
|
||||
|
||||
&.ant-message-success {
|
||||
background-color: get-color(success_bg);
|
||||
border: 1px solid get-color(success_border);
|
||||
}
|
||||
|
||||
&.ant-message-error {
|
||||
background-color: get-color(error_bg);
|
||||
border: 1px solid get-color(error_border);
|
||||
}
|
||||
|
||||
& > .anticon {
|
||||
margin-inline-end: 10px;
|
||||
}
|
||||
|
@ -22,6 +22,7 @@ export interface RobotInfo {
|
||||
canOrder?: boolean; // 接单状态
|
||||
canStop?: boolean; // 急停状态
|
||||
canControl?: boolean; // 控制状态
|
||||
targetPoint?: string; // 目标点位(名称)
|
||||
}
|
||||
|
||||
export interface RobotDetail extends RobotInfo {
|
||||
|
@ -50,7 +50,7 @@ const stateDot = computed<string>(() => `state-${robot.value?.state}`);
|
||||
|
||||
<a-tag>
|
||||
<i class="icon size-18 mr-4" :class="batteryIcon" />
|
||||
<span>{{ robot.battery ?? 0 }}%</span>
|
||||
<span>{{ robot.battery?.toFixed() ?? 0 }}%</span>
|
||||
</a-tag>
|
||||
|
||||
<a-tag v-if="robot.state">
|
||||
@ -74,6 +74,10 @@ const stateDot = computed<string>(() => `state-${robot.value?.state}`);
|
||||
<a-typography-text type="secondary">{{ $t('控制权') }}</a-typography-text>
|
||||
<a-typography-text>{{ $t(robot.canControl ? '已抢占' : '当前无控制权') }}</a-typography-text>
|
||||
</a-list-item>
|
||||
<a-list-item>
|
||||
<a-typography-text style="flex: none" type="secondary">{{ $t('目的地') }}</a-typography-text>
|
||||
<a-typography-text :content="$t(robot.targetPoint ?? '-')" ellipsis />
|
||||
</a-list-item>
|
||||
</a-list>
|
||||
</template>
|
||||
<a-empty v-else :image="sTheme.empty" />
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { getSceneById, pushSceneById } from '@api/scene';
|
||||
import { EditorService } from '@core/editor.service';
|
||||
import { decodeTextFile, downloadFile, selectFile, textToBlob } from '@core/utils';
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { computed, watch } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
import { onMounted, provide, shallowRef } from 'vue';
|
||||
@ -25,7 +25,10 @@ const readScene = async () => {
|
||||
};
|
||||
|
||||
const pushScene = async () => {
|
||||
await pushSceneById(props.id);
|
||||
const res = await pushSceneById(props.id);
|
||||
if (!res) return Promise.reject();
|
||||
message.success(t('场景推送成功'));
|
||||
return Promise.resolve();
|
||||
};
|
||||
//#endregion
|
||||
|
||||
@ -54,7 +57,7 @@ const toPush = () =>
|
||||
centered: true,
|
||||
cancelText: t('返回'),
|
||||
okText: t('推送'),
|
||||
onOk: () => pushScene(),
|
||||
onOk: async () => await pushScene(),
|
||||
});
|
||||
|
||||
const importScene = async () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user