qa-regulatory-gwj-vue/src/views/gatemachine/primarygatemanager/gatestatistics/components/passageStatistics.vue

160 lines
4.2 KiB
Vue

<template>
<div class="app-container">
<div class="rightCont">
<div>
<el-page-header content="进出情况分析管理" @back="goBack"/>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
border
tooltip-effect="dark"
:cell-style="getPlateColor"
style="width: 100%">
<el-table-column type="index" label="序号" width="55" align="center"/>
<el-table-column prop="PASSAGE_NAME" label="通道名称" align="center"/>
<el-table-column prop="AREA_REGION" label="所属区域" align="center">
<template>
<span>{{this.$parent.AREA_REGION}}</span>
</template>
</el-table-column>
<el-table-column prop="PASSAGE_TYPE" label="通道类型" align="center">
<template slot-scope="{row}">
<span v-if="row.PASSAGE_TYPE==1">人行通道</span>
<span v-if="row.PASSAGE_TYPE==2">车型通道</span>
<span v-if="row.PASSAGE_TYPE==3">综合通道</span>
</template>
</el-table-column>
<el-table-column prop="CAR_IN" label="进入车辆" align="center"/>
<el-table-column prop="CAR_OUT" label="外出车辆" align="center"/>
<el-table-column prop="PEOPLE_IN" label="进入人员" align="center"/>
<el-table-column prop="PEOPLE_OUT" label="离开人员" align="center"/>
<el-table-column prop="" label="总计" align="center">
<template slot-scope="{row}">
{{ parseInt(row.CAR_IN) + parseInt(row.CAR_OUT) + parseInt(row.PEOPLE_IN) + parseInt(row.PEOPLE_OUT) }}
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<pagination
:total="total"
:page.sync="listQuery.page"
:limit.sync="listQuery.limit"
@pagination="getList"/>
</div>
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
export default {
components: { Pagination },
directives: { waves },
data() {
return {
listQuery: {
page: 1,
limit: 20
},
total: 0,
KEYWORDS: '',
AREA_ID: '',
AREA_REGION:'',
varList: [],
pd: [],
}
},
created() {
this.AREA_ID = this.$parent.AREA_ID
this.AREA_REGION = this.$parent.AREA_REGION
this.getList()
this.getDict()
},
methods: {
active(){
this.AREA_ID = this.$parent.AREA_ID
this.AREA_REGION = this.$parent.AREA_REGION
this.getList()
this.getDict()
},
goBack(){
this.$parent.AREA_ID = ''
this.$parent.AREA_REGION = ''
this.$parent.activeName = 'areaStatistics'
},
getRowKey(row) {
return row.id_sequence
},
getQuery() {
this.getList()
},
// 获取列表
getList() {
this.listLoading = true
this.varList = []
requestFN(
'/mkmjGateStatistics/page?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page + '&AREA_ID=' + this.$parent.AREA_ID,
{
}
).then((data) => {
this.listLoading = false
this.varList = data.varList
this.total = data.total
this.hasButton()
}).catch((e) => {
this.listLoading = false
})
},
people(){
this.$parent.activeName = 'peopleRecordList'
},
getDict() {
requestFN(
'/corpinfo/getSelectByCorpInfo',
{
}
).then((data) => {
this.corpList = JSON.parse(data.corpInfoJson)
}).catch((e) => {
})
requestFN(
'dictionaries/getLevels',
{
DICTIONARIES_ID: '6bba977985f6427e9d0b52afe8884d1a'
}
).then((data) => {
this.typeData = data.list
})
.catch((e) => {
this.listLoading = false
})
},
}
}
</script>
<style scoped>
.returnBtn {
float: right;
}
.app-container {
display: flex; /**/
align-items: baseline;
}
.rightCont {
width: 100%
}
</style>