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