This commit is contained in:
2025-08-13 18:06:35 +08:00
parent 98e21918a5
commit a59955e8f6
8 changed files with 95 additions and 76 deletions

View File

@@ -2,7 +2,7 @@
export const queryStation = () => {
let res = {
message: 'ok',
data: [{station_code: 'B1', station_name: 'B1', x: '10', Y: '10', angle: '90'}, {station_code: 'B2', station_name: 'B2', x: '10', Y: '10', angle: '90'}, {station_code: 'B3', station_name: 'B3', x: '10', Y: '10', angle: '90'}]
data: [{station_code: 'B1', station_name: 'B1', x: '10', Y: '10', angle: '90'}, {station_code: 'B2', station_name: 'B2', x: '10', Y: '10', angle: '90'}, {station_code: 'B3', station_name: 'B3', x: '10', Y: '10', angle: '90'}, {station_code: 'B1', station_name: 'B1', x: '10', Y: '10', angle: '90'}, {station_code: 'B2', station_name: 'B2', x: '10', Y: '10', angle: '90'}, {station_code: 'B3', station_name: 'B3', x: '10', Y: '10', angle: '90'}, {station_code: 'B1', station_name: 'B1', x: '10', Y: '10', angle: '90'}, {station_code: 'B2', station_name: 'B2', x: '10', Y: '10', angle: '90'}, {station_code: 'B3', station_name: 'B3', x: '10', Y: '10', angle: '90'}, {station_code: 'B1', station_name: 'B1', x: '10', Y: '10', angle: '90'}, {station_code: 'B2', station_name: 'B2', x: '10', Y: '10', angle: '90'}, {station_code: 'B3', station_name: 'B3', x: '10', Y: '10', angle: '90'}, {station_code: 'B1', station_name: 'B1', x: '10', Y: '10', angle: '90'}, {station_code: 'B2', station_name: 'B2', x: '10', Y: '10', angle: '90'}, {station_code: 'B3', station_name: 'B3', x: '10', Y: '10', angle: '90'}, {station_code: 'B1', station_name: 'B1', x: '10', Y: '10', angle: '90'}, {station_code: 'B2', station_name: 'B2', x: '10', Y: '10', angle: '90'}, {station_code: 'B3', station_name: 'B3', x: '10', Y: '10', angle: '90'}]
}
return res
}
@@ -35,7 +35,7 @@ export const queryMapAllStation = () => {
"station_id": 2,
"station_code": "B1",
"station_name": "B1",
"station_type": "STATION",
"station_type": "Charge",
"action_type": "Customize",
"x": -3.30318,
"y": 0.123685,

View File

@@ -1,12 +1,15 @@
<template>
<div class="page_container">
<gl-map ref="glMap"/>
<el-row type="flex" justify="space-between">
<el-col :span="10"><button class="button_control" :disabled="disabled" @click="addPoint"><p>打点</p></button></el-col>
</el-row>
<gl-map ref="glMap"/>
<el-row type="flex" justify="end">
<button class="button_control" @click="$router.push('/index/home')"><p>放弃建图</p></button>
<button class="button_control" style="margin-left: 10px" :disabled="disabled" @click="stopMappingConfirm"><p>结束建图</p></button>
<el-col :span="14">
<el-row type="flex" justify="end">
<button class="button_control" @click="$router.push('/index/home')"><p>放弃建图</p></button>
<button class="button_control" style="margin-left: 10px" :disabled="disabled" @click="stopMappingConfirm"><p>结束建图</p></button>
</el-row>
</el-col>
</el-row>
<el-dialog
title="设置站点"

View File

@@ -1,38 +1,38 @@
<template>
<div class="page_container">
<div class="t_box">
<el-tabs tab-position="left" v-model="activeName" @tab-click="tabClick">
<el-tab-pane label="自定义" name="zdy">
<el-row type="flex" class="r_box">
<el-col class="point_item" v-for="(e, i) in dataList" :key="'zdy' + i">
<el-popover
placement="bottom"
trigger="manual"
:ref="`popover-${i}`">
<el-row type="flex" justify="space-between" align="middle" style="margin-bottom: .1rem">
<el-col :span="18"><el-input placeholder="修改名称" v-model="stationName" @focus="show" data-layout="normal"></el-input></el-col>
<el-button type="success" icon="el-icon-check" size="mini" style="height: .3rem" :disabled="disabled" @click="_updateStation(e, i)"></el-button>
</el-row>
<el-row type="flex" justify="space-between">
<el-button class="task_button" :class="{'task_checked': e.action_type === el.value}" v-for="el in radioOption" :key="el.value" @click="radioInput(e, i, el.value)">{{ el.label }}</el-button>
</el-row>
<div slot="reference" class="zbox point_item_i" @click="openPopover(i)"><p>{{ e.station_name }}</p></div>
</el-popover>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="任务链" name="rwl">
<el-row type="flex" class="r_box">
<el-col class="point_item" v-for="(e, i) in linkData" :key="'rwl' + i">
<div class="zbox point_item_i" @click="handleLinkCheck(e)"><p>{{ e.chain_name }}</p></div>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
</div>
<el-row type="flex" class="result_w" justify="space-between" align="middle">
<el-col :span="15" class="result_items_w">
<el-row type="flex" class="result_items" justify="start" align="top">
<el-row type="flex" class="t_box" justify="space-between">
<el-col :span="20">
<div style="height: calc(100% - 1rem);overflow: hidden;">
<el-tabs v-model="activeName" @tab-click="tabClick" style="height: 100%;">
<el-tab-pane label="自定义" name="zdy">
<el-row type="flex" class="r_box">
<el-col class="point_item" v-for="(e, i) in dataList" :key="'zdy' + i">
<el-popover
placement="bottom"
trigger="manual"
:ref="`popover-${i}`">
<el-row type="flex" justify="space-between" align="middle" style="margin-bottom: .1rem">
<el-col :span="18"><el-input placeholder="修改名称" v-model="stationName" @focus="show" data-layout="normal"></el-input></el-col>
<el-button type="success" icon="el-icon-check" size="mini" style="height: .3rem" :disabled="disabled" @click="_updateStation(e, i)"></el-button>
</el-row>
<el-row type="flex" justify="space-between">
<el-button class="task_button" :class="{'task_checked': e.action_type === el.value}" v-for="el in radioOption" :key="el.value" @click="radioInput(e, i, el.value)">{{ el.label }}</el-button>
</el-row>
<div slot="reference" class="zbox point_item_i" @click="openPopover(i)"><p>{{ e.station_name }}</p></div>
</el-popover>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="任务链" name="rwl">
<el-row type="flex" class="r_box">
<el-col class="point_item" v-for="(e, i) in linkData" :key="'rwl' + i">
<div class="zbox point_item_i" @click="handleLinkCheck(e)"><p>{{ e.chain_name }}</p></div>
</el-col>
</el-row>
</el-tab-pane>
</el-tabs>
</div>
<el-row type="flex" class="result_w" justify="start" align="top">
<el-col class="pp_item" v-for="(e, i) in newData" :key="'new' + i">
<el-row type="flex" align="middle">
<div class="point_item point_checked">
@@ -48,13 +48,13 @@
</el-col>
</el-row>
</el-col>
<el-col :span="8">
<el-row type="flex" justify="space-between" style="flex-wrap: wrap" >
<el-col v-if="activeName === 'rwl'" :span="11" style="margin-bottom: .08rem"><button class="button_control" :class="{'button_control_disabled': !chainId}" :disabled="disabled" @click="_deleteTaskChain"><p>删除任务链</p></button></el-col>
<el-col v-if="activeName === 'zdy'" :span="11" style="margin-bottom: .08rem"><button class="button_control" :class="{'button_control_disabled': !newData.length}" @click="newData = []"><p>清空</p></button></el-col>
<el-col :span="11" style="margin-bottom: .08rem"><button class="button_control" :disabled="disabled" @click="_cancelTask"><p>取消任务</p></button></el-col>
<el-col v-if="activeName === 'zdy'" :span="11"><button class="button_control" :class="{'button_control_disabled': !newData.length}" :disabled="disabled" @click="_saveTask"><p>保存任务</p></button></el-col>
<el-col :span="11"><button class="button_control" :class="{'button_control_disabled': !newData.length}" :disabled="disabled" @click="_sendTask"><p>发送任务</p></button></el-col>
<el-col :span="4" style="padding: 0 .1rem;">
<el-row type="flex" justify="center" style="flex-wrap: wrap;height: 100%;align-content: flex-end;">
<el-col v-if="activeName === 'rwl'" :span="24" class="button_box"><button class="button_control" :class="{'button_control_disabled': !chainId}" :disabled="disabled" @click="_deleteTaskChain"><p style="font-size: .28rem">删除任务链</p></button></el-col>
<el-col v-if="activeName === 'zdy'" :span="24" class="button_box"><button class="button_control" :class="{'button_control_disabled': !newData.length}" @click="newData = []"><p>清空</p></button></el-col>
<el-col :span="24" class="button_box"><button class="button_control" :disabled="disabled" @click="_cancelTask"><p>取消任务</p></button></el-col>
<el-col v-if="activeName === 'zdy'" :span="24" class="button_box"><button class="button_control" :class="{'button_control_disabled': !newData.length}" :disabled="disabled" @click="_saveTask"><p>保存任务</p></button></el-col>
<el-col :span="24" class="button_box"><button class="button_control" :class="{'button_control_disabled': !newData.length}" :disabled="disabled" @click="_sendTask"><p>发送任务</p></button></el-col>
</el-row>
</el-col>
</el-row>
@@ -65,6 +65,7 @@
<script>
import SaveChain from './save-chain.vue'
// import { queryStation, queryTaskChain } from '../../config/mork.js'
import { queryStation, queryTaskChain, queryTaskChainDtl, sendTask, saveTask, cancelTask, deleteTaskChain, updateStation } from '../../config/getData.js'
export default {
name: 'ModuleDevice',
@@ -395,8 +396,7 @@ export default {
<style lang="stylus" scoped>
.t_box
height calc(100% - 1.1rem)
margin-bottom 0.1rem
height 100%
background-color rgba(0, 19, 48, 70%)
box-shadow inset 1px 1px 7px 2px #4d9bcd
padding .1rem
@@ -446,9 +446,6 @@ export default {
font-size .2rem
color #fff
line-height .4rem
.result_items_w
height .8rem
overflow hidden
.result_items
flex-wrap wrap
align-content flex-start
@@ -482,4 +479,14 @@ export default {
border-color #409EFF
&:first-child
border-left-color #409EFF
.button_box
height 20%
margin-bottom .16rem
text-align center
&:last-child
margin-bottom 0
.button_control
height 100%
p
font-size .3rem
</style>

View File

@@ -457,8 +457,8 @@ export default {
.point-cloud-map
position relative
width 100%
height calc(100% - 1rem - 6px)
margin .14rem 0
height calc(100% - .5rem)
margin-bottom .14rem
background-color rgba(4, 33, 58, 70%)
box-shadow inset 1px 1px 7px 2px #4d9bcd
overflow hidden

View File

@@ -54,7 +54,7 @@ export default {
flex-wrap wrap
align-content center
.nav_item
height 35%
height 90%
padding 1.5%
color #fff
font-size .2rem
@@ -74,7 +74,7 @@ export default {
border-left 2px solid #62b2f0
box-shadow inset 0 0px 12px 8px rgba(98, 180, 243, 50%)
p
font-size .3rem
font-size .4rem
line-height 1
color #F6F9FE
font-family 'YouSheBiaoTiHei'

View File

@@ -332,10 +332,12 @@ export default {
)
}
// 绘制点位名称(文字大小随缩放变化)
this.ctx.font = '12px Arial'
this.ctx.fillStyle = 'white'
this.ctx.textAlign = 'center'
this.ctx.fillText(point.station_name, x, y + 18)
if (point.station_type === 'Station') {
this.ctx.font = '12px Arial'
this.ctx.fillStyle = 'white'
this.ctx.textAlign = 'center'
this.ctx.fillText(point.station_name, x, y + 18)
}
})
},
drawCar () {
@@ -347,10 +349,10 @@ export default {
this.ctx.rotate(-this.carPosition.angle)
this.ctx.drawImage(
this.cachedImages.car,
-25,
-25,
50,
50
-10,
-10,
20,
20
)
// this.ctx.restore()
},

View File

@@ -30,12 +30,12 @@
<div class="error-tips-t">错误提示{{ exception }}</div>
</div>
</div>
<el-row type="flex" class="relative main-conatiner" :style="{'paddingTop': exception !== '' ? '.3rem' : '0'}">
<el-row type="flex" class="relative main-conatiner" :style="{'paddingTop': exception !== '' ? '.3rem' : '0', 'paddingBottom': taskSeq.length > 0 ? '.6rem': '0'}">
<div class="absolute hud_left"></div>
<div class="absolute hud_left hud_right"></div>
<router-view></router-view>
</el-row>
<div v-if="JSON.stringify(topInfo) !== '{}'" class="task_wraper">
<div v-if="taskSeq.length > 0" class="task_wraper">
<div class="task_content">
<div class="step_item" v-for="(e, i) in taskSeq" :key="i" :class="{'step_active': currentStep === i, 'step_actived': i < currentStep}">
<div class="step_name">{{ e }}</div>
@@ -83,8 +83,8 @@ export default {
task_seq: '工作点1-工作点2-工作点3',
task_point: '工作点2'
},
taskSeq: '',
currentStep: 0,
taskSeq: [],
currentStep: null,
loginVisible: false,
configVisible: false
}
@@ -165,8 +165,10 @@ export default {
this.websocket.onerror = (error) => {
this.$message.error('WebSocket连接错误:', error)
}
this.websocket.onclose = (event) => {
console.log(`WebSocket连接关闭: 代码=${event.code}, 原因=${event.reason}`)
this.websocket.onclose = () => {
this.topInfo = {}
this.taskSeq = []
this.currentStep = null
this.reconnectWebSocket()
}
},
@@ -207,14 +209,14 @@ export default {
background linear-gradient(0deg, #E64F29, rgba(230, 79, 41, 0.5))
border-color rgba(230, 79, 41, 0.7)
.state-item
_wh(.72rem, .25rem)
_font(.14rem,.25rem,#fff,,center)
_wh(1rem, .3rem)
_font(.18rem,.3rem,#fff,,center)
font-family 'Adobe Heiti Std'
margin-right .08rem
background center / 100% 100% url(../../images/new/state-item_bg.png) no-repeat
box-shadow inset 0px 0px 3px 2px rgb(149, 221, 253, 70%)
.elec-qty-wrap
_wh(.5rem, .25rem)
_wh(.6rem, .3rem)
margin-right .08rem
background center / 100% 100% url(../../images/new/elec.png) no-repeat
border 1px solid #5ADFBC
@@ -236,7 +238,7 @@ export default {
.elec-txt
position relative
z-index 153
_font(.15rem, .25rem, #fff,,center)
_font(.18rem, .3rem, #fff,,center)
font-family 'Adobe Heiti Std'
.icon-user
font-size .24rem

View File

@@ -81,7 +81,7 @@
font-size .24rem
color #fff
.el-button
font-size .16rem
font-size .2rem
padding-top 0
padding-bottom 0
height .32rem
@@ -161,6 +161,8 @@
background: rgba(31,46,73,0.5);
.el-table--enable-row-hover .el-table__body tr:hover>td
background: rgba(63,106,202,0.3);
.el-tabs__header
margin 0 0 .1rem
.el-tabs__nav-wrap::after
background-color #192B47
.el-tabs--left .el-tabs__header.is-left
@@ -169,11 +171,14 @@
padding 0 .2rem
height .4rem
line-height .4rem
font-size .18rem
font-size .22rem
color #c9c9c9
.el-tabs__item.is-active
color #3CC1FF
font-weight 700
.el-tabs__content
height calc(100% - 0.5rem)
overflow-y auto
.el-popover
background rgba(7,31,62,0.95)
min-width 150px