添加搜索条件

master
夜笙歌 2 years ago
parent 9bc94a2afe
commit a10e60718b

@ -128,7 +128,45 @@ export default {
startingTime: 'starting Time',
startDate: 'start Date',
endTime: 'end Time',
endDate: 'end Date'
endDate: 'end Date',
import:'import',
dragTheFileHereOr:'Drag the file here, or',
clickUpload:'Click upload',
whetherToUpdateExistingUserData:'Whether to update existing user data',
onlyXlsAndXlsxFilesCanBeImported:'Only xls and xlsx files can be imported',
downloadTemplate:'Download template'
},
web:{
factory: 'factory',
tireNumber: 'tire Number',
brand: 'brand',
pattern: 'pattern',
tireSpecificationModel: 'tire Specification Model',
sensorNumber: 'sensor Number',
numberPlate: 'number Plate',
currentlyInstalledVehicles:'currently installed vehicles',
mountingWheelPosition:'mounting wheel position',
depthOfLatestPattern:'depth of latest pattern',
usingEnterprise:'Using enterprise',
team:'team',
licensePlateNumber:'license plate number',
rowLeftOuterTire: 'row the left outer tire',
rowLeftInnerTube: 'row the left inner tube',
rowRightInnerTube: 'row the right inner tube',
rowRightOuterTire: 'row the right outer tire',
currentTirePosition:'当前轮胎位置',
tyreNumber:'轮胎编号',
tireBrand:'轮胎品牌',
specificationAndModel:'规格型号',
SensorID:'传感器ID',
mileage:'里程',
ModifiedPatternDepth:'修改花纹深度',
InstallationReplacement:'安装/更换',
UnloadingTire:'卸载轮胎'
},
other:{
tireInformationImport:'Tire information import',
theTireNumberCannotBeEmpty:'The tire number cannot be empty'
},
tireManagement: {
info: {

@ -125,21 +125,58 @@ export default {
editAccount: '修改者账号',
editName: '编辑者姓名',
editBy: '修改人',
startingTime:'开始时间',
startDate:'开始日期',
endTime:'结束时间',
endDate:'结束日期'
startingTime: '开始时间',
startDate: '开始日期',
endTime: '结束时间',
endDate: '结束日期',
import: '导入',
dragTheFileHereOr: '将文件拖到此处,或',
clickUpload: '点击上传',
whetherToUpdateExistingUserData: '是否更新已经存在的用户数据',
onlyXlsAndXlsxFilesCanBeImported: '仅允许导入xls、xlsx格式文件',
downloadTemplate: '下载模板'
},
web: {
factory: '工厂',
tireNumber: '外胎号',
brand: '品牌',
pattern: '花纹',
tireSpecificationModel: '轮胎规格型号',
sensorNumber: '传感器编号',
numberPlate: '车牌号',
currentlyInstalledVehicles: '目前所安装车辆',
mountingWheelPosition: '安装轮位',
depthOfLatestPattern: '最新花纹深度',
usingEnterprise: '使用企业',
team: '所属车队',
licensePlateNumber: '车牌号',
rowLeftOuterTire: '排左侧外胎',
rowLeftInnerTube: '排左侧内胎',
rowRightInnerTube: '排右侧内胎',
rowRightOuterTire: '排右侧外胎',
currentTirePosition:'当前轮胎位置',
tyreNumber:'轮胎编号',
tireBrand:'轮胎品牌',
specificationAndModel:'规格型号',
SensorID:'传感器ID',
mileage:'里程',
ModifiedPatternDepth:'修改花纹深度',
InstallationReplacement:'安装/更换',
UnloadingTire:'卸载轮胎'
},
other: {
tireInformationImport: '轮胎信息导入',
theTireNumberCannotBeEmpty: '胎号不能为空'
},
tireManagement: {
info: {
factory: '工厂',
tireNumber: '外胎号',
brand:'品牌',
pattern:'花纹',
tireSpecificationModel:'轮胎规格型号',
sensorNumber:'传感器编号',
numberPlate:'车牌号',
creationTime:'创建时间'
brand: '品牌',
pattern: '花纹',
tireSpecificationModel: '轮胎规格型号',
sensorNumber: '传感器编号',
numberPlate: '车牌号',
}
},
tireManagement1: {

@ -83,31 +83,70 @@ AMapLoader.load({
}).catch(e => {
console.log(e);
})
const convertFrom = (LngLatArray, success) =>{
var LngLatArray2 = [];
var size = 40;
var pageNum = parseInt((LngLatArray.length + size - 1) / size);
var convertNum = 0;
for (var i = 0; i < pageNum; i++) {
var LngLatArraySlice = LngLatArray.slice(i * size, (i + 1) * size);
convert(LngLatArraySlice, i);
}
function convert(LngLatArray, n) {
AMap.convertFrom(LngLatArray, 'gps', function (status, result) {
if (status == 'complete') {
LngLatArray2[n] = (result.locations);
convertNum++;
if (convertNum >= pageNum) {
typeof success == "function" ? success([].concat.apply([], LngLatArray2)) : null;
}
}
});
};
}
const handleQuery = () => {
polyline ? map.remove([polyline]) : ''
getTrack(proxy.addDateRange(queryParams.value, dateRange.value)).then(e => {
let pathRow = e.data.map(val => [val.longitude, val.latitude])
let grasp = new AMap.GraspRoad();
AMap.convertFrom(pathRow, 'gps', function (status, result) {
if (result.info === 'ok') {
let lnglats = result.locations.map(e => [e.lng, e.lat]);
polyline = new AMap.Polyline({
strokeColor: '#00BBFF', // 线-
path: lnglats,
strokeWeight: 6 // 线
})
map.add(polyline);
let distance = Math.round(AMap.GeometryUtil.distanceOfLine(lnglats));
let text = new AMap.Text({
position: lnglats.at(-1),
text: '行驶路径' + distance + '米',
offset: new AMap.Pixel(-20, -20)
})
map.add(text);
map.setFitView()
}
convertFrom(pathRow,(result)=>{
let lnglats = result.map(e => [e.lng, e.lat]);
console.log(lnglats)
polyline = new AMap.Polyline({
strokeColor: '#00BBFF', // 线-
path: lnglats,
strokeWeight: 6 // 线
})
map.add(polyline);
let distance = Math.round(AMap.GeometryUtil.distanceOfLine(lnglats));
let text = new AMap.Text({
position: lnglats.at(-1),
text: '行驶路径' + distance + '米',
offset: new AMap.Pixel(-20, -20)
})
map.add(text);
map.setFitView()
})
let grasp = new AMap.GraspRoad();
// AMap.convertFrom(pathRow, 'gps', function (status, result) {
// if (result.info === 'ok') {
// let lnglats = result.locations.map(e => [e.lng, e.lat]);
// polyline = new AMap.Polyline({
// strokeColor: '#00BBFF', // 线-
// path: lnglats,
// strokeWeight: 6 // 线
// })
// map.add(polyline);
// let distance = Math.round(AMap.GeometryUtil.distanceOfLine(lnglats));
// let text = new AMap.Text({
// position: lnglats.at(-1),
// text: '' + distance + '',
// offset: new AMap.Pixel(-20, -20)
// })
// map.add(text);
// map.setFitView()
// }
// })
// }
// });
polylinePath.value = pathRow

@ -18,7 +18,6 @@ const markers = ref([])
const nowData = ref(null)
const treeDefaultProps = {label: 'title', children: 'baseCarList'}
const treeClick = (data, zoom) => {
console.log('123123', parseFloat(zoom) || 14)
nowData.value = data
if (!data?.baseCarList) {
map.remove(markers.value);

@ -3,70 +3,70 @@
<!-- 搜索栏-->
<el-form v-show="showSearch" ref="queryRef" :inline="true" :label-width=" locale ? '100px':'180px'"
:model="queryParams">
<el-form-item :label="t('tireManagement.info.factory')" prop="tyreFactory">
<el-form-item :label="t('web.factory')" prop="tyreFactory">
<el-input
v-model="queryParams.tyreFactory"
:placeholder="t('common.pleaseEnter') + t('tireManagement.info.factory')"
:placeholder="t('common.pleaseEnter') + t('web.factory')"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('tireManagement.info.tireNumber')" prop="outerTireNumber">
<el-form-item :label="t('web.tireNumber')" prop="outerTireNumber">
<el-input
v-model="queryParams.outerTireNumber"
:placeholder="t('common.pleaseEnter') + t('tireManagement.info.tireNumber')"
:placeholder="t('common.pleaseEnter') + t('web.tireNumber')"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('tireManagement.info.brand')" prop="brand">
<el-form-item :label="t('web.brand')" prop="brand">
<el-input
v-model="queryParams.brand"
:placeholder="t('common.pleaseEnter') + t('tireManagement.info.brand')"
:placeholder="t('common.pleaseEnter') + t('web.brand')"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('tireManagement.info.pattern')" prop="pattern">
<el-form-item :label="t('web.pattern')" prop="pattern">
<el-input
v-model="queryParams.pattern"
:placeholder="t('common.pleaseEnter') + t('tireManagement.info.pattern')"
:placeholder="t('common.pleaseEnter') + t('web.pattern')"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('tireManagement.info.tireSpecificationModel')" prop="size">
<el-form-item :label="t('web.tireSpecificationModel')" prop="size">
<el-input
v-model="queryParams.size"
:placeholder="t('common.pleaseEnter') + t('tireManagement.info.tireSpecificationModel')"
:placeholder="t('common.pleaseEnter') + t('web.tireSpecificationModel')"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('tireManagement.info.sensorNumber')" prop="sensorId">
<el-form-item :label="t('web.sensorNumber')" prop="sensorId">
<el-input
v-model="queryParams.sensorId"
:placeholder="t('common.pleaseEnter') + t('tireManagement.info.sensorNumber')"
:placeholder="t('common.pleaseEnter') + t('web.sensorNumber')"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('tireManagement.info.numberPlate')" prop="carLicense">
<el-form-item :label="t('web.numberPlate')" prop="carLicense">
<el-input
v-model="queryParams.carLicense"
:placeholder="t('common.pleaseEnter') + t('tireManagement.info.numberPlate')"
:placeholder="t('common.pleaseEnter') + t('web.numberPlate')"
clearable
style="width: 200px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item :label="t('tireManagement.info.creationTime')">
<el-form-item :label="t('common.createTime')">
<el-date-picker
v-model="dateRange"
:end-placeholder="t('common.endDate')"
@ -113,7 +113,7 @@
plain
type="info"
@click="handleImport"
>导入
>{{ t('common.import') }}
</el-button>
</el-col>
<el-col :span="1.5">
@ -132,18 +132,18 @@
<!-- 表格主体-->
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table-column align="center" fixed type="selection" width="55"/>
<el-table-column align="center" label="工厂" prop="tyreFactory" width="150"/>
<el-table-column align="center" label="外胎号" prop="outerTireNumber" width="150"/>
<el-table-column align="center" label="品牌" prop="brand" width="150"/>
<el-table-column align="center" label="规格型号" prop="size" width="150"/>
<el-table-column align="center" label="花纹" prop="pattern" width="150"/>
<el-table-column align="center" label="目前所安装车辆" prop="carLicense" width="150"/>
<el-table-column align="center" label="安装轮位" prop="tyrePosition" width="150"/>
<el-table-column align="center" label="传感器编号" prop="sensorId" width="150"/>
<el-table-column align="center" label="最新花纹深度(mm)" prop="currentTextureDepth" width="170"/>
<el-table-column align="center" label="创建时间" prop="createTime" width="170"/>
<el-table-column align="center" label="创建者" prop="createName" width="170"/>
<el-table-column align="center" label="使用企业" prop="companyCode" width="170"/>
<el-table-column align="center" :label="t('web.factory')" prop="tyreFactory" width="150"/>
<el-table-column align="center" :label="t('web.tireNumber')" prop="outerTireNumber" width="150"/>
<el-table-column align="center" :label="t('web.brand')" prop="brand" width="150"/>
<el-table-column align="center" :label="t('web.tireSpecificationModel')" prop="size" :width=" locale ? 150:200"/>
<el-table-column align="center" :label="t('web.pattern')" prop="pattern" width="150"/>
<el-table-column align="center" :label="t('web.currentlyInstalledVehicles')" prop="carLicense" :width=" locale ? 150:200"/>
<el-table-column align="center" :label="t('web.mountingWheelPosition')" prop="tyrePosition" :width=" locale ? 150:200"/>
<el-table-column align="center" :label="t('web.sensorNumber')" prop="sensorId" width="150"/>
<el-table-column align="center" :label="t('web.depthOfLatestPattern')" prop="currentTextureDepth" width="170"/>
<el-table-column align="center" :label="t('common.createTime')" prop="createTime" width="170"/>
<el-table-column align="center" :label="t('common.createBy')" prop="createName" width="170"/>
<el-table-column align="center" :label="t('web.usingEnterprise')" prop="companyCode" width="170"/>
<el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"
width="160">
<template #default="scope">
@ -170,24 +170,24 @@
<!-- 添加或修改岗位对话框 -->
<el-dialog v-model="open" :title="title" append-to-body width="500px">
<el-form ref="postRef" :label-width=" locale ? '100px':'140px'" :model="form" :rules="rules">
<el-form ref="postRef" :label-width=" locale ? '100px':'180px'" :model="form" :rules="rules">
<el-form-item v-if="false" prop="id">
<el-input v-model="form.id"/>
</el-form-item>
<el-form-item label="胎号" prop="outerTireNumber">
<el-form-item :label="t('web.tireNumber')" prop="outerTireNumber">
<el-input v-model="form.outerTireNumber"/>
</el-form-item>
<el-form-item label="品牌" prop="brand">
<el-form-item :label="t('web.brand')" prop="brand">
<el-input v-model="form.brand"/>
</el-form-item>
<el-form-item label="规格型号" prop="size">
<el-form-item :label="t('web.tireSpecificationModel')" prop="size">
<el-input v-model="form.size"/>
</el-form-item>
<el-form-item label="花纹" prop="pattern">
<el-form-item :label="t('web.pattern')" prop="pattern">
<el-input v-model="form.pattern"/>
</el-form-item>
<el-form-item :label="t('tireManagement1.treadDepth')" prop="currentTextureDepth">
<el-form-item :label="t('web.depthOfLatestPattern')" prop="currentTextureDepth">
<el-input-number
v-model="form.currentTextureDepth"
:max="99"
@ -223,24 +223,24 @@
<el-icon class="el-icon--upload">
<upload-filled/>
</el-icon>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__text">{{ t('common.dragTheFileHereOr') }}<em>{{ t('common.clickUpload') }}</em></div>
<template #tip>
<div class="el-upload__tip text-center">
<div class="el-upload__tip">
<el-checkbox v-model="upload.updateSupport"/>
是否更新已经存在的用户数据
{{ t('common.whetherToUpdateExistingUserData') }}
</div>
<span>仅允许导入xlsxlsx格式文件</span>
<span>{{ t('common.onlyXlsAndXlsxFilesCanBeImported') }}</span>
<el-link :underline="false" style="font-size:12px;vertical-align: baseline;" type="primary"
@click="importTemplate">下载模板
@click="importTemplate">{{ t('common.downloadTemplate') }}
</el-link>
</div>
</template>
</el-upload>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="upload.open = false"> </el-button>
<el-button type="primary" @click="submitFileForm">{{ t('option.ok') }}</el-button>
<el-button @click="upload.open = false">{{ t('option.cancel') }}</el-button>
</div>
</template>
</el-dialog>
@ -334,7 +334,7 @@ const queryParams = ref({
//
const rules = {
outerTireNumber: [{required: true, message: "胎号不能为空", trigger: "blur"}],
outerTireNumber: [{required: true, message: t('other.theTireNumberCannotBeEmpty'), trigger: "blur"}],
// type: [{required: true, message: "", trigger: "blur"}],
// serialNumber: [{required: true, message: "", trigger: "blur"}],
}
@ -487,11 +487,11 @@ const handleFileSuccess = (response, file, fileList) => {
/** 提交上传文件 */
function submitFileForm() {
proxy.$refs["uploadRef"].submit();
};
}
/** 导入按钮操作 */
function handleImport() {
upload.title = "轮胎信息导入";
upload.title = t('other.tireInformationImport') ;
upload.open = true;
};
getList();

@ -1,8 +1,8 @@
<template>
<div class="app-container">
<el-form :model="form" inline label-width="80px">
<el-form-item label="所属车队">
<el-select v-model="form.carQueue" placeholder="请选择" @change="carQueueChange">
<el-form :model="form" inline :label-width=" locale ? '80px':'160px'">
<el-form-item :label="t('web.team')">
<el-select v-model="form.carQueue" :placeholder="t('common.PleaseSelect')" @change="carQueueChange">
<el-option
v-for="item in carQueueOption"
:key="item.value"
@ -11,8 +11,8 @@
/>
</el-select>
</el-form-item>
<el-form-item label="车牌号">
<el-select v-model="form.licenseNumber" :disabled='isLicenseNumber' placeholder="请选择"
<el-form-item :label="t('web.licensePlateNumber')">
<el-select v-model="form.licenseNumber" :disabled='isLicenseNumber' :placeholder="t('common.PleaseSelect')"
@change="licenseNumberChange">
<el-option
v-for="item in licenseNumberOption"
@ -26,36 +26,36 @@
<div style="display: inline-block;width: 560px;height:auto">
<div class="bg" style="margin-right: 40px;">
<div v-for="(item,index) in tireArrangement">
<div class="item" @click="tyreClick((index+1)+'-1-1',((index+1)+'排左侧外胎'))">
<div class="item" @click="tyreClick((index+1)+'-1-1',((index+1)+t('web.rowLeftOuterTire')))">
<div
:style="`background-color:${backgroundColorState((index+1)+'-1-1')};border-color:${borderColorState((index+1)+'-1-1')}`"
class="circle">
<span>{{ index + 1 }}排左侧外胎</span>
<span style="white-space: nowrap">{{ index + 1 }}{{ t('web.rowLeftOuterTire') }}</span>
</div>
</div>
<div class="item" @click="tyreClick((index+1)+'-1-2',((index+1)+'排左侧内胎'))">
<div class="item" @click="tyreClick((index+1)+'-1-2',((index+1)+t('web.rowLeftInnerTube')))">
<div
:style="`${item === 2? '':'display:none;'}background-color:${backgroundColorState((index+1)+'-1-2')};border-color:${borderColorState((index+1)+'-1-2')}`"
class="circle">
<span>{{ index + 1 }}排左侧内胎</span>
<span style="white-space: nowrap">{{ index + 1 }}{{ t('web.rowLeftInnerTube') }}</span>
</div>
</div>
</div>
</div>
<div class="bg">
<div v-for="(item,index) in tireArrangement">
<div class="item" @click="tyreClick((index+1)+'-2-2',((index+1)+'排右侧内胎'))">
<div class="item" @click="tyreClick((index+1)+'-2-2',((index+1)+t('web.rowRightInnerTube')))">
<div
:style="`${item === 2? '':'display:none;'}background-color:${backgroundColorState((index+1)+'-2-2')};border-color:${borderColorState((index+1)+'-2-2')}`"
class="circle">
<span>{{ index + 1 }}排右侧内胎</span>
<span style="white-space: nowrap">{{ index + 1 }}{{ t('web.rowRightInnerTube') }}</span>
</div>
</div>
<div class="item" @click="tyreClick((index+1)+'-2-1',((index+1)+'排右侧外胎'))">
<div class="item" @click="tyreClick((index+1)+'-2-1',((index+1)+ t('web.rowRightOuterTire') ))">
<div
:style="`background-color:${backgroundColorState((index+1)+'-2-1')};border-color:${borderColorState((index+1)+'-2-1')}`"
class="circle">
<span>{{ index + 1 }}排右侧外胎</span>
<span style="white-space: nowrap">{{ index + 1 }}{{ t('web.rowRightOuterTire') }}</span>
</div>
</div>
</div>
@ -64,10 +64,10 @@
<div v-if="!!nowClick"
style="display: inline-block;width: calc(100% - 600px);margin-left: 40px;max-width:400px;height: 200px;vertical-align:top;">
<el-form ref="form22" :model="form2" :rules="rules" inline label-width="120px">
<el-form-item label="当前轮胎位置" style="width: 100%;">
<el-form-item :label="t('web.currentTirePosition')" style="width: 100%;">
{{ form2.location }}
</el-form-item>
<el-form-item label="轮胎编号" prop="outerTireNumber" style="width: 100%;">
<el-form-item :label="t('web.tyreNumber')" prop="outerTireNumber" style="width: 100%;">
<!-- <el-select-->
<!-- v-model="value"-->
<!-- :loading="loading"-->
@ -91,28 +91,28 @@
</template>
</el-input>
</el-form-item>
<el-form-item label="轮胎品牌" style="width: 100%;">
<el-form-item :label="t('web.tireBrand')" style="width: 100%;">
<el-input v-model="form2.brand" disabled/>
</el-form-item>
<el-form-item label="规格型号" style="width: 100%;">
<el-form-item :label="t('web.specificationAndModel')" style="width: 100%;">
<el-input v-model="form2.size" disabled/>
</el-form-item>
<el-form-item label="传感器ID" style="width: 100%;">
<el-form-item :label="t('web.SensorID')" style="width: 100%;">
<el-input v-model="form2.sensorId"/>
</el-form-item>
<el-form-item label="里程" style="width: 100%;">
<el-form-item :label="t('web.mileage')" style="width: 100%;">
<el-input-number v-model="form2.carOnlineMileage"/>
</el-form-item>
<el-form-item label="当前花纹深度" style="width: 100%;">
<el-form-item :label="t('web.depthOfLatestPattern')" style="width: 100%;">
<el-input-number v-model="form2.currentTextureDepth" :precision="2" :step="0.1"/>
&nbsp; &nbsp;
<el-button @click="EditPatternTextureDepthFun"></el-button>
<el-button @click="EditPatternTextureDepthFun">{{ t('web.ModifiedPatternDepth') }}</el-button>
</el-form-item>
<el-form-item label=" ">
<el-button type="primary" @click="installClick()">/</el-button>
<el-button type="primary" @click="installClick()">{{ t('web.InstallationReplacement') }}</el-button>
<!-- <el-button type="primary" @click="installClick(1)">/</el-button>-->
<!-- <el-button type="primary" @click="installClick(2)"></el-button>-->
<el-button :disabled="!form2?.tyreId" @click="uninstallClick(3)"></el-button>
<el-button :disabled="!form2?.tyreId" @click="uninstallClick(3)">{{ t('web.UnloadingTire') }}</el-button>
</el-form-item>
</el-form>
</div>
@ -159,7 +159,7 @@ const form2 = ref({
})
const rules = {
outerTireNumber: [
{required: true, message: '请输入轮胎编号', trigger: 'change'},
{required: true, message: t('other.theTireNumberCannotBeEmpty'), trigger: 'change'},
]
}
const outerTireNumberOption = ref([

Loading…
Cancel
Save