修改车辆基础信息界面

master
夜笙歌 2 years ago
parent 3f166cfc02
commit 748d5e9b58

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

@ -74,6 +74,20 @@ export default {
small:'Small', small:'Small',
wait:'Please wait, setting layout size...', wait:'Please wait, setting layout size...',
}, },
request:{
repeatedSubmit:'The data is being processed, please do not submit repeatedly',
LoginStatusExpired:'The login status has expired, you can stay on this page, or log in again',
systemHint:'System hint',
reRegister:'Re-register',
cancel:'Cancel',
expired:'Invalid session, or session expired, please log in again.',
connectionException:'Abnormal backend interface connection',
timeout:'System interface request timed out',
interface:'System Interface ',
exception:' Exception',
download:'Downloading data, please wait',
downloadErr:'There was an error downloading the file, please contact the administrator!'
},
option: { option: {
refresh: 'refresh', refresh: 'refresh',
option: 'option', option: 'option',
@ -209,6 +223,8 @@ export default {
internationalization18:'en18', internationalization18:'en18',
internationalization19:'en19', internationalization19:'en19',
internationalization20:'en20', internationalization20:'en20',
addTitle: 'Add internationalization21',
editTitle: 'Modify internationalization22',
} }
} }
} }

@ -74,6 +74,20 @@ export default {
small:'稍小', small:'稍小',
wait:'正在设置布局大小,请稍候...', wait:'正在设置布局大小,请稍候...',
}, },
request:{
repeatedSubmit:'数据正在处理,请勿重复提交',
LoginStatusExpired:'登录状态已过期,您可以继续留在该页面,或者重新登录',
systemHint:'系统提示',
reRegister:'重新登录',
cancel:'取消',
expired:'无效的会话,或者会话已过期,请重新登录。',
connectionException:'后端接口连接异常',
timeout:'系统接口请求超时',
interface:'系统接口',
exception:'异常',
download:'正在下载数据,请稍候',
downloadErr:'下载文件出现错误,请联系管理员!'
},
option: { option: {
refresh: '刷新', refresh: '刷新',
option: '操作', option: '操作',
@ -209,6 +223,8 @@ export default {
internationalization18:'zh18', internationalization18:'zh18',
internationalization19:'zh19', internationalization19:'zh19',
internationalization20:'zh20', internationalization20:'zh20',
addTitle: '添加设备信息',
editTitle: '修改设备信息',
} }
} }
} }

