2 changed files with 222 additions and 0 deletions
@ -0,0 +1,216 @@ |
|||
<template> |
|||
<div class="board_record"> |
|||
<!-- 搜索栏 --> |
|||
<div class="filter"> |
|||
<div> |
|||
|
|||
<ButtonGradient @click="openList" class="refresh-btn"> |
|||
<template #prefix> |
|||
<img src="@screen/images/refresh.svg" /> |
|||
</template> |
|||
刷新 |
|||
</ButtonGradient> |
|||
</div> |
|||
|
|||
|
|||
</div> |
|||
<!-- 内容 --> |
|||
<div class="body"> |
|||
<Table :data="tableData" height="75vh"> |
|||
<el-table-column |
|||
label="序号" |
|||
type="index" |
|||
:index="indexMethod" |
|||
width="100" |
|||
align="center" |
|||
header-align="center" |
|||
/> |
|||
<ElTableColumn |
|||
label="设备名称" |
|||
show-overflow-tooltip |
|||
prop="deviceName" |
|||
|
|||
/> |
|||
|
|||
<!-- <ElTableColumn label="方向" prop="directionName" /> --> |
|||
|
|||
<ElTableColumn label="桩号" prop="stakeMark" /> |
|||
<ElTableColumn label="当前烟感值" width="300" prop="smokeValue" /> |
|||
<ElTableColumn label="上报时间" prop="createTime" /> |
|||
<ElTableColumn label="更新时间" prop="updateTime" /> |
|||
|
|||
</Table> |
|||
</div> |
|||
|
|||
<!-- 分页 --> |
|||
<div class="footer"> |
|||
<Pagination |
|||
@current-change="initData" |
|||
@size-change="onSizeChange" |
|||
width="'100%'" |
|||
:page-sizes="[10, 20, 30, 40, 50]" |
|||
:page-size="searchData.pageSize" |
|||
:current-page.sync="searchData.pageNum" |
|||
layout="total, sizes, prev, pager, next" |
|||
:total="total" |
|||
> |
|||
</Pagination> |
|||
</div> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import ButtonGradient from '@screen/components/Buttons/ButtonGradient.vue'; |
|||
import Pagination from '@screen/components/Pagination.vue'; |
|||
import Table from '@screen/components/Table.vue'; |
|||
import request from '@/utils/request' |
|||
import BoardRecordPreview from '@screen/components/infoBoard/BoardRecordPreview.vue' |
|||
import InputSearch from "@screen/components/InputSearch/index.vue"; |
|||
import { Message } from "element-ui"; |
|||
import Button from "@screen/components/Buttons/Button.vue"; |
|||
import Form from "@screen/components/FormConfig"; |
|||
import {deviceTypeOptions} from '@screen/utils/enum.js'; |
|||
import DialogWarning from '@screen/components/HeaderMenu/dialogWarn/DialogWarning.vue' |
|||
|
|||
|
|||
export default { |
|||
name: 'boardRecord', |
|||
components: { |
|||
ButtonGradient, |
|||
Pagination, |
|||
Table, |
|||
Button, |
|||
Form, |
|||
DialogWarning, |
|||
BoardRecordPreview, |
|||
InputSearch |
|||
}, |
|||
data() { |
|||
return { |
|||
isDiagnosing: false, |
|||
WarningType:{ |
|||
1: '交通流预警', |
|||
2: '气象预警' |
|||
}, |
|||
tableData: [], |
|||
total: 20, |
|||
searchData: { |
|||
pageSize: 20, |
|||
pageNum: 1 |
|||
}, |
|||
dialogWarningVisible: false, |
|||
deviceTypeCount:"", |
|||
} |
|||
}, |
|||
created() { |
|||
this.initData(); |
|||
}, |
|||
mounted(){ |
|||
}, |
|||
methods: { |
|||
onRefreshForm(){ |
|||
this.searchData.pageNum = 1; |
|||
this.$refs.searchComp.handleResetForm(); |
|||
}, |
|||
|
|||
indexMethod(index) { |
|||
return this.searchData.pageSize*(this.searchData.pageNum-1) + index + 1; |
|||
}, |
|||
|
|||
|
|||
initData() { |
|||
request({ |
|||
url: `/business/device/dcSmokeRecordList`, |
|||
method: "get", |
|||
params: this.searchData, |
|||
}).then((result) => { |
|||
if (result.code != 200) return Message.error(result?.msg); |
|||
result.rows.forEach(e=>{ |
|||
e.directionName = e.direction === 1 ? '菏泽方向' : |
|||
(e.direction === 3 ? '济南方向' : '双向'); |
|||
}) |
|||
this.tableData = result.rows; |
|||
this.total = result.total; |
|||
}); |
|||
}, |
|||
onSizeChange(pageSize) { |
|||
this.tableData = []; |
|||
this.searchData.pageSize = pageSize; |
|||
this.searchData.pageNum = 1; |
|||
this.initData(); |
|||
}, |
|||
openList(){ |
|||
request({ |
|||
url: `/business/device/dcSmokeRecordList`, |
|||
method: "get", |
|||
}).then((result) => { |
|||
if (result.code != 200) return Message.error(result?.msg); |
|||
this.tableData = result.rows; |
|||
this.total = result.total; |
|||
}); |
|||
} |
|||
|
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
.board_record { |
|||
padding: 0 14px 14px; |
|||
width: 100%; |
|||
height: 100%; |
|||
display: flex; |
|||
flex-direction: column; |
|||
|
|||
.filter { |
|||
height: 60px; |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
|
|||
> div { |
|||
display: flex; |
|||
gap: 6px; |
|||
} |
|||
} |
|||
|
|||
.body { |
|||
flex: 1; |
|||
height: 0; |
|||
min-height: 0; |
|||
} |
|||
|
|||
.footer { |
|||
margin-top: 15px; |
|||
height: 36px; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
|||
.board_shower { |
|||
margin: 4px; |
|||
} |
|||
::v-deep .el-carousel__indicators--horizontal { |
|||
line-height: 0; |
|||
height: 16px; |
|||
.el-carousel__indicator--horizontal { |
|||
padding: 7px 4px; |
|||
} |
|||
} |
|||
::v-deep .el-table__cell div.cell { |
|||
padding: 0 10px !important; |
|||
} |
|||
} |
|||
.upload-file { |
|||
width: 100%; |
|||
margin: 20px 0px; |
|||
background-color: #104c66 !important; |
|||
border: 1px solid #359cbc !important; |
|||
border-radius: 5px; |
|||
text-align: center; |
|||
padding: 5px 0px; |
|||
font-size: 14px; |
|||
cursor: pointer; |
|||
} |
|||
</style> |
Loading…
Reference in new issue