添加单车监测

master
夜笙歌 2 years ago
parent f5d78647a1
commit bf46ea7b20

@ -5,7 +5,7 @@ VITE_APP_TITLE = 若依管理系统
VITE_APP_ENV = 'production'
# 若依管理系统/生产环境
VITE_APP_BASE_API = '/prod-api'
VITE_APP_BASE_API = 'http://10.11.41.249:8080/dev-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli
VITE_BUILD_COMPRESS = gzip

@ -3,7 +3,7 @@ import request from '@/utils/request'
// 查询轮胎基础信息列表
export function listCarQueue(query) {
return request({
url: '/carqueue/carqueue/list',
url: '/carqueue/carqueue/carQueuelist',
method: 'get',
params: query
})
@ -12,7 +12,7 @@ export function listCarQueue(query) {
// 查询轮胎基础信息详细
export function getCarQueue(id) {
return request({
url: '/basetyre/basetyre/' + id,
url: '/carqueue/carqueue/' + id,
method: 'get'
})
}
@ -20,7 +20,7 @@ export function getCarQueue(id) {
// 新增轮胎基础信息
export function addCarQueue(data) {
return request({
url: '/basetyre/basetyre',
url: '/carqueue/carqueue',
method: 'post',
data: data
})
@ -29,7 +29,7 @@ export function addCarQueue(data) {
// 修改轮胎基础信息
export function updateCarQueue(data) {
return request({
url: '/basetyre/basetyre',
url: '/carqueue/carqueue',
method: 'put',
data: data
})
@ -38,7 +38,8 @@ export function updateCarQueue(data) {
// 删除轮胎基础信息
export function delCarQueue(id) {
return request({
url: '/basetyre/basetyre/' + id,
url: '/carqueue/carqueue/' + id,
method: 'delete'
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@ -1,6 +1,6 @@
export default {
login: {
title: '若依后台管理系统',
title: '轮胎智能云平台后台管理系统',
logIn: '登 录',
username: '账号',
password: '密码',

@ -66,16 +66,14 @@
</el-row>
<!-- 表格主体-->
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="postList" @click="clickRowHandle" @selection-change="handleSelectionChange">
<el-table-column type="expand">
<template #default="props">
<div>
<el-table :data="props.row.children">
<el-table-column label=" " prop=" " width="150"/>
<el-table-column label="Name" prop="title"/>
<el-table-column label="State" prop="state"/>
<el-table-column label="City" prop="createTime"/>
<el-table-column label="Address" prop="createBy"/>
<el-table :data="props.row.baseCarList">
<el-table-column v-if="false" align="center" label="id" prop="id"/>
<el-table-column align="center" label="车牌号" prop="carLicense"/>
<el-table-column align="center" label="State" prop="isDelete"/>
</el-table>
</div>
</template>
@ -84,7 +82,7 @@
<el-table-column :label="t('baseCar.carQueue.title')" align="center" prop="title" width="150"/>
<el-table-column :label="t('baseCar.carQueue.state')" align="center" prop="state"/>
<el-table-column :label="t('common.createTime')" align="center" prop="createTime"/>
<el-table-column :label="t('common.createBy')" align="center" prop="createBy"/>
<el-table-column :label="t('common.createBy')" align="center" prop="createName"/>
<el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"
width="160">
<template #default="scope">
@ -121,90 +119,13 @@
<el-form-item v-if="false" prop="id">
<el-input v-model="form.id"/>
</el-form-item>
<el-form-item :label="t('baseCar.carQueue.tyreFacCode')" prop="tyreFacCode">
<el-input
v-model="form.tyreFacCode"
:placeholder="t('common.pleaseEnter') + t('baseCar.carQueue.tyreFacCode')"/>
</el-form-item>
<el-form-item :label="t('baseCar.carQueue.companyCode')" prop="companyCode">
<el-input
v-model="form.companyCode"
:placeholder="t('common.pleaseEnter') + t('baseCar.carQueue.companyCode')"/>
</el-form-item>
<el-form-item :label="t('baseCar.carQueue.title')" prop="title">
<el-input
v-model="form.title"
:placeholder="t('common.pleaseEnter') + t('baseCar.carQueue.title')"/>
</el-form-item>
<el-form-item :label="t('baseCar.carQueue.state')" prop="state">
<el-input
v-model="form.state"
:placeholder="t('common.pleaseEnter') + t('baseCar.carQueue.state')"/>
</el-form-item>
<el-form-item :label="t('baseCar.carQueue.groupTotal')" prop="groupTotal">
<el-input
v-model="form.groupTotal"
:placeholder="t('common.pleaseEnter') + t('baseCar.carQueue.groupTotal')"/>
</el-form-item>
<el-form-item :label="t('baseCar.carQueue.carTotal')" prop="carTotal">
<el-input
v-model="form.carTotal"
:placeholder="t('common.pleaseEnter') + t('baseCar.carQueue.carTotal')"/>
</el-form-item>
<el-form-item :label="t('common.isRemove')" prop="isDelete">
<el-input
v-model="form.isDelete"
:placeholder="t('common.pleaseEnter') + t('common.isRemove')"/>
</el-form-item>
<el-form-item :label="t('common.createTime')" prop="createTime">
<el-date-picker
v-model="form.createTime"
:placeholder="t('common.PleaseSelect') + t('common.createTime')"
clearable
format="YYYY/MM/DD"
type="date"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item :label="t('common.creatorId')" prop="createId">
<el-input
v-model="form.createId"
:placeholder="t('common.pleaseEnter') + t('common.creatorId')"/>
</el-form-item>
<el-form-item :label="t('common.createBy')" prop="createBy">
<el-input
v-model="form.createBy"
:placeholder="t('common.pleaseEnter') + t('common.createBy')"/>
</el-form-item>
<el-form-item :label="t('common.creatorName')" prop="createName">
<el-input
v-model="form.createName"
:placeholder="t('common.pleaseEnter') + t('common.creatorName')"/>
</el-form-item>
<el-form-item :label="t('common.editTime')" prop="modifyTime">
<el-date-picker
v-model="form.modifyTime"
:placeholder="t('common.PleaseSelect') + t('common.editTime')"
clearable
format="YYYY/MM/DD"
type="date"
value-format="YYYY-MM-DD"
/>
</el-form-item>
<el-form-item :label="t('common.editID')" prop="modifyId">
<el-input
v-model="form.modifyId"
:placeholder="t('common.pleaseEnter') + t('common.editID')"/>
</el-form-item>
<el-form-item :label="t('common.editBy')" prop="modifyBy">
<el-input
v-model="form.modifyBy"
:placeholder="t('common.pleaseEnter') + t('common.editBy')"/>
</el-form-item>
<el-form-item :label="t('common.editName')" prop="modifyName">
<el-input
v-model="form.modifyName"
:placeholder="t('common.pleaseEnter') + t('common.editName')"/>
<el-switch v-model="form.state"/>
</el-form-item>
</el-form>
<template #footer>
@ -218,7 +139,13 @@
</template>
<script name="CarQueue" setup>
import {addCarQueue, delCarQueue, getCarQueue, listCarQueue, updateCarQueue} from "@/api/basecar/carqueue";
import {
addCarQueue,
delCarQueue,
getCarQueue,
listCarQueue,
updateCarQueue,
} from "@/api/basecar/carqueue";
import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie";
@ -252,59 +179,37 @@ const title = ref("");
const queryParams = ref({
pageNum: 1,
pageSize: 10,
tyreFacCode: undefined,
companyCode: undefined,
title: undefined,
state: undefined,
groupTotal: undefined,
carTotal: undefined,
isDelete: undefined,
createTime: undefined,
createId: undefined,
createBy: undefined,
createName: undefined,
modifyTime: undefined,
modifyId: undefined,
modifyBy: undefined,
modifyName: undefined,
})
//
const rules = {
brand: [{required: true, message: "轮胎品牌不能为空", trigger: "blur"}],
type: [{required: true, message: "轮胎型号不能为空", trigger: "blur"}],
serialNumber: [{required: true, message: "轮胎编号不能为空", trigger: "blur"}],
depth: [{required: true, message: "花纹深度不能为空", trigger: "blur"}],
title: [{required: true, message: "名称不能为空", trigger: "blur"}],
}
//
const form = ref({
id: null,
tyreFacCode: null,
companyCode: null,
title: null,
state: null,
groupTotal: null,
carTotal: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null,
modifyName: null,
state: true,
});
/** 查询岗位列表 */
function getList() {
const getList = async () => {
loading.value = true;
listCarQueue(queryParams.value).then(response => {
postList.value = response.rows;
total.value = response.total;
}).finally(() => {
loading.value = false;
// postList.value.forEach((e, index) => {
// postList.value[index][`children`] = [{
// Name: 1,
// State: 2,
// City: 3,
// Address: 4
// }]
// })
});
}
@ -318,21 +223,8 @@ function cancel() {
function reset() {
form.value = {
id: null,
tyreFacCode: null,
companyCode: null,
title: null,
state: null,
groupTotal: null,
carTotal: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null,
modifyName: null,
state: true,
};
proxy.resetForm("postRef");
}
@ -369,6 +261,7 @@ function handleUpdate(row) {
const postId = row.id || ids.value;
getCarQueue(postId).then(response => {
form.value = response.data;
form.value.state = response.data.state === 1
open.value = true;
title.value = t('baseCar.carQueue.editTitle');
});
@ -376,16 +269,18 @@ function handleUpdate(row) {
/** 提交按钮 */
function submitForm() {
let params = form.value
params.state = params.state ? 1 : 0
proxy.$refs["postRef"].validate(valid => {
if (valid) {
if (form.value.id != undefined) {
if (params.id != undefined) {
updateCarQueue(form.value).then(response => {
proxy.$modal.msgSuccess(t('option.modificationSuccessful'));
open.value = false;
getList();
});
} else {
addCarQueue(form.value).then(response => {
addCarQueue(params).then(response => {
proxy.$modal.msgSuccess(t('option.addedSuccessfully'));
open.value = false;
getList();
@ -397,7 +292,7 @@ function submitForm() {
/** 删除按钮操作 */
function handleDelete(row) {
const postIds = row.postId || ids.value;
const postIds = row.id || ids.value;
proxy.$modal.confirm(t('option.confirmDeletion', {
key: t('baseCar.carQueue.tyreFacCode'),
value: postIds

@ -30,17 +30,6 @@
>{{ t('option.add') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
v-hasPermi="['cartype:cartype:edit']"
:disabled="single"
icon="Edit"
plain
type="success"
@click="handleUpdate"
>{{ t('option.edit') }}
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
v-hasPermi="['cartype:cartype:remove']"
@ -67,6 +56,7 @@
<!-- 表格主体-->
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table-column align="center" fixed type="selection" width="55"/>
<el-table-column :label="t('baseCar.carType.title')" align="center" prop="title"/>
<el-table-column :label="t('baseCar.carType.state')" align="center" prop="state"
width="150"/>
@ -294,7 +284,7 @@ const rules = {
const form = ref({
id: null,
axleTotal: 2,
state: false,
state: true,
});
/** 查询岗位列表 */
@ -319,7 +309,7 @@ function reset() {
form.value = {
id: null,
axleTotal: 2,
state: false,
state: true,
};
TireRowInfo.value = [1, 1]
proxy.resetForm("postRef");
@ -398,7 +388,7 @@ function submitForm() {
/** 删除按钮操作 */
function handleDelete(row) {
const postIds = row.postId || ids.value;
const postIds = row.id || ids.value;
proxy.$modal.confirm(t('option.confirmDeletion', {
key: t('baseCar.carType.tyreFacCode'), value: postIds
})).then(function () {

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

@ -0,0 +1,235 @@
<template>
<div>
<el-row :gutter="12">
<el-col :offset="1" :span="5">
<el-card shadow="hover" style="margin:24px 0 ">
<h2>车辆信息</h2>
<p>车队名称<span>{{ cardInfo.name }}</span></p>
<p>出厂编号<span>{{ cardInfo.No }}</span></p>
<p>车型号<span>{{ cardInfo.type }}</span></p>
<p>线路<span>{{ cardInfo.line }}</span></p>
</el-card>
<h2>实时位置</h2>
<div id="container"></div>
<div style="width: 25%;text-align: center;margin-top: 14px">
<img height="70" src="@/assets/images/tyre.png" style="" width="70"/>
<div style="width: 100%;font-size: 12px;white-space:nowrap">轮胎详情</div>
</div>
</el-col>
<el-col :offset="1" :span="11">
<div style="width: 100%;text-align: center">
<p style="font-weight: 600;font-size: 20px;margin-top: 32px">单车监控</p>
<p style="font-weight: 600;font-size: 16px;color:#cba658">名称1 里程000.00km</p>
</div>
<div v-for="(item,index) in 5" key="index" style="margin-bottom: 18px">
<div
style="width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid #666;border-radius: 10%">
</div>
<div
style="width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid #666;border-radius: 10%">
</div>
<img sizes="100% 100%" src="@/assets/images/zhou.png"
style="width: calc(50% - 108px);height: 100px;display: inline-block;vertical-align:top"/>
<div
style="width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid #666;border-radius: 10%">
</div>
<div
style="width: 12.5%;margin: 0 12px; height: 100px;display: inline-block;border: 1px solid #666;border-radius: 10%">
</div>
</div>
</el-col>
<el-col :offset="1" :span="5">
<el-tabs
v-model="tabsName"
type="card"
@tab-click="resetQuery"
>
<el-tab-pane label="有车载设备车辆" name="有车载设备车辆">
<el-form ref="queryRef" :inline="true" :model="queryParams"
label-width="60px">
<el-form-item label="车队" prop="carLicense">
<el-input
v-model="queryParams.params1"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="车牌号" prop="carLicense">
<el-input
v-model="queryParams.params2"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label=" ">
<el-button icon="Search" type="primary" @click="handleQuery">{{ t('option.search') }}</el-button>
<el-button icon="Refresh" @click="resetQuery">{{ t('option.reset') }}</el-button>
</el-form-item>
</el-form>
<el-table
:data="tableData"
ref="tableRef1"
:show-header="false"
highlight-current-row
style="width: 100%"
@current-change="tableChange"
>
<el-table-column label="params3" prop="params3"/>
</el-table>
</el-tab-pane>
<el-tab-pane label="无车载设备车辆" name="无车载设备车辆">
<el-form ref="queryRef" :inline="true" :model="queryParams"
label-width="60px">
<el-form-item label="车队" prop="carLicense">
<el-input
v-model="queryParams.params1"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="车牌号" prop="carLicense">
<el-input
v-model="queryParams.params2"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label=" ">
<el-button icon="Search" type="primary" @click="handleQuery">{{ t('option.search') }}</el-button>
<el-button icon="Refresh" @click="resetQuery">{{ t('option.reset') }}</el-button>
</el-form-item>
</el-form>
<el-table
:data="tableData"
ref="tableRef"
:show-header="false"
highlight-current-row
style="width: 100%"
@current-change="tableChange"
>
<el-table-column label="params3" prop="params3"/>
</el-table>
</el-tab-pane>
</el-tabs>
</el-col>
</el-row>
</div>
</template>
<script setup>
import AMapLoader from '@amap/amap-jsapi-loader';
import {useI18n} from "vue-i18n";
import {ref} from 'vue'
const {proxy} = getCurrentInstance();
const {t} = useI18n();
const tableRef1 = ref()
proxy.$nextTick(() => {
tableRef1.value.setCurrentRow(tableData.value[0])
})
const tableChange = (e) => {
console.log(e)
}
const cardInfo = ref({
name: '名称',
No: '123',
type: '2',
line: '3',
})
const tabsName = ref('有车载设备车辆')
const queryParams = ref({
params1: '',
params2: '',
})
const tableData = ref([
{
params3: '1233'
},
{
params3: '1233'
},
{
params3: '1233'
},
{
params3: '1233'
},
{
params3: '1233'
},
])
/** 搜索按钮操作 */
function handleQuery() {
queryParams.value.pageNum = 1;
// getList();
}
/** 重置按钮操作 */
const resetQuery = () => {
queryParams.value = {
params1: '',
params2: '',
}
handleQuery();
}
let map = null
let polyline = null
let passedPolyline = null
let mouseTool = null
let path = [[116.478935, 39.997761], [103.85094, 35.987496], [106.205794, 38.458831], [108.983569, 34.285675], [111.761777, 40.875595]]
AMapLoader.load({
key: "ba8fb8d8bae1b280b93406d5959d492f", // WebKey load
// version: "1.4.15", //
version: "2.0", //
plugins: [],
AMapUI: {
version: '1.1',
plugins: []
}
}).then((AMap) => {
map = new AMap.Map("container", { //id
viewMode: "3D", //3D
zoom: 16, //
center: [116.397428, 39.90923], //
});
}).catch(e => {
console.log(e);
})
</script>
<style>
#container {
padding: 0px;
margin: 0px;
width: 100%;
height: calc(30vh - 84px);
min-height: 200px;
}
.el-tabs__nav {
width: 100%;
border: 0 !important;
}
.el-tabs__item {
width: 50%;
text-align: center;
}
.el-tabs {
border: 1px solid #ddd
}
</style>

@ -114,7 +114,7 @@ const setMarker = async () => {
//
let marker = new AMap.Marker({
content: '<img class="markerIcon" />',
content: '<div class="markerIcon" />',
position: e.location,
anchor: 'bottom-center',
offset: new AMap.Pixel(0, 0),

@ -1,7 +1,7 @@
<template>
<div class="register">
<el-form ref="registerRef" :model="registerForm" :rules="registerRules" class="register-form">
<h3 class="title">若依后台管理系统</h3>
<h3 class="title">轮胎智能云平台后台管理系统</h3>
<el-form-item prop="username">
<el-input
v-model="registerForm.username"

@ -31,8 +31,8 @@ export default defineConfig(({mode, command}) => {
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': {
// target: 'http://10.11.41.249:8080',
target: 'http://localhost:8080',
target: 'http://10.11.41.249:8080',
// target: 'http://localhost:8080',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}

Loading…
Cancel
Save