@ -1,252 +1,19 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索栏--> <!-- 搜索栏-->
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" <el-form v-show="showSearch" ref="queryRef" :inline="true" :label-width=" locale ? '110px':'170px'"
:label-width=" locale ? '110px':'170px'"> :model="queryParams">
<!-- <el-form-item :label="t('baseCar.car.companyCode')" prop="companyCode">-->
<!-- <el-input-->
<!-- v-model="queryParams.companyCode"-->
<!-- :placeholder=" t('common.pleaseEnter') + t('baseCar.car.companyCode')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.carQueueId')" prop="carQueueId">-->
<!-- <el-input-->
<!-- v-model="queryParams.carQueueId"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.carQueueId')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.carTypeId')" prop="carTypeId">-->
<!-- <el-input-->
<!-- v-model="queryParams.carTypeId"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.carTypeId')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item :label="t('baseCar.car.carLicense')" prop="carLicense"> <el-form-item :label="t('baseCar.car.carLicense')" prop="carLicense">
<el-input <el-input
v-model="queryParams.carLicense" v-model="queryParams.carLicense"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicense')" :placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicense')"
style="width: 200px"
clearable clearable
style="width: 200px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item :label="t('baseCar.car.carLicenseIn')" prop="carLicenseIn">-->
<!-- <el-input-->
<!-- v-model="queryParams.carLicenseIn"-->
<!-- :placeholder="t('common.pleaseEnter') +t('baseCar.car.carLicenseIn')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.carLicenseParent')" prop="carLicenseParent">-->
<!-- <el-input-->
<!-- v-model="queryParams.carLicenseParent"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicenseParent')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.carIdParent')" prop="carIdParent">-->
<!-- <el-input-->
<!-- v-model="queryParams.carIdParent"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.carIdParent')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.userId')" prop="userId">-->
<!-- <el-input-->
<!-- v-model="queryParams.userId"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.userId')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.userName')" prop="userName">-->
<!-- <el-input-->
<!-- v-model="queryParams.userName"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.userName')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.deviceId')" prop="deviceId">-->
<!-- <el-input-->
<!-- v-model="queryParams.deviceId"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.deviceId')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.deviceBindTime')" prop="deviceBindTime">-->
<!-- <el-date-picker-->
<!-- clearable-->
<!-- style="width: 200px"-->
<!-- v-model="queryParams.deviceBindTime"-->
<!-- type="date"-->
<!-- format="YYYY/MM/DD"-->
<!-- value-format="YYYY-MM-DD"-->
<!-- :placeholder="t('common.PleaseSelect') + t('baseCar.car.deviceBindTime')"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.firstChangeDate')" prop="firstChangeDate">-->
<!-- <el-date-picker-->
<!-- clearable-->
<!-- style="width: 200px"-->
<!-- v-model="queryParams.firstChangeDate"-->
<!-- type="date"-->
<!-- format="YYYY/MM/DD"-->
<!-- value-format="YYYY-MM-DD"-->
<!-- :placeholder="t('common.PleaseSelect') + t('baseCar.car.firstChangeDate')"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.trailerNum')" prop="trailerNum">-->
<!-- <el-input-->
<!-- v-model="queryParams.trailerNum"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.trailerNum')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.isHandDevice')" prop="isHandDevice">-->
<!-- <el-input-->
<!-- v-model="queryParams.isHandDevice"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.isHandDevice')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.isHasDevice')" prop="isHasDevice">-->
<!-- <el-input-->
<!-- v-model="queryParams.isHasDevice"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.isHasDevice')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.longitude')" prop="longitude">-->
<!-- <el-input-->
<!-- v-model="queryParams.longitude"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.longitude')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.latitude')" prop="latitude">-->
<!-- <el-input-->
<!-- v-model="queryParams.latitude"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.latitude')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.tiresTotal')" prop="tiresTotal">-->
<!-- <el-input-->
<!-- v-model="queryParams.tiresTotal"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.tiresTotal')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('common.isRemove')" prop="isDelete">-->
<!-- <el-input-->
<!-- v-model="queryParams.isDelete"-->
<!-- :placeholder="t('common.pleaseEnter') + t('common.isRemove')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('common.createTime')" prop="createTime">-->
<!-- <el-date-picker-->
<!-- clearable-->
<!-- style="width: 200px"-->
<!-- v-model="queryParams.createTime"-->
<!-- :placeholder="t('common.PleaseSelect') + t('common.createTime')"-->
<!-- type="date"-->
<!-- format="YYYY/MM/DD"-->
<!-- value-format="YYYY-MM-DD"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('common.creatorId')" prop="createId">-->
<!-- <el-input-->
<!-- v-model="queryParams.createId"-->
<!-- :placeholder="t('common.pleaseEnter') + t('common.creatorId')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('common.createBy')" prop="createBy">-->
<!-- <el-input-->
<!-- v-model="queryParams.createBy"-->
<!-- :placeholder="t('common.pleaseEnter') + t('common.createBy')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('common.creatorName')" prop="createName">-->
<!-- <el-input-->
<!-- v-model="queryParams.createName"-->
<!-- :placeholder="t('common.pleaseEnter') + t('common.creatorName')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('common.editTime')" prop="modifyTime">-->
<!-- <el-date-picker-->
<!-- clearable-->
<!-- style="width: 200px"-->
<!-- v-model="queryParams.modifyTime"-->
<!-- :placeholder="t('common.PleaseSelect') + t('common.editTime')"-->
<!-- type="date"-->
<!-- format="YYYY/MM/DD"-->
<!-- value-format="YYYY-MM-DD"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('common.editID')" prop="modifyId">-->
<!-- <el-input-->
<!-- v-model="queryParams.modifyId"-->
<!-- :placeholder="t('common.pleaseEnter') + t('common.editID')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('common.editBy')" prop="modifyBy">-->
<!-- <el-input-->
<!-- v-model="queryParams.modifyBy"-->
<!-- :placeholder="t('common.pleaseEnter') + t('common.editBy')"-->
<!-- style="width: 200px"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label=" "> <el-form-item label=" ">
<el-button type="primary" icon="Search" @click="handleQuery">{{ t('option.search') }}</el-button> <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-button icon="Refresh" @click="resetQuery">{{ t('option.reset') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -255,43 +22,43 @@
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" v-hasPermi="['basecar:car:add']"
plain
icon="Plus" icon="Plus"
plain
type="primary"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['basecar:car:add']"
>{{ t('option.add') }} >{{ t('option.add') }}
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="success" v-hasPermi="['basecar:car:edit']"
plain
icon="Edit"
:disabled="single" :disabled="single"
icon="Edit"
plain
type="success"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['basecar:car:edit']"
>{{ t('option.edit') }} >{{ t('option.edit') }}
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="danger" v-hasPermi="['basecar:car:remove']"
plain
icon="Delete"
:disabled="multiple" :disabled="multiple"
icon="Delete"
plain
type="danger"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['basecar:car:remove']"
>{{ t('option.remove') }} >{{ t('option.remove') }}
</el-button> </el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" v-hasPermi="['basecar:car:export']"
plain
icon="Download" icon="Download"
plain
type="warning"
@click="handleExport" @click="handleExport"
v-hasPermi="['basecar:car:export']"
>{{ t('option.export') }} >{{ t('option.export') }}
</el-button> </el-button>
</el-col> </el-col>
@ -300,69 +67,38 @@
<!-- 表格主体--> <!-- 表格主体-->
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" fixed/> <el-table-column align="center" fixed type="selection" width="55"/>
<!-- <el-table-column :label="t('baseCar.car.companyCode')" align="center" prop="companyCode" width="150"/>-->
<!-- <el-table-column :label="t('baseCar.car.carQueueId')" align="center" prop="carQueueId" width="150"/>-->
<!-- <el-table-column :label="t('baseCar.car.carTypeId')" align="center" prop="carTypeId" :width="locale ? 150:170"/>-->
<el-table-column :label="t('baseCar.car.carLicense')" align="center" prop="carLicense" width="150"/> <el-table-column :label="t('baseCar.car.carLicense')" align="center" prop="carLicense" width="150"/>
<el-table-column label="所属车队" align="center" prop="carLicense" width="150"/> <el-table-column align="center" label="所属车队" prop="carQueueId" width="150"/>
<el-table-column label="所属车型" align="center" prop="carLicense" width="150"/> <el-table-column align="center" label="所属车型" prop="carTypeId" width="150"/>
<el-table-column :label="t('baseCar.car.deviceId')" align="center" prop="deviceId" width="150"/> <el-table-column :label="t('baseCar.car.deviceId')" align="center" prop="deviceId" width="150"/>
<el-table-column :label="t('baseCar.car.deviceBindTime')" align="center" prop="deviceBindTime"/> <el-table-column :label="t('baseCar.car.deviceBindTime')" align="center" prop="deviceBindTime"/>
<el-table-column :label="t('common.createTime')" align="center" prop="createTime" width="160"/> <el-table-column :label="t('common.createTime')" align="center" prop="createTime" width="160"/>
<el-table-column :label="t('common.createBy')" align="center" prop="createBy" width="150"/> <el-table-column :label="t('common.createBy')" align="center" prop="createBy" width="150"/>
<!-- <el-table-column :label="t('baseCar.car.carLicenseIn')" align="center" prop="carLicenseIn"-->
<!-- :width="locale ? 150:170"/>-->
<!-- <el-table-column :label="t('baseCar.car.carLicenseParent')" align="center" prop="carLicenseParent"-->
<!-- :width="locale ? 150:170"/>-->
<!-- <el-table-column :label="t('baseCar.car.carIdParent')" align="center" prop="carIdParent" width="150"/>-->
<!-- <el-table-column :label="t('baseCar.car.userId')" align="center" prop="userId" width="150"/>-->
<!-- <el-table-column :label="t('baseCar.car.userName')" align="center" prop="userName" width="150"/>-->
<!-- :width="locale ? 150:170"/>-->
<!-- <el-table-column :label="t('baseCar.car.firstChangeDate')" align="center" prop="firstChangeDate"-->
<!-- :width="locale ? 150:170"/>-->
<!-- <el-table-column :label="t('baseCar.car.trailerNum')" align="center" prop="trailerNum" width="150"/>-->
<!-- <el-table-column :label="t('baseCar.car.isHandDevice')" align="center" prop="isHandDevice"-->
<!-- :width="locale ? 150:310"/>-->
<!-- <el-table-column :label="t('baseCar.car.isHasDevice')" align="center" prop="isHasDevice"-->
<!-- :width="locale ? 150:260"/>-->
<!-- <el-table-column :label="t('baseCar.car.longitude')" align="center" prop="longitude" width="150"/>-->
<!-- <el-table-column :label="t('baseCar.car.latitude')" align="center" prop="latitude" width="150"/>-->
<!-- <el-table-column :label="t('baseCar.car.tiresTotal')" align="center" prop="tiresTotal" width="150"/>-->
<!-- <el-table-column :label="t('common.isRemove')" align="center" prop="isDelete" width="150"/>-->
<!-- <el-table-column :label="t('common.creatorId')" align="center" prop="createId" width="150"/>-->
<!-- <el-table-column :label="t('common.creatorName')" align="center" prop="createName" width="150"/>-->
<!-- <el-table-column :label="t('common.editTime')" align="center" prop="modifyTime" width="150"/>-->
<!-- <el-table-column :label="t('common.editID')" align="center" prop="modifyId" width="150"/>-->
<!-- <el-table-column :label="t('common.editBy')" align="center" prop="modifyBy" width="150"/>-->
<el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right" <el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"
width="160"> width="160">
<template #default="scope"> <template #default="scope">
<el-button <el-button
type="text" v-hasPermi="['basecar:car:edit']"
icon="Edit" icon="Edit"
type="text"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['basecar:car:edit']"
>{{ t('option.edit') }} >{{ t('option.edit') }}
</el-button> </el-button>
<el-button <el-button
type="text" v-hasPermi="['basecar:car:remove']"
icon="Delete" icon="Delete"
type="text"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['basecar:car:remove']"
>{{ t('option.remove') }} >{{ t('option.remove') }}
</el-button> </el-button>
<!-- <el-button--> <!-- <el-button-->
<!-- type="text"--> <!-- type="text"-->
<!-- icon="Delete"--> <!-- icon="Delete"-->
<!-- @click="handleDelete(scope.row)"--> <!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['basecar:car:remove']"--> <!-- v-hasPermi="['basecar:car:remove']"-->
<!-- >绑定接收器--> <!-- >绑定接收器-->
<!-- </el-button>--> <!-- </el-button>-->
</template> </template>
</el-table-column> </el-table-column>
@ -371,192 +107,50 @@
<!-- 分页--> <!-- 分页-->
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total"
v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" v-model:limit="queryParams.pageSize"
v-model:page="queryParams.pageNum"
:total="total"
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改岗位对话框 --> <!-- 添加或修改岗位对话框 -->
<el-dialog :title="title" v-model="open" width="500px" append-to-body> <el-dialog v-model="open" :title="title" append-to-body width="500px">
<el-form ref="postRef" :model="form" :rules="rules" :label-width=" locale ? '120px':'140px'"> <el-form ref="postRef" :label-width=" locale ? '120px':'140px'" :model="form" :rules="rules">
<el-form-item prop="id" v-if="false"> <el-form-item :label="t('baseCar.car.carLicense')" prop="carLicense">
<el-input v-model="form.id"/> <el-input
v-model="form.carLicense"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicense')"/>
</el-form-item>
<el-form-item label="所属车队" prop="carQueueId">
<el-select
v-model="form.carQueueId"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carQueueId')"
clearable
style="width: 240px"
>
<el-option
v-for="dict in carQueue"
:key="dict.id"
:label="dict.title"
:value="dict.id"
/>
</el-select>
</el-form-item>
<el-form-item label="所属车型" prop="carTypeId">
<el-select
v-model="form.carTypeId"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carQueueId')"
clearable
style="width: 240px"
>
<el-option
v-for="dict in carType"
:key="dict.id"
:label="dict.title"
:value="dict.id"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item :label="t('baseCar.car.carLicense')" prop="carLicense">
<el-input
v-model="form.carLicense"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicense')"/>
</el-form-item>
<el-form-item label="所属车队" prop="carLicense">
<el-select
v-model="queryParams.status"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carQueueId')"
clearable
style="width: 240px"
>
<el-option
v-for="dict in carQueue"
:key="dict.id"
:label="dict.label"
:value="dict.title"
/>
</el-select>
<!-- <el-input-->
<!-- v-model="form.carLicense"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicense')"/>-->
</el-form-item>
<el-form-item label="所属车型" prop="carLicense">
<el-input
v-model="form.carLicense"
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicense')"/>
</el-form-item>
<!-- <el-form-item :label="t('baseCar.car.companyCode')" prop="companyCode">-->
<!-- <el-input-->
<!-- v-model="form.companyCode"-->
<!-- :placeholder=" t('common.pleaseEnter') + t('baseCar.car.companyCode')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.carQueueId')" prop="carQueueId">-->
<!-- <el-input-->
<!-- v-model="form.carQueueId"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.carQueueId')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.carTypeId')" prop="carTypeId">-->
<!-- <el-input-->
<!-- v-model="form.carTypeId"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.carTypeId')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.carLicenseIn')" prop="carLicenseIn">-->
<!-- <el-input-->
<!-- v-model="form.carLicenseIn"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicenseIn')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.carLicenseParent')" prop="carLicenseParent">-->
<!-- <el-input-->
<!-- v-model="form.carLicenseParent"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicenseParent')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.carIdParent')" prop="carIdParent">-->
<!-- <el-input-->
<!-- v-model="form.carIdParent"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.carIdParent')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.userId')" prop="userId">-->
<!-- <el-input-->
<!-- v-model="form.userId"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.userId')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.userName')" prop="userName">-->
<!-- <el-input-->
<!-- v-model="form.userName"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.userName')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.deviceId')" prop="deviceId">-->
<!-- <el-input-->
<!-- v-model="form.deviceId"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.deviceId')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.deviceBindTime')" prop="deviceBindTime">-->
<!-- <el-date-picker-->
<!-- clearable-->
<!-- v-model="form.deviceBindTime"-->
<!-- type="date"-->
<!-- format="YYYY/MM/DD"-->
<!-- value-format="YYYY-MM-DD"-->
<!-- :placeholder="t('common.PleaseSelect') + t('baseCar.car.deviceBindTime')"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.firstChangeDate')" prop="firstChangeDate">-->
<!-- <el-date-picker-->
<!-- clearable-->
<!-- v-model="form.firstChangeDate"-->
<!-- type="date"-->
<!-- format="YYYY/MM/DD"-->
<!-- value-format="YYYY-MM-DD"-->
<!-- :placeholder="t('common.PleaseSelect') + t('baseCar.car.firstChangeDate')"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.trailerNum')" prop="trailerNum">-->
<!-- <el-input-->
<!-- v-model="form.trailerNum"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.trailerNum')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.isHandDevice')" prop="isHandDevice">-->
<!-- <el-input-->
<!-- v-model="form.isHandDevice"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.isHandDevice')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.isHasDevice')" prop="isHasDevice">-->
<!-- <el-input-->
<!-- v-model="form.isHasDevice"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.isHasDevice')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.longitude')" prop="longitude">-->
<!-- <el-input-->
<!-- v-model="form.longitude"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.longitude')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.latitude')" prop="latitude">-->
<!-- <el-input-->
<!-- v-model="form.latitude"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.latitude')"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item :label="t('baseCar.car.tiresTotal')" prop="tiresTotal">-->
<!-- <el-input-->
<!-- v-model="form.tiresTotal"-->
<!-- :placeholder="t('common.pleaseEnter') + t('baseCar.car.tiresTotal')"/>-->
<!-- </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-->
<!-- clearable-->
<!-- v-model="form.createTime"-->
<!-- type="date"-->
<!-- format="YYYY/MM/DD"-->
<!-- value-format="YYYY-MM-DD"-->
<!-- :placeholder="t('common.PleaseSelect') + t('common.createTime')"-->
<!-- />-->
<!-- </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-->
<!-- clearable-->
<!-- v-model="form.modifyTime"-->
<!-- type="date"-->
<!-- format="YYYY/MM/DD"-->
<!-- value-format="YYYY-MM-DD"-->
<!-- :placeholder="t('common.PleaseSelect') + t('common.editTime')"-->
<!-- />-->
<!-- </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> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
@ -568,8 +162,8 @@
</div> </div>
</template> </template>
<script setup name="basetyre"> <script name="basetyre" setup>
import {addBaseCar, delBaseCar, getBaseCar, listBaseCar, updateBaseCar,getCarQueueList} from "@/api/basecar/car"; import {addBaseCar, delBaseCar, getBaseCar, listBaseCar, updateBaseCar, getCarQueueList} from "@/api/basecar/car";
import {useI18n} from 'vue-i18n'; import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie"; import Cookies from "js-cookie";
@ -607,71 +201,21 @@ const title = ref("");
const queryParams = ref({ const queryParams = ref({
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
companyCode: undefined,
carQueueId: undefined,
carTypeId: undefined,
carLicense: undefined, carLicense: undefined,
carLicenseIn: undefined,
carLicenseParent: undefined,
carIdParent: undefined,
userId: undefined,
userName: undefined,
deviceId: undefined,
deviceBindTime: undefined,
firstChangeDate: undefined,
trailerNum: undefined,
isHandDevice: undefined,
isHasDevice: undefined,
longitude: undefined,
latitude: undefined,
tiresTotal: undefined,
isDelete: undefined,
createTime: undefined,
createId: undefined,
createBy: undefined,
createName: undefined,
modifyTime: undefined,
modifyId: undefined,
modifyBy: undefined,
}) })
// //
const rules = { const rules = {
brand: [{required: true, message: "轮胎品牌不能为空", trigger: "blur"}], carLicense: [{required: true, message: "车牌号不能为空", trigger: "blur"}],
type: [{required: true, message: "轮胎型号不能为空", trigger: "blur"}], carTypeId: [{required: true, message: "所属车型不能为空", trigger: "blur"}],
serialNumber: [{required: true, message: "轮胎编号不能为空", trigger: "blur"}],
depth: [{required: true, message: "花纹深度不能为空", trigger: "blur"}],
} }
// //
const form = ref({ const form = ref({
id: null, id: null,
companyCode: null, carLicense: null,
carQueueId: null, carQueueId: null,
carTypeId: null, carTypeId: null,
carLicense: null,
carLicenseIn: null,
carLicenseParent: null,
carIdParent: null,
userId: null,
userName: null,
deviceId: null,
deviceBindTime: null,
firstChangeDate: null,
trailerNum: null,
isHandDevice: null,
isHasDevice: null,
longitude: null,
latitude: null,
tiresTotal: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null
}); });
/** 查询岗位列表 */ /** 查询岗位列表 */
@ -696,32 +240,9 @@ function cancel() {
function reset() { function reset() {
form.value = { form.value = {
id: null, id: null,
companyCode: null, carLicense: null,
carQueueId: null, carQueueId: null,
carTypeId: null, carTypeId: null,
carLicense: null,
carLicenseIn: null,
carLicenseParent: null,
carIdParent: null,
userId: null,
userName: null,
deviceId: null,
deviceBindTime: null,
firstChangeDate: null,
trailerNum: null,
isHandDevice: null,
isHasDevice: null,
longitude: null,
latitude: null,
tiresTotal: null,
isDelete: null,
createTime: null,
createId: null,
createBy: null,
createName: null,
modifyTime: null,
modifyId: null,
modifyBy: null
}; };
proxy.resetForm("postRef"); proxy.resetForm("postRef");
} }
@ -750,13 +271,13 @@ function handleAdd() {
reset(); reset();
open.value = true; open.value = true;
title.value = t('baseCar.car.addTitle'); title.value = t('baseCar.car.addTitle');
getCarQueueList().then(response => { getCarQueueList().then(response => {
console.log(response); console.log(response);
carQueue.value=response.CarQueueList; carQueue.value = response.CarQueueList;
carType.value=response.CarTypeList; carType.value = response.CarTypeList;
}).finally(() => { }).finally(() => {
loading.value = false; loading.value = false;
}); });
} }
/** 修改按钮操作 */ /** 修改按钮操作 */
@ -772,9 +293,10 @@ function handleUpdate(row) {
/** 提交按钮 */ /** 提交按钮 */
function submitForm() { function submitForm() {
console.log(form)
proxy.$refs["postRef"].validate(valid => { proxy.$refs["postRef"].validate(valid => {
if (valid) { if (valid) {
if (form.value.postId != undefined) { if (form.value.id != undefined) {
updateBaseCar(form.value).then(response => { updateBaseCar(form.value).then(response => {
proxy.$modal.msgSuccess(t('option.modificationSuccessful')); proxy.$modal.msgSuccess(t('option.modificationSuccessful'));
open.value = false; open.value = false;

@ -19,7 +19,7 @@ AMapLoader.load({
key: "ba8fb8d8bae1b280b93406d5959d492f", // WebKey load key: "ba8fb8d8bae1b280b93406d5959d492f", // WebKey load
// version: "1.4.15", // // version: "1.4.15", //
version: "2.0", // version: "2.0", //
plugins: ['AMap.MouseTool', 'AMap.PolygonEditor', 'AMap.ToolBar', 'AMap.Scale', 'AMap.HawkEye', 'AMap.MapType'], plugins: ['AMap.MouseTool', 'AMap.PolygonEditor', 'AMap.ToolBar', 'AMap.Scale', 'AMap.HawkEye', 'AMap.MapType','AMap.Marker'],
AMapUI: { AMapUI: {
version: '1.1', version: '1.1',
@ -32,7 +32,22 @@ AMapLoader.load({
center: [116.397428, 39.90923], // center: [116.397428, 39.90923], //
}); });
// let marker = new AMap.Marker({
position: map.getCenter(),
icon: '//a.amap.com/jsapi_demos/static/demo-center/icons/poi-marker-default.png',
anchor:'bottom-center',
offset: new AMap.Pixel(0, 0)
});
marker.setTitle('我是marker的title');
marker.setLabel({
direction:'top',
offset: new AMap.Pixel(0, -10), //
content: "<div class='info'>我是 marker 的 label 标签</div><div class='info'>我是 marker 的 label 标签</div>", //
});
marker.setMap(map);
//
map.addControl(new AMap.ToolBar({position :'LT'})); map.addControl(new AMap.ToolBar({position :'LT'}));
// //
@ -59,7 +74,7 @@ AMapLoader.load({
// initroad() // initroad()
// pathSimplifierInsLine() // pathSimplifierInsLine()
closedFigure() // closedFigure()
}).catch(e => { }).catch(e => {
console.log(e); console.log(e);
}) })

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

@ -0,0 +1,211 @@
<template>
<div>
<el-tree :data="treeData" :props="treeDefaultProps" class="tree" @node-click="treeClick"/>
<div id="container"></div>
</div>
</template>
<script setup>
import AMapLoader from '@amap/amap-jsapi-loader';
const treeData = [
{
label: 'Level one 1',
id: 1,
children: [
{
label: 'Level two 1-1',
id: 11,
children: [
{
label: 'Level three 1-1-1',
id: 111,
},
],
},
],
},
{
label: 'Level one 2',
children: [
{
label: 'Level two 2-1',
children: [
{
label: 'Level three 2-1-1',
},
],
},
{
label: 'Level two 2-2',
children: [
{
label: 'Level three 2-2-1',
},
],
},
],
},
{
label: 'Level one 3',
children: [
{
label: 'Level two 3-1',
children: [
{
label: 'Level three 3-1-1',
},
],
},
{
label: 'Level two 3-2',
children: [
{
label: 'Level three 3-2-1',
},
],
},
],
},
]
const treeDefaultProps = {
children: 'children',
label: 'label',
}
const treeClick = (data) => {
console.log(data)
}
const mockRequest = () => {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve([
{
title: '车牌号1',
one: '离线',
two: '监控',
three: '报警',
four: new Date(),
location: [116.606315, 44.008775]
},
{
title: '车牌号2',
one: '离线',
two: '监控',
three: '报警',
four: new Date(),
location: [116.706315, 40.108775]
},
{
title: '车牌号3',
one: '离线',
two: '监控',
three: '报警',
four: new Date(),
location: [116.806315, 40.208775]
},
])
}, 2000)
})
}
const setMarker = async () => {
const markerArr = await mockRequest()
markerArr.forEach(e => {
//
let marker = new AMap.Marker({
content: '<img class="markerIcon" />',
position: e.location,
anchor: 'bottom-center',
offset: new AMap.Pixel(0, 0),
label: {
direction: 'top',
content: `<div class='info'>${e.title} - ${e.one}</div><div class='info'>${e.two} ${e.three}</div><div class='info'>${e.four}</div>`, //
}
});
marker.setMap(map);
})
}
const setLine = async () => {
let polyline = new AMap.Polyline({
path: [[116.478935, 39.997761], [103.85094, 35.987496], [106.205794, 38.458831], [108.983569, 34.285675], [111.761777, 40.875595]],
showDir: true,
strokeColor: '#77DDFF', // 线--
strokeWeight: 6, // 线
lineJoin: 'round', // 线
})
map.add(polyline);
}
let map = 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: ['AMap.MouseTool', 'AMap.PolygonEditor', 'AMap.ToolBar', 'AMap.Scale', 'AMap.HawkEye', 'AMap.MapType', 'AMap.Marker'],
// AMapUI: {
// version: '1.1',
// plugins: []
// }
}).then(async (AMap) => {
map = new AMap.Map("container", { //id
viewMode: "3D", //3D
zoom: 8, //
center: [116.397428, 39.90923], //
});
await setMarker()
await setLine()
//
map.addControl(new AMap.ToolBar({position: 'LT'}));
//
map.addControl(new AMap.Scale());
//
map.addControl(new AMap.HawkEye({isOpen: true}));
//
map.addControl(new AMap.MapType());
map.setFitView()
}).catch(e => {
console.log(e);
})
</script>
<style>
.tree {
width: 200px;
display: inline-block;
vertical-align: top;
}
#container {
padding: 0px;
margin: 0px;
width: calc(100% - 200px);
height: calc(100vh - 84px);
display: inline-block;
}
.markerIcon {
width: 65px;
height: 50px;
background-repeat: no-repeat;
background-size: 100% 100%;
background-image: url("../../../assets/images/trucks.png");
}
.amap-marker-label{
top:0 !important;
left:0 !important;
transform: translate(calc(-50% + 32px),-100%);
}
</style>
Loading…
Cancel
Save