建图
This commit is contained in:
@@ -99,5 +99,6 @@ module.exports = {
|
||||
AttreconnectWebSocket: 'Attempting to reconnect to WebSocket...',
|
||||
PicturesTexts: 'Illustration with Pictures and Texts',
|
||||
VideoInstructions: 'Video Instructions',
|
||||
Handmethod: 'Handling method'
|
||||
Handmethod: 'Handling method',
|
||||
stationnotcommas: 'The station name cannot contain English commas.'
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ module.exports = {
|
||||
driverTxt2: '移动到工位点时,点击打点按钮记录当前车辆所在位置为工位点。',
|
||||
driverTxt3: '完成建图,点击结束建图按钮,等待地图自动生成。',
|
||||
carbuildingmap: '小车正在建图中',
|
||||
errorbuildingredone: '建图出现错误,需要重新建图',
|
||||
errorbuildingredone: '图',
|
||||
sureendbuilding: '确定是否结束建图?',
|
||||
endbuildingcancel: '已取消结束建图',
|
||||
errorendbuilding: '结束建图出现错误',
|
||||
@@ -99,5 +99,6 @@ module.exports = {
|
||||
AttreconnectWebSocket: '尝试重新连接 WebSocket...',
|
||||
PicturesTexts: '图文说明',
|
||||
VideoInstructions: '视频说明',
|
||||
Handmethod: '处理方法'
|
||||
Handmethod: '处理方法',
|
||||
stationnotcommas: '站点名称不能包含英文逗号'
|
||||
}
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
:title="$t('SetUpStation')"
|
||||
:visible.sync="dialogVisible"
|
||||
width="55%">
|
||||
<el-form :model="dataForm" ref="dataForm" :label-width="$i18n.locale === 'en-us' ? '' : '1.1rem'" size="mini">
|
||||
<el-form :model="dataForm" ref="dataForm" :rules="dataRule" :label-width="$i18n.locale === 'en-us' ? '' : '1.1rem'" size="mini">
|
||||
<el-form-item :label="$t('StationName')" prop="stationName">
|
||||
<el-input v-model="dataForm.stationName" id="stationName"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row type="flex" justify="space-around" style="margin-top: .3rem">
|
||||
<el-col :span="7"><button class="button_control button_control_disabled" @click="dialogVisible = false"><p>{{$t('Cancel')}}</p></button></el-col>
|
||||
<el-col :span="7"><button class="button_control" @click="_setStation"><p>{{$t('Save')}}</p></button></el-col>
|
||||
<el-col :span="7"><button class="button_control" @click="stationConfirm"><p>{{$t('Save')}}</p></button></el-col>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
<transition name="custom-message" >
|
||||
@@ -97,6 +97,13 @@ export default {
|
||||
}
|
||||
},
|
||||
data () {
|
||||
const validateStationName = (rule, value, callback) => {
|
||||
if (value && value.includes(',')) {
|
||||
callback(new Error(this.$t('stationnotcommas')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
return {
|
||||
driver: null,
|
||||
driverActive: true,
|
||||
@@ -107,6 +114,12 @@ export default {
|
||||
stationCode: '',
|
||||
stationName: ''
|
||||
},
|
||||
dataRule: {
|
||||
stationName: [
|
||||
{ validator: validateStationName, trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
submitSuccess: false,
|
||||
keyPoints: [],
|
||||
disabled: false,
|
||||
message: '', // 用于显示消息
|
||||
@@ -241,6 +254,19 @@ export default {
|
||||
this.dataForm.stationName = `${na}${this.keyPoints.length + 1}`
|
||||
},
|
||||
// 打点->保存
|
||||
stationConfirm () {
|
||||
this.$refs.dataForm.validate((valid) => {
|
||||
if (valid) {
|
||||
this.submitSuccess = true
|
||||
this._setStation()
|
||||
setTimeout(() => {
|
||||
this.submitSuccess = false
|
||||
}, 3000)
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
})
|
||||
},
|
||||
async _setStation () {
|
||||
this.disabled = true
|
||||
try {
|
||||
|
||||
@@ -416,9 +416,6 @@ export default {
|
||||
this.calculateCarSize()
|
||||
},
|
||||
|
||||
// 核心修改:移除响应式调整逻辑,不再处理窗口大小变化
|
||||
// handleResize() { ... },
|
||||
|
||||
startAnimationLoop() {
|
||||
const animate = () => {
|
||||
this.animationId = requestAnimationFrame(animate)
|
||||
@@ -482,9 +479,6 @@ export default {
|
||||
this.carTexture = null
|
||||
}
|
||||
|
||||
// 移除窗口大小变化监听
|
||||
window.removeEventListener('resize', this.handleResize)
|
||||
|
||||
this.camera = null
|
||||
this.carMesh = null
|
||||
this.pointCloudMesh = null
|
||||
|
||||
@@ -80,7 +80,7 @@ export default {
|
||||
theta: 0.9073792099952698, // 车辆航向角
|
||||
x: 0.004027, // 车辆x坐标
|
||||
y: -0.001812, // 车辆y坐标
|
||||
task_seq: '点位1-点位2-顶顶位3-point layout location-顶地方的方法顶顶顶点位3',
|
||||
task_seq: '点位1,点位2,work point 3,顶地方的方法顶顶顶点位3',
|
||||
task_point: '点位2',
|
||||
anomalyLevel: 1,
|
||||
errorData: [
|
||||
@@ -127,7 +127,7 @@ export default {
|
||||
created () {
|
||||
// this.$store.dispatch('setAgvObj', this.topInfo)
|
||||
// if (this.topInfo.task_seq) {
|
||||
// this.taskSeq = this.topInfo.task_seq.split('-')
|
||||
// this.taskSeq = this.topInfo.task_seq.split(',')
|
||||
// const target = this.topInfo.task_point
|
||||
// this.currentStep = this.taskSeq.findIndex(item => item === target)
|
||||
// } else {
|
||||
@@ -212,7 +212,7 @@ export default {
|
||||
if (this.reconnectTimer) clearTimeout(this.reconnectTimer)
|
||||
this.topInfo = res.data
|
||||
if (this.topInfo.task_seq) {
|
||||
this.taskSeq = this.topInfo.task_seq.split('-')
|
||||
this.taskSeq = this.topInfo.task_seq.split(',')
|
||||
const target = this.topInfo.task_point
|
||||
this.currentStep = this.taskSeq.findIndex(item => item === target)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user