|
@@ -0,0 +1,209 @@
|
|
|
+<template>
|
|
|
+ <div class="goafCameraAlarm">
|
|
|
+ <div class="back" @click="back" />
|
|
|
+ <div class="table-head">
|
|
|
+ <div class="tab">
|
|
|
+ <el-button class="tab-item" :type="tabType===0?'primary':''" @click="tabClick(0)">正常</el-button>
|
|
|
+ <el-button class="tab-item" :type="tabType===1?'danger':''" @click="tabClick(1)">识别异常</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <template v-if="tabType===0">
|
|
|
+ <el-table
|
|
|
+ ref="multipleTableRef"
|
|
|
+ :data="dataList"
|
|
|
+ style="width:100%"
|
|
|
+ row-class-name="CustomRowClassName"
|
|
|
+ >
|
|
|
+ <el-table-column type="index" width="55" label="序号" />
|
|
|
+ <el-table-column property="date" label="日期" min-width="120">
|
|
|
+ <template #default="scope">{{ parseTime(scope.row.transLoadTime,'{y}-{m}-{d}') }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column property="transLicense" label="车牌" min-width="140" />
|
|
|
+ <el-table-column property="transLoadTime" label="装货时间" min-width="160" />
|
|
|
+ <el-table-column property="transLoadPicurl" label="装货抓拍图片" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <div v-if="scope.row.transLoadPicurl" class="snap-image__preview">
|
|
|
+ <el-image
|
|
|
+ style="width: 30px; height: 30px"
|
|
|
+ :src="scope.row.transLoadPicurl"
|
|
|
+ :preview-src-list="[scope.row.transLoadPicurl]"
|
|
|
+ preview-teleported
|
|
|
+ fit="cover"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <span v-else>没有装货图片</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column property="transUnloadTime" label="卸货时间" min-width="160" />
|
|
|
+ <el-table-column property="transUnloadPicurl" label="卸货抓拍图片" width="100">
|
|
|
+ <template #default="scope">
|
|
|
+ <div v-if="scope.row.transUnloadPicurl" class="snap-image__preview">
|
|
|
+ <el-image
|
|
|
+ style="width: 30px; height: 30px"
|
|
|
+ :src="scope.row.transUnloadPicurl"
|
|
|
+ :preview-src-list="[scope.row.transUnloadPicurl]"
|
|
|
+ preview-teleported
|
|
|
+ fit="cover"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <span v-else>没有卸货图片</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column property="transTimeInterval" label="时差(分钟)" />
|
|
|
+ <el-table-column property="transLoadWeight" label="载货重量(分钟)" />
|
|
|
+ <el-table-column property="transUnloadWeight" label="卸货重量(吨)" />
|
|
|
+ <el-table-column property="transWeightDifference" label="载物差(吨)" />
|
|
|
+ <el-table-column property="transEvaluate" label="结论" width="100" />
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+ <template v-if="tabType===1">
|
|
|
+ <el-table
|
|
|
+ :data="dataList"
|
|
|
+ style="width:100%"
|
|
|
+ row-class-name="CustomRowClassName"
|
|
|
+ >
|
|
|
+ <el-table-column type="index" width="55" label="序号" />
|
|
|
+ <el-table-column property="transAbnormarlLicense" label="车牌" min-width="140" />
|
|
|
+ <el-table-column property="transLoadTime" label="抓拍图片" min-width="180">
|
|
|
+ <template #default="scope">
|
|
|
+ <div v-if="scope.row.transAbnormarlPicurl" class="snap-image__preview">
|
|
|
+ <el-image
|
|
|
+ style="width: 30px; height: 30px"
|
|
|
+ :src="scope.row.transAbnormarlPicurl"
|
|
|
+ :preview-src-list="[scope.row.transAbnormarlPicurl]"
|
|
|
+ preview-teleported
|
|
|
+ fit="cover"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <span v-else>没有图片</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column property="transAbnormarlTime" label="运输异常时间" min-width="120">
|
|
|
+ <template #default="scope">{{ parseTime(scope.row.transAbnormarlTime,'{y}-{m}-{d} {h}:{i}:{s}') }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column property="transAbnormarlTime" label="运输类型" min-width="120">
|
|
|
+ <template #default="scope">{{ scope.row.transAbnormarType===0?'装货':"卸货" }}</template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </template>
|
|
|
+ <div class="el-pagination-wrap">
|
|
|
+ <el-pagination
|
|
|
+ small
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :total="total"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import { parseTime } from '@/utils'
|
|
|
+import { getAllinfoByPage, getAbnormarlinfoByPage } from '@/api/trans'
|
|
|
+export default {
|
|
|
+ name: 'GoafCameraAlarm',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ tabType: 0,
|
|
|
+ conditions: {
|
|
|
+ page: 1,
|
|
|
+ limit: 10
|
|
|
+ },
|
|
|
+ dataList: [],
|
|
|
+ total: 0
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ parseTime,
|
|
|
+ back() {
|
|
|
+ this.$router.push('/')
|
|
|
+ },
|
|
|
+ getData() {
|
|
|
+ if (this.tabType === 0) {
|
|
|
+ this.getAllinfoData()
|
|
|
+ } else {
|
|
|
+ this.getAnomalyData()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getAllinfoData() {
|
|
|
+ getAllinfoByPage(this.conditions).then((resp) => {
|
|
|
+ const { data, total } = resp
|
|
|
+ this.total = total
|
|
|
+ this.dataList = data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getAnomalyData() {
|
|
|
+ getAbnormarlinfoByPage(this.conditions).then((resp) => {
|
|
|
+ const { data, total } = resp
|
|
|
+ this.total = total
|
|
|
+ this.dataList = data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ tabClick(type) {
|
|
|
+ this.tabType = type
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ handleSizeChange(limit) {
|
|
|
+ this.conditions.limit = limit
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ handleCurrentChange(pageNumber) {
|
|
|
+ this.conditions.page = pageNumber
|
|
|
+ this.getData()
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+<style>
|
|
|
+.el-table .CustomRowClassName {
|
|
|
+ --el-table-tr-bg-color: var(--el-color-success-light-9);
|
|
|
+}
|
|
|
+</style>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.goafCameraAlarm{
|
|
|
+ .el-pagination-wrap{
|
|
|
+ float: right;
|
|
|
+ margin-top: 5vh;
|
|
|
+ ::v-deep{
|
|
|
+ .el-pager li,button{
|
|
|
+ background-color: #00539F;
|
|
|
+ margin-left: 10px;
|
|
|
+ color: rgba(255, 255, 255, 0.75);
|
|
|
+ &.is-active{
|
|
|
+ background-color: rgba(0, 131, 207, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.back{
|
|
|
+ width: 85px;
|
|
|
+ height: 4vh;
|
|
|
+ position: absolute;
|
|
|
+ right: 0;
|
|
|
+ top: 0;
|
|
|
+ background-image: url("../images/back.png");
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.table-head{
|
|
|
+ display: flex;
|
|
|
+ justify-content:space-between;
|
|
|
+ align-items: center;
|
|
|
+ padding:10px;
|
|
|
+ .tab{
|
|
|
+ .tab-item{
|
|
|
+ margin: 0;
|
|
|
+ border-radius: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+.snap-image__preview{
|
|
|
+ padding-top: 8px;
|
|
|
+}
|
|
|
+</style>
|