修改车辆看班
This commit is contained in:
parent
c9b0b4c02e
commit
0d9006b96a
8
src/api/charts/index.ts
Normal file
8
src/api/charts/index.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import request from '@/config/axios'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//获取整体看板信息
|
||||||
|
export const bulletinBoardGet = async (params) => {
|
||||||
|
return await request.get({ url: `/system/bulletinBoard/get`, params })
|
||||||
|
}
|
189
src/views/board/allBoard/index.vue
Normal file
189
src/views/board/allBoard/index.vue
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
<template>
|
||||||
|
<!-- 顶部统计 -->
|
||||||
|
<div class="top-box">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="grid-content ep-bg-purple">
|
||||||
|
<el-card style="max-width: 100%">
|
||||||
|
<el-row :gutter="5">
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="top-item">
|
||||||
|
<div class="top-item-title"> 任务总数 </div>
|
||||||
|
<div class="top-item-num"> 323 </div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="top-item">
|
||||||
|
<div class="top-item-title"> 执行中 </div>
|
||||||
|
<div class="top-item-num"> 323 </div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="top-item">
|
||||||
|
<div class="top-item-title"> 待执行 </div>
|
||||||
|
<div class="top-item-num"> 323 </div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="top-item">
|
||||||
|
<div class="top-item-title"> 已完成 </div>
|
||||||
|
<div class="top-item-num"> 323 </div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="top-item">
|
||||||
|
<div class="top-item-title"> 已取消 </div>
|
||||||
|
<div class="top-item-num" style="color: #a6a6a6"> 323 </div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="top-item" style="border: none; color: #c60606">
|
||||||
|
<div class="top-item-title"> 异常 </div>
|
||||||
|
<div class="top-item-num"> 323 </div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<div class="grid-content ep-bg-purple">
|
||||||
|
<el-card style="max-width: 100%">
|
||||||
|
<el-row :gutter="5">
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="top-item">
|
||||||
|
<div class="top-item-title"> 车辆总数 </div>
|
||||||
|
<div class="top-item-num"> 132 </div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="top-item">
|
||||||
|
<div class="top-item-title"> 任务中 </div>
|
||||||
|
<div class="top-item-num"> 323 </div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="top-item">
|
||||||
|
<div class="top-item-title"> 锁定 </div>
|
||||||
|
<div class="top-item-num"> 323 </div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="top-item">
|
||||||
|
<div class="top-item-title"> 充电中 </div>
|
||||||
|
<div class="top-item-num"> 323 </div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="top-item">
|
||||||
|
<div class="top-item-title"> 离线 </div>
|
||||||
|
<div class="top-item-num" style="color: #a6a6a6"> 323 </div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<div class="top-item" style="border: none; color: #c60606">
|
||||||
|
<div class="top-item-title"> 故障 </div>
|
||||||
|
<div class="top-item-num"> 323 </div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
<!-- 底部列表和地图 -->
|
||||||
|
<div class="bottom-box">
|
||||||
|
<el-row :gutter="10">
|
||||||
|
<el-col :span="6">
|
||||||
|
<div class="bottom-box-item">
|
||||||
|
<div class="bottom-box-item-table">
|
||||||
|
<div class="bottom-box-item-title">
|
||||||
|
<div class="bottom-box-item-title-left"> 执行中 </div>
|
||||||
|
<div class="bottom-box-item-title-right"> 查看更多 </div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<el-table :data="[]" style="width: 100%">
|
||||||
|
<el-table-column prop="date" label="任务编号" />
|
||||||
|
<el-table-column prop="name" label="车辆编号" />
|
||||||
|
<el-table-column prop="address" label="开始时间" />
|
||||||
|
<el-table-column prop="address" label="任务阶段" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12"> 2 </el-col>
|
||||||
|
<el-col :span="6"> 3 </el-col>
|
||||||
|
</el-row>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive, onMounted, onBeforeUnmount } from 'vue'
|
||||||
|
import ChartsApi from '@/api/charts'
|
||||||
|
defineOptions({ name: 'BoardAllBoard' })
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.top-box {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.top-item {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
border-right: 1px solid #e7eaec;
|
||||||
|
}
|
||||||
|
.top-item-title {
|
||||||
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 18px;
|
||||||
|
color: #0d162a;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
.top-item-num {
|
||||||
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 24px;
|
||||||
|
color: #00329f;
|
||||||
|
}
|
||||||
|
.bottom-box {
|
||||||
|
width: 100%;
|
||||||
|
margin-top: 12px;
|
||||||
|
}
|
||||||
|
.bottom-box-item {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.bottom-box-item-title {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
.bottom-box-item-title-left {
|
||||||
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #0d162a;
|
||||||
|
}
|
||||||
|
.bottom-box-item-title-right {
|
||||||
|
font-family:
|
||||||
|
PingFangSC,
|
||||||
|
PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 14px;
|
||||||
|
color: #1677ff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.bottom-box-item-table{
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
@ -14,10 +14,10 @@
|
|||||||
<el-form-item required label="车辆编号" prop="robotNo">
|
<el-form-item required label="车辆编号" prop="robotNo">
|
||||||
<el-input v-model="formData.robotNo" :disabled="false" placeholder="请输入车辆编号"/>
|
<el-input v-model="formData.robotNo" :disabled="false" placeholder="请输入车辆编号"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item required label="任务模式" v-if="formData.id">
|
<el-form-item required label="车辆状态" v-if="formData.id">
|
||||||
<el-select v-model="formData.robotTaskModel" placeholder="请选择车辆类型" required>
|
<el-select v-model="formData.robotTaskModel" placeholder="请选择车辆类型" required>
|
||||||
<el-option
|
<el-option
|
||||||
:label="'拒收任务'"
|
:label="'锁定'"
|
||||||
:value="0"
|
:value="0"
|
||||||
/>
|
/>
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -133,7 +133,7 @@
|
|||||||
<el-dropdown-menu>
|
<el-dropdown-menu>
|
||||||
<el-dropdown-item @click="openForm('update', item.id)">编辑</el-dropdown-item>
|
<el-dropdown-item @click="openForm('update', item.id)">编辑</el-dropdown-item>
|
||||||
<el-dropdown-item @click="clockCar(item)">{{
|
<el-dropdown-item @click="clockCar(item)">{{
|
||||||
item.status == 0 ? '解锁' : '锁定'
|
item.robotTaskModel == 0 ? '解锁' : '锁定'
|
||||||
}}</el-dropdown-item>
|
}}</el-dropdown-item>
|
||||||
<el-dropdown-item @click="deleteCar(item.id)">删除</el-dropdown-item>
|
<el-dropdown-item @click="deleteCar(item.id)">删除</el-dropdown-item>
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
|
@ -22,12 +22,7 @@
|
|||||||
<div class="indexpage-container-box-point">
|
<div class="indexpage-container-box-point">
|
||||||
<!-- 连线 -->
|
<!-- 连线 -->
|
||||||
<div v-if="legendObj.driveLineShow">
|
<div v-if="legendObj.driveLineShow">
|
||||||
<div
|
<div class="line-box" v-for="(item, index) in lineList" :key="index">
|
||||||
class="line-box"
|
|
||||||
v-for="(item, index) in lineList"
|
|
||||||
:key="index"
|
|
||||||
|
|
||||||
>
|
|
||||||
<svg id="svg" :width="widthVal" :height="heightVal">
|
<svg id="svg" :width="widthVal" :height="heightVal">
|
||||||
<template v-if="item.method == 0">
|
<template v-if="item.method == 0">
|
||||||
<line
|
<line
|
||||||
@ -40,17 +35,10 @@
|
|||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<path
|
<path :d="getCurvePath(item)" :stroke="'#00329F'" stroke-width="5" fill="none" />
|
||||||
:d="getCurvePath(item)"
|
|
||||||
:stroke="'#00329F'"
|
|
||||||
stroke-width="5"
|
|
||||||
fill="none"
|
|
||||||
|
|
||||||
/>
|
|
||||||
</template>
|
</template>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 小车 -->
|
<!-- 小车 -->
|
||||||
<div
|
<div
|
||||||
@ -136,7 +124,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 设备点 -->
|
<!-- 设备点 -->
|
||||||
<div v-if="item.type == 3">
|
<div v-if="item.type == 3">
|
||||||
<img :src="item.formattedData.mapImageUrl" alt="" style="width: 100%;height: 100%;"/>
|
<img
|
||||||
|
:src="item.formattedData.mapImageUrl"
|
||||||
|
alt=""
|
||||||
|
style="width: 100%; height: 100%"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 设备点 -->
|
<!-- 设备点 -->
|
||||||
@ -149,7 +141,15 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<img :src="item.formattedData.mapImageUrl?item.formattedData.mapImageUrl:'https://api.znkjfw.com/admin-api/infra/file/4/get/设备点_png_179_1739327151877.png'" alt="" style="width: 100%;height: 100%;"/>
|
<img
|
||||||
|
:src="
|
||||||
|
item.formattedData.mapImageUrl
|
||||||
|
? item.formattedData.mapImageUrl
|
||||||
|
: 'https://api.znkjfw.com/admin-api/infra/file/4/get/设备点_png_179_1739327151877.png'
|
||||||
|
"
|
||||||
|
alt=""
|
||||||
|
style="width: 100%; height: 100%"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 停车点 -->
|
<!-- 停车点 -->
|
||||||
@ -162,7 +162,15 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<img :src="item.formattedData.mapImageUrl?item.formattedData.mapImageUrl:'https://api.znkjfw.com/admin-api/infra/file/4/get/停车场-01_png_179_1739326933020.png'" alt="" style="width: 100%;height: 100%;"/>
|
<img
|
||||||
|
:src="
|
||||||
|
item.formattedData.mapImageUrl
|
||||||
|
? item.formattedData.mapImageUrl
|
||||||
|
: 'https://api.znkjfw.com/admin-api/infra/file/4/get/停车场-01_png_179_1739326933020.png'
|
||||||
|
"
|
||||||
|
alt=""
|
||||||
|
style="width: 100%; height: 100%"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 路径点 -->
|
<!-- 路径点 -->
|
||||||
@ -175,7 +183,15 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<img :src="item.formattedData.mapImageUrl?item.formattedData.mapImageUrl:'https://api.znkjfw.com/admin-api/infra/file/4/get/区域_png_179_1739327151876.png'" alt="" style="width: 100%;height: 100%;"/>
|
<img
|
||||||
|
:src="
|
||||||
|
item.formattedData.mapImageUrl
|
||||||
|
? item.formattedData.mapImageUrl
|
||||||
|
: 'https://api.znkjfw.com/admin-api/infra/file/4/get/区域_png_179_1739327151876.png'
|
||||||
|
"
|
||||||
|
alt=""
|
||||||
|
style="width: 100%; height: 100%"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 等待点 -->
|
<!-- 等待点 -->
|
||||||
@ -188,10 +204,21 @@
|
|||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
<img :src="item.formattedData.mapImageUrl?item.formattedData.mapImageUrl:'https://api.znkjfw.com/admin-api/infra/file/4/get/等待点_png_179_1739326991439.png'" alt="" style="width: 100%;height: 100%;"/>
|
<img
|
||||||
|
:src="
|
||||||
|
item.formattedData.mapImageUrl
|
||||||
|
? item.formattedData.mapImageUrl
|
||||||
|
: 'https://api.znkjfw.com/admin-api/infra/file/4/get/等待点_png_179_1739326991439.png'
|
||||||
|
"
|
||||||
|
alt=""
|
||||||
|
style="width: 100%; height: 100%"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="item.type == 1" style="width: 10px; height: 10px; border-radius: 50%; background: #1890ff">
|
<div
|
||||||
|
v-if="item.type == 1"
|
||||||
|
style="width: 10px; height: 10px; border-radius: 50%; background: #1890ff"
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -610,6 +637,19 @@ const linkWebSocket = (url) => {
|
|||||||
// 监听消息
|
// 监听消息
|
||||||
socketClient.value.onMessage((message) => {
|
socketClient.value.onMessage((message) => {
|
||||||
console.log('收到消息:', message)
|
console.log('收到消息:', message)
|
||||||
|
if (message.type == 'map_push') {
|
||||||
|
let data = JSON.parse(testJson.content)
|
||||||
|
// console.log("============",data)
|
||||||
|
let dataList = []
|
||||||
|
for (let key in data) {
|
||||||
|
dataList.push({
|
||||||
|
macAddress: key,
|
||||||
|
data: JSON.parse(data[key])
|
||||||
|
})
|
||||||
|
}
|
||||||
|
console.log('=====', dataList)
|
||||||
|
testCarList.value = dataList
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, onUnmounted, nextTick, reactive } from 'vue'
|
import { ref, onMounted, onUnmounted, nextTick, reactive } from 'vue'
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
import { lte } from 'lodash-es'
|
|
||||||
|
|
||||||
// 创建一个响应式引用来保存DOM元素
|
// 创建一个响应式引用来保存DOM元素
|
||||||
const chartDom = ref(null)
|
const chartDom = ref(null)
|
||||||
|
Loading…
Reference in New Issue
Block a user