代码优化
This commit is contained in:
parent
fc323d0cb0
commit
43db8a77e1
|
|
@ -39,6 +39,7 @@
|
|||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
border
|
||||
@selection-change="selectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
|
|
@ -65,13 +66,13 @@
|
|||
<el-tag size="mini" v-else type="danger">下线</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="prCode" label="二维码" align="center">
|
||||
<!-- <el-table-column prop="prCode" label="二维码" align="center">
|
||||
<template v-slot="{ row }">
|
||||
<el-button type="text" size="small" @click="showQrCode(row)"
|
||||
>查看</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="状态" align="center">
|
||||
<template v-slot="{ row }">
|
||||
<el-tag
|
||||
|
|
|
|||
|
|
@ -40,18 +40,21 @@
|
|||
<el-col :span="6">
|
||||
<el-tabs type="border-card" class="map-left">
|
||||
<el-tab-pane label="行程">
|
||||
<div
|
||||
class="trip-container"
|
||||
@click="handlePreviewTrip(item, index)"
|
||||
v-for="(item, index) in tripList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="left-num">{{ index + 1 }}</div>
|
||||
<template v-if="tripList.length > 0">
|
||||
<div
|
||||
class="right-info"
|
||||
:class="{ active: activeIndex === index }"
|
||||
class="trip-container"
|
||||
@click="handlePreviewTrip(item, index)"
|
||||
v-for="(item, index) in tripList"
|
||||
:key="index"
|
||||
>
|
||||
<!-- <ul>
|
||||
<div class="left-num">{{ index + 1 }}</div>
|
||||
<div
|
||||
class="right-info"
|
||||
:class="{
|
||||
active: activeIndex === index,
|
||||
}"
|
||||
>
|
||||
<!-- <ul>
|
||||
<li>{{ item.tripdistance }}KM</li>
|
||||
<li>{{ item.drivingDuration }}秒</li>
|
||||
<li>{{ item.maxspeed }}KM/h</li>
|
||||
|
|
@ -64,63 +67,75 @@
|
|||
<li>平均速度</li>
|
||||
</ul> -->
|
||||
|
||||
<div style="margin-top: 10px">
|
||||
<div class="time-container">
|
||||
<span class="radius-span">始</span>
|
||||
<span>{{ item.startTime }}</span>
|
||||
<div style="margin-top: 10px">
|
||||
<div class="time-container">
|
||||
<span class="radius-span"
|
||||
>始</span
|
||||
>
|
||||
<span>{{
|
||||
item.startTime
|
||||
}}</span>
|
||||
</div>
|
||||
<h3>{{ item.startAddress }}</h3>
|
||||
</div>
|
||||
<h3>{{ item.startAddress }}</h3>
|
||||
</div>
|
||||
<div style="margin-top: 10px">
|
||||
<div class="time-container">
|
||||
<span
|
||||
class="radius-span"
|
||||
style="
|
||||
background-color: #e6a23c;
|
||||
"
|
||||
>终</span
|
||||
>
|
||||
<span>{{ item.endTime }}</span>
|
||||
<div style="margin-top: 10px">
|
||||
<div class="time-container">
|
||||
<span
|
||||
class="radius-span"
|
||||
style="
|
||||
background-color: #e6a23c;
|
||||
"
|
||||
>终</span
|
||||
>
|
||||
<span>{{ item.endTime }}</span>
|
||||
</div>
|
||||
<h3>{{ item.endAddress }}</h3>
|
||||
</div>
|
||||
<h3>{{ item.endAddress }}</h3>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else> 暂无数据 </template>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="停留点">
|
||||
<div
|
||||
class="point-container"
|
||||
v-for="(item, index) in parkList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="time-container">
|
||||
<span class="radius-span">{{
|
||||
index + 1
|
||||
}}</span>
|
||||
<span>{{ item.startTime }}</span>
|
||||
<span
|
||||
>{{ item.hours }}时{{
|
||||
item.mints
|
||||
}}分</span
|
||||
>
|
||||
<template v-if="parkList.length > 0">
|
||||
<div
|
||||
class="point-container"
|
||||
v-for="(item, index) in parkList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="time-container">
|
||||
<span class="radius-span">{{
|
||||
index + 1
|
||||
}}</span>
|
||||
<span>{{ item.startTime }}</span>
|
||||
<span
|
||||
>{{ item.hours }}时{{
|
||||
item.mints
|
||||
}}分</span
|
||||
>
|
||||
</div>
|
||||
<h3>{{ item.address }}</h3>
|
||||
</div>
|
||||
<h3>{{ item.address }}</h3>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else> 暂无数据 </template>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="报警">
|
||||
<div
|
||||
class="point-container"
|
||||
v-for="(item, index) in warningList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="time-container">
|
||||
<span class="radius-span">{{
|
||||
index + 1
|
||||
}}</span>
|
||||
<span>{{ item.warnTime }}</span>
|
||||
<template v-if="warningList.length > 0">
|
||||
<div
|
||||
class="point-container"
|
||||
v-for="(item, index) in warningList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="time-container">
|
||||
<span class="radius-span">{{
|
||||
index + 1
|
||||
}}</span>
|
||||
<span>{{ item.warnTime }}</span>
|
||||
</div>
|
||||
<h3>{{ item.startAlarm }}</h3>
|
||||
</div>
|
||||
<h3>{{ item.startAlarm }}</h3>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else> 暂无数据 </template>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
|
|
|
|||
Loading…
Reference in New Issue