| | |
| | | <el-table-column prop="carName" label="车辆名称" width="120" fixed></el-table-column> |
| | | <el-table-column prop="vehicleNumber" label="车牌号码" width="120" fixed></el-table-column> |
| | | <el-table-column prop="keepWarn" label="持续报警" width="120"></el-table-column> |
| | | <el-table-column prop="name" label="近15分钟情况" width="120"></el-table-column> |
| | | <el-table-column prop="name" label="近15分钟情况"> |
| | | <template #default="{ row }"> |
| | | <img src="@/assets/homeImg/eye-fill.png" alt="" @click="viewDetail(row)" |
| | | style="width: 30px;cursor: pointer;"> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="driverName" label="驾驶员名称" width="120"></el-table-column> |
| | | <el-table-column prop="enterpriseName" label="所属公司" width="120"></el-table-column> |
| | | <el-table-column prop="terminalNumber" label="终端编号" width="120"></el-table-column> |
| | |
| | | <el-table-column prop="treatmentTime" label="处理时间" width="120"></el-table-column> |
| | | <el-table-column prop="treatmentRemark" label="处理描述" width="240"></el-table-column> |
| | | </el-table> |
| | | |
| | | |
| | | <div class="pagination-box relative mt--23 flex j-end"> |
| | | <el-pagination :popper-append-to-body="false" @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" :current-page="searchForm.pageCurr" background |
| | |
| | | <el-form :inline="true" :model="searchForm" class="demo-form-inline"> |
| | | <el-form-item label="选择轨迹时间范围:" prop="level" class="unset_m" |
| | | style="margin-right: 15px;"> |
| | | <el-date-picker :value-format="'yyyy-MM-dd HH:mm'" v-model="searchForm.date" type="datetimerange" range-separator="至" |
| | | start-placeholder="开始日期" end-placeholder="结束日期"> |
| | | <el-date-picker :value-format="'yyyy-MM-dd HH:mm'" v-model="searchForm.date" |
| | | type="datetimerange" range-separator="至" start-placeholder="开始日期" |
| | | end-placeholder="结束日期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | </el-tabs> |
| | | </div> |
| | | <DetailModal ref="detailModal" :detail="detail" /> |
| | | <el-drawer :visible.sync="drawer" append-to-body :size="450" @close="closeDrawer"> |
| | | <div class="flex j-between a-center fs--20 pl--15 pr--15"> |
| | | <!-- 使用 Tailwind CSS 的内联十六进制颜色类 --> |
| | | <div>{{ info.vehicleNumber }}<span v-if="info.warnList && info.warnList.length > 0">({{ |
| | | info.warnList.length |
| | | }})</span></div><i @click="closeDrawer" class="el-icon-s-unfold color1 pointer"></i> |
| | | </div> |
| | | <hr class="mt--10" /> |
| | | <div class="pl--15 pr--15"> |
| | | <div class="flex mt--15"> |
| | | <div class="w--100 shrink0 color1">当前司机:</div> |
| | | <div class="color2">{{ info.driverName }}</div> |
| | | </div> |
| | | <div class="flex mt--15"> |
| | | <div class="w--100 shrink0 color1">当前车速:</div> |
| | | <div class="color2">{{ info.speed }}km/h</div> |
| | | </div> |
| | | <div class="flex mt--15"> |
| | | <div class="w--100 shrink0 color1">当前位置:</div> |
| | | <div class="color2">{{ info.nowAddress }}</div> |
| | | </div> |
| | | <div v-if="info.imageUrl" class="flex mt--15"> |
| | | <div class="w--100 shrink0 color1">抓拍照片:</div> |
| | | <el-image style="height: 100px" :src="info.imageUrl" :preview-src-list="[info.imageUrl]"> |
| | | </el-image> |
| | | </div> |
| | | </div> |
| | | <hr class="mt--10" /> |
| | | <div class="flex j-between a-center fs--15 pl--15 pr--15 mt--15 color2"> |
| | | 近15分钟报警 |
| | | </div> |
| | | <div class="block pl--15 pr--15 mt--15"> |
| | | <el-timeline> |
| | | <el-timeline-item v-for="(item, index) in info.warnList" :key="index" color='#0E6EFD' |
| | | :timestamp="item.warnTime" placement="top"> |
| | | <div @click="initMap1(item)"> |
| | | <el-card class="pointer"> |
| | | <h4>{{ item.warnType }}</h4> |
| | | <p class="color1">{{ item.speed }}km/h</p> |
| | | </el-card> |
| | | </div> |
| | | |
| | | </el-timeline-item> |
| | | </el-timeline> |
| | | </div> |
| | | <div v-if="showWarnDetail" class="fixed"> |
| | | <div class="card"> |
| | | <div class="title fs--18 color2">视频信号遮挡报警</div> |
| | | <div id="mapContainer"></div> |
| | | <div class=""> |
| | | <div class="flex mt--15"> |
| | | <div class="w--100 shrink0 color1">司机:</div> |
| | | <div class="color2">{{ info.driverName }}</div> |
| | | </div> |
| | | <div class="flex mt--15"> |
| | | <div class="w--100 shrink0 color1">车速:</div> |
| | | <div class="color2">{{ activeInfo.speed }}km/h</div> |
| | | </div> |
| | | <div class="flex mt--15"> |
| | | <div class="w--100 shrink0 color1">时间:</div> |
| | | <div class="color2">{{ activeInfo.warnTime }}</div> |
| | | </div> |
| | | <div class="flex mt--15"> |
| | | <div class="w--100 shrink0 color1">地点:</div> |
| | | <div class="color2">{{ activeInfo.address }}</div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-drawer> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import AMapLoader from "@amap/amap-jsapi-loader"; |
| | | import DetailModal from "./components/detailModal.vue"; |
| | | import { getCarDetail, getCarOrder, getCarWarning, getCarTrack,getCarVideo } from './service' |
| | | import { getCarDetail, getCarOrder, getCarWarning, getCarTrack, getCarVideo,getDetail } from './service' |
| | | export default { |
| | | name: "detail", |
| | | components: { DetailModal }, |
| | |
| | | detail: {}, |
| | | activeName: 'first', |
| | | routeList: [], |
| | | videoObj:{}, |
| | | videoObj: {}, |
| | | drawer: false, |
| | | showWarnDetail: false, |
| | | info: {}, |
| | | activeInfo: {}, |
| | | map: null |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | |
| | | }, |
| | | methods: { |
| | | closeDrawer() { |
| | | this.drawer = false |
| | | this.showWarnDetail = false |
| | | |
| | | }, |
| | | // 查看详情 |
| | | viewDetail(row) { |
| | | this.drawer = true |
| | | getDetail({ vehicleNumber: row.vehicleNumber }).then(res => { |
| | | this.info = res |
| | | }) |
| | | }, |
| | | // 初始化地图 |
| | | initMap1(row) { |
| | | this.showWarnDetail = true |
| | | this.activeInfo = row |
| | | this.$nextTick(() => { |
| | | window._AMapSecurityConfig = { |
| | | securityJsCode: this.$secretKey, |
| | | }; |
| | | AMapLoader.load({ |
| | | key:this.$mapKey, |
| | | version: "2.0", |
| | | plugins: [ |
| | | "AMap.ToolBar", |
| | | "AMap.AutoComplete", |
| | | "AMap.Geocoder", |
| | | "AMap.MarkerCluster", |
| | | ], |
| | | }) |
| | | .then((AMap) => { |
| | | this.map = new AMap.Map("mapContainer", { |
| | | center: [row.lon, row.lat], |
| | | zoom: 15, |
| | | }); |
| | | |
| | | // 添加标记 |
| | | new AMap.Marker({ |
| | | position: [row.lon, row.lat], |
| | | map: this.map, |
| | | title: row.warnType |
| | | }); |
| | | }) |
| | | .catch((e) => { |
| | | console.log(e); |
| | | }); |
| | | }) |
| | | }, |
| | | handleClick(e) { |
| | | this.activeName = e.name |
| | | if (e.name != 'third') { |
| | |
| | | pageSize: 10, |
| | | total: 0, |
| | | } |
| | | |
| | | this.getList(this.detail.vehicleNumber) |
| | | //销毁地图 |
| | | if (this.map) { |
| | | this.map.destroy(); |
| | | } |
| | | } else { |
| | | getCarTrack({ ...this.searchForm, vehicleNumber: this.detail.vehicleNumber }).then(res => { |
| | | this.routeList = res; |
| | |
| | | } |
| | | }, |
| | | search() { |
| | | console.log('shuju',this.searchForm.date); |
| | | |
| | | if(this.searchForm.date != undefined) { |
| | | if (this.searchForm.date != undefined) { |
| | | |
| | | this.searchForm={ |
| | | this.searchForm = { |
| | | pageCurr: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | |
| | | |
| | | }, |
| | | reset() { |
| | | this.searchForm = { |
| | | pageCurr: 1, |
| | | pageSize: 10, |
| | | total: 0, |
| | | date: undefined, |
| | | } |
| | | }, |
| | | getList(vehicleNumber) { |
| | | if (this.activeName == 'first') { |