feat: 错误提示
This commit is contained in:
parent
3800a1db4f
commit
60a73b5264
@ -19,6 +19,7 @@
|
|||||||
"@vueup/vue-quill": "1.2.0",
|
"@vueup/vue-quill": "1.2.0",
|
||||||
"@vueuse/core": "10.11.0",
|
"@vueuse/core": "10.11.0",
|
||||||
"ace-builds": "^1.43.0",
|
"ace-builds": "^1.43.0",
|
||||||
|
"autofit.js": "^3.2.8",
|
||||||
"axios": "0.28.1",
|
"axios": "0.28.1",
|
||||||
"clipboard": "2.0.11",
|
"clipboard": "2.0.11",
|
||||||
"dayjs": "^1.11.13",
|
"dayjs": "^1.11.13",
|
||||||
|
|||||||
@ -95,7 +95,7 @@ service.interceptors.response.use(res => {
|
|||||||
}
|
}
|
||||||
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
|
||||||
} else if (code === 500) {
|
} else if (code === 500) {
|
||||||
ElMessage({ message: msg, type: 'error' })
|
ElMessage({ message: msg, grouping: true, type: 'error' })
|
||||||
return Promise.reject(new Error(msg))
|
return Promise.reject(new Error(msg))
|
||||||
} else if (code === 601) {
|
} else if (code === 601) {
|
||||||
ElMessage({ message: msg, type: 'warning' })
|
ElMessage({ message: msg, type: 'warning' })
|
||||||
|
|||||||
@ -167,6 +167,7 @@ const pose = ref({
|
|||||||
|
|
||||||
const speed = ref(1) // 速度百分比,范围 0.1 - 5
|
const speed = ref(1) // 速度百分比,范围 0.1 - 5
|
||||||
|
|
||||||
|
const errorNum = ref(0)
|
||||||
/**
|
/**
|
||||||
* 获取机械臂末端状态信息
|
* 获取机械臂末端状态信息
|
||||||
*/
|
*/
|
||||||
@ -181,8 +182,16 @@ const getPose = async (robot) => {
|
|||||||
pose.value = { x, y, z, rx, ry, rz }
|
pose.value = { x, y, z, rx, ry, rz }
|
||||||
} else {
|
} else {
|
||||||
console.error('获取姿态失败:', res.message)
|
console.error('获取姿态失败:', res.message)
|
||||||
|
errorNum.value++
|
||||||
|
if (errorNum.value > 3) {
|
||||||
|
clearInterval(timer.value)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
errorNum.value++
|
||||||
|
if (errorNum.value > 3) {
|
||||||
|
clearInterval(timer.value)
|
||||||
|
}
|
||||||
console.error('获取姿态失败:', error)
|
console.error('获取姿态失败:', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,9 @@ import MapOverview from './components/MapOverview.vue';
|
|||||||
import ManualTakeover from './components/ManualTakeover/index.vue';
|
import ManualTakeover from './components/ManualTakeover/index.vue';
|
||||||
import Monitor from './components/Monitor.vue';
|
import Monitor from './components/Monitor.vue';
|
||||||
|
|
||||||
|
// import autofit from 'autofit.js'
|
||||||
|
// autofit.init()
|
||||||
|
|
||||||
|
|
||||||
const currentPage = ref('home')
|
const currentPage = ref('home')
|
||||||
const activePage = (page) => {
|
const activePage = (page) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user