<template>
|
<div class="sewers-search" v-if="gdVisible">
|
<div class="panel-title">{{title}}</div>
|
<div class="search-panel ">
|
<el-form ref="form" :model="form" label-width="90px" class="search-form">
|
<el-form-item label="二级单位:" size="mini">
|
<el-select style="width: 100%" v-model="form.enterpriseSubunitsVal" @change="enterpriseSubunitsType"
|
:popper-class="'select-down'">
|
<el-option
|
v-for="item in enterpriseSubunitsTypeOptions"
|
:key="item.value"
|
:label="item.label"
|
:value="item.value">
|
</el-option>
|
</el-select>
|
</el-form-item>
|
<el-form-item label="运行状态:" size="mini"></el-form-item>
|
<el-radio-group v-model="form.type" class="levelOfRisk">
|
<el-radio v-for="(item,index) in levelOfRisk" :label="item.value" :key="index">
|
<span class="levelOfRisk-type">{{item.name}}<i :style="'background:'+item.color"></i></span>
|
</el-radio>
|
</el-radio-group>
|
<div class="page_total">
|
<p>共计
|
<span>{{total}}</span>
|
条记录
|
</p>
|
</div>
|
<div class="rightButtonSearch">
|
<el-input v-model="form.keyword" size="mini" placeholder="在此输入关键字搜索"></el-input>
|
<el-button class="el-icon-search" @click="handleSearch"></el-button>
|
</div>
|
</el-form>
|
</div>
|
<el-scrollbar style="height:416.44px">
|
<div class="environmental-risk-list" v-for="(item,index) in list" :key="index"
|
@click="handleLocation(item)">
|
<img :src='iconUrl[1]' alt="" class="state"/>
|
<div>
|
<h3>{{ item.governName }}</h3>
|
<p>二级单位:<span>{{ item.unitName }}</span></p>
|
</div>
|
</div>
|
</el-scrollbar>
|
<!-- <span class="location-btn" @click="handleLocation(item)">588</span> -->
|
<el-card class="footer-page" v-if="total > 10">
|
<el-pagination
|
small
|
@current-change="handlePage"
|
:page-size=pageSize
|
layout="prev, pager, next"
|
:total=total
|
:current-page=current
|
class="warnPagination"
|
>
|
</el-pagination>
|
</el-card>
|
</div>
|
</template>
|
|
<script>
|
|
import GovernEquipmentIndex from '@components/base-page/GovernEquipment/GovernEquipmentIndex'
|
import { pulseEffect, setPanTo } from '@utils/utils'
|
const mapApi = require('../../../api/mapApi').default
|
|
export default {
|
name: 'PollutionSource',
|
data () {
|
return {
|
gdVisible: true,
|
list: [],
|
total: 0,
|
pageSize: 10,
|
current: 1,
|
enterpriseSubunitsTypeOptions: [],
|
form: {
|
enterpriseSubunitsVal: '',
|
type: ''
|
},
|
isWaybillHover: true,
|
isRouteHover: false,
|
levelOfRisk: [
|
{ name: '正常', value: '1', color: 'green' },
|
{ name: '停运', value: '2', color: 'grey' }
|
],
|
iconUrl: ['',
|
require('../../../../public/assets/images/map/governEquipment/govern_green.png')
|
]
|
}
|
},
|
props: ['title'],
|
methods: {
|
handlePage () {
|
|
},
|
// 二级单位筛选
|
enterpriseSubunitsType (val) {
|
|
},
|
async handleSearch () {
|
const param = {
|
}
|
const res = await mapApi.getGovernEquipment(param)
|
this.list = res // 临时数据
|
},
|
|
handleLocation (val) {
|
const pos = [val.Latitude, val.Longitude]
|
window.map.setView(pos, 15)
|
window.$layer.open({
|
content: {
|
comp: GovernEquipmentIndex, // 组件
|
parent: this, // 父组件
|
data: { // 传递的参数
|
governId: val.no
|
}
|
},
|
title: '天津石化' + val.governName
|
})
|
pulseEffect([val.Latitude, val.Longitude])
|
setPanTo(pos, 250)
|
}
|
}
|
}
|
</script>
|
|
<style lang="less" scoped>
|
|
</style>
|