巡查养护maps

master
lion 4 years ago
parent 7bc6f5aec7
commit d9ab440de5

@ -1,108 +1,105 @@
<template>
<div>
<dialogShow :title="title" :is-show.sync="isShow" :width="width" @resetform="resetPointArr">
<template v-slot:searchtype>
<el-popover placement="right-start" width="500" trigger="click" v-model="showSearch">
<div>
<el-row>
<el-col :span="11">
<Input class="vm10" style="width: 93%;" v-model="searchFields.keyword" placeholder="关键字搜索" />
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" v-model="searchFields.road_id" filterable remote reserve-keyword clearable
@focus="remoteRoad" placeholder="请输入关键词查找道路" :remote-method="remoteMethod" :loading="roadloading">
<el-option v-for="item in roadsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11">
<el-select class="vm10" filterable v-model="searchFields.area_id" placeholder="请选择所属片区">
<el-option v-for="item in selects.areasList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" filterable v-model="searchFields.maintain_id" placeholder="请选择所属养护单位">
<el-option v-for="item in selects.maintainList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11">
<el-select class="vm10" filterable v-model="searchFields.status" placeholder="请选择状态">
<el-option v-for="item in selects.statusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" filterable v-model="searchFields.unusual_type_id" placeholder="请选择异常类型">
<el-option v-for="item in selects.sunusualList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11">
<el-select class="vm10" filterable v-model="searchFields.type" placeholder="请选择类型">
<el-option v-for="item in selects.typeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" filterable v-model="searchFields.end_type" placeholder="请选择结办类型">
<el-option v-for="item in selects.endTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11">
<el-select class="vm10" filterable v-model="searchFields.ask_content_id" placeholder="请选择巡查内容">
<el-option v-for="item in selects.sequiementList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="24">
<el-date-picker class="vm10" v-model="mapdatesearch" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd">
</el-date-picker>
</el-col>
<el-col :span="24">
<Button type="primary" @click="loadMap(false)" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="resetSearch" style="margin-left: 10px">重置</Button>
</el-col>
</el-row>
</div>
<el-button type="primary" slot="reference">多项搜索</el-button>
</el-popover>
</template>
<!-- 地图 -->
<template v-slot:content>
<div class="wrapper" v-if="showmap">
<div class="chooseMap">
<div>
<el-radio-group v-model="showMap" @change="changeMap">
<el-radio v-for="item in mapRadioList" :label="item.id">{{item.title}}</el-radio>
</el-radio-group>
</div>
<div>
<el-checkbox-group v-model="checkList" @change="changeCheck">
<el-checkbox v-for="item in mapCheckList" :label="item.id">{{item.title}}</el-checkbox>
</el-checkbox-group>
</div>
</div>
<!-- 地图 -->
<div class="map" id="olMap"></div>
<!-- 弹框 -->
<div ref="popup" class="popup" v-show="shopPopup">
<div class="info">
<div class="address">地址{{nowAddress}}</div>
<div class="showinfo" @click='showInfo(nowId,types)'>查看详情</div>
</div>
</div>
</div>
</template>
</dialogShow>
<div>
<div class="mapwrap" :title="title" :is-show.sync="isShow" :width="width" @resetform="resetPointArr">
<div class="mapbtn">
<el-popover placement="right-start" width="500" trigger="click" v-model="showSearch">
<div>
<el-row>
<el-col :span="11">
<el-input class="vm10" style="width: 93%" v-model="searchFields.keyword" placeholder="关键字搜索" />
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" v-model="searchFields.road_id" filterable remote reserve-keyword clearable
@focus="remoteRoad" placeholder="请输入关键词查找道路" :remote-method="remoteMethod" :loading="roadloading">
<el-option v-for="item in roadsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11">
<el-select class="vm10" filterable v-model="searchFields.area_id" placeholder="请选择所属片区">
<el-option v-for="item in selects.areasList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" filterable v-model="searchFields.maintain_id" placeholder="请选择所属养护单位">
<el-option v-for="item in selects.maintainList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11">
<el-select class="vm10" filterable v-model="searchFields.status" placeholder="请选择状态">
<el-option v-for="item in selects.statusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" filterable v-model="searchFields.unusual_type_id" placeholder="请选择异常类型">
<el-option v-for="item in selects.sunusualList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11">
<el-select class="vm10" filterable v-model="searchFields.type" placeholder="请选择类型">
<el-option v-for="item in selects.typeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" filterable v-model="searchFields.end_type" placeholder="请选择结办类型">
<el-option v-for="item in selects.endTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11">
<el-select class="vm10" filterable v-model="searchFields.ask_content_id" placeholder="请选择巡查内容">
<el-option v-for="item in selects.sequiementList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="24">
<el-date-picker class="vm10" v-model="mapdatesearch" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd">
</el-date-picker>
</el-col>
<el-col :span="24">
<Button type="primary" @click="loadMap(false)" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="resetSearch" style="margin-left: 10px">重置</Button>
</el-col>
</el-row>
</div>
<el-button type="primary" slot="reference">多项搜索</el-button>
</el-popover>
</div>
<div>
<div class="wrapper" v-if="showmap">
<div class="chooseMap">
<div>
<el-radio-group v-model="showMap" @change="changeMap">
<el-radio v-for="item in mapRadioList" :label="item.id">{{item.title}}</el-radio>
</el-radio-group>
</div>
<div>
<el-checkbox-group v-model="checkList" @change="changeCheck">
<el-checkbox v-for="item in mapCheckList" :label="item.id">{{item.title}}</el-checkbox>
</el-checkbox-group>
</div>
</div>
<!-- 地图 -->
<div class="map" id="olMap"></div>
<!-- 弹框 -->
<div ref="popup" class="popup" v-show="shopPopup">
<div class="info">
<div class="address">地址{{nowAddress}}</div>
<div class="showinfo" @click='showInfo(nowId,types)'>查看详情</div>
</div>
</div>
</div>
</div>
</div>
<showRainEquipmentInfo ref="showRainEquipmentInfo"></showRainEquipmentInfo>
@ -166,15 +163,13 @@
} from '../../../../api/basic/road.js'
import showRainEquipmentInfo from '@/views/rain/inspection/components/showRainEquipmentInfo'
import showRainSiteInfo from '@/views/rain/inspection/components/showRainSiteInfo'
import dialogShow from '@/components/dialogShow'
export default {
components: {
showRainEquipmentInfo,
showRainSiteInfo,
CONFIGS,
MAPCONFIGS,
dialogShow
MAPCONFIGS
},
data() {
return {
@ -539,7 +534,19 @@
},
};
</script>
<style lang="scss" scoped>
<style lang="scss" scoped>
.mapwrap{
position: relative;
.mapbtn{
position: absolute;
top: 10px;
left: 50px;
z-index: 999;
}
}
.vm10{
margin-bottom:10px
}
.chooseMap {
position: absolute;
margin: 15px 20px;

@ -50,7 +50,7 @@
<Button type="primary" @click="edit()" style="margin-left: 10px">新增</Button>
<Button type="primary" @click="review()" style="margin-left: 10px">批量复核</Button>
<Button type="primary" @click="exportExcel()" style="margin-left: 10px">导出</Button>
<Button type="primary" @click="showMap()" style="margin-left: 10px">当月点位</Button>
<!-- <Button type="primary" @click="showMap()" style="margin-left: 10px">当月点位</Button> -->
</div>
</slot>
</LxHeader>
@ -123,8 +123,6 @@
</el-pagination>
</div>
</div>
<!-- 地图 -->
<maps ref="maps" @loadMap="loadMap"></maps>
<!-- 初始选择 -->
<el-dialog title="雨管养护类型选择" :visible.sync="rainTypeVisible" width="60%">
<div class="dialogConcent">
@ -191,11 +189,6 @@
import {
getToken
} from '@/utils/auth'
import {
getCurrentMonthFirst,
getCurrentMonthLast
} from '@/utils/index'
import {
getparameteritem
} from '../../../api/system/dictionary.js'
@ -213,15 +206,13 @@
import showRainSiteInfo from '@/views/rain/inspection/components/showRainSiteInfo'
import editEquipment from '@/views/rain/inspection/components/editEquipment'
import editSite from '@/views/rain/inspection/components/editSite'
import maps from '@/views/rain/inspection/components/maps'
export default {
components: {
LxHeader,
showRainEquipmentInfo,
showRainSiteInfo,
editEquipment,
editSite,
maps
editSite
},
data() {
return {
@ -498,50 +489,6 @@
reject(error)
});
},
showMap() {
this.loadMap(this.searchFields)
this.$nextTick(function() {
this.$refs.maps.pointArr = this.mapArr
this.$refs.maps.isShow = true
// this.$refs.maps.showMaps()
this.$refs.maps.selects = this.selects
})
},
//
loadMap(search) {
// return
this.mapArr = []
listall({
page: 1,
page_size: 9999999,
start_date: getCurrentMonthFirst(),
end_date: getCurrentMonthLast(),
...search
}).then(response => {
for (var m of response.data) {
if (m.rain_equipment_info) {
this.mapArr.push([
m.rain_equipment_info.longitude, m.rain_equipment_info.latitude, m.rain_equipment_info.address,
m.id, m.type
])
}
if (m.building_site_info) {
this.mapArr.push([
m.building_site_info.building_site.longitude, m.building_site_info.building_site.latitude, m
.building_site_info.building_site.address, m.id, m.type
])
}
}
this.$refs.maps.showSearch = false
this.$refs.maps.pointArr = this.mapArr
this.$refs.maps.resetPointArr()
}).catch(error => {
console.log(error)
reject(error)
});
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();

@ -0,0 +1,526 @@
<template>
<div class="container">
<div style="padding: 0px 20px">
<div ref="lxHeader">
<LxHeader icon="md-apps" text="雨管巡查查看" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div>
<Input class="vm10" style="width: 200px; margin-right: 10px" v-model="searchFields.keyword"
placeholder="关键字搜索" />
<el-select class="vm10" v-model="searchFields.road_id" filterable remote reserve-keyword clearable
@focus="remoteRoad" placeholder="请输入关键词查找道路" :remote-method="remoteMethod" :loading="roadloading">
<el-option v-for="item in roadsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-select class="vm10" filterable v-model="searchFields.area_id" placeholder="请选择所属片区">
<el-option v-for="item in selects.areasList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-select class="vm10" filterable v-model="searchFields.maintain_id" placeholder="请选择所属养护单位">
<el-option v-for="item in selects.maintainList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-select class="vm10" filterable v-model="searchFields.status" placeholder="请选择状态">
<el-option v-for="item in selects.statusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-select class="vm10" filterable v-model="searchFields.unusual_type_id" placeholder="请选择异常类型">
<el-option v-for="item in selects.sunusualList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
<el-select class="vm10" filterable v-model="searchFields.type" placeholder="请选择类型">
<el-option v-for="item in selects.typeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-select class="vm10" filterable v-model="searchFields.end_type" placeholder="请选择结办类型">
<el-option v-for="item in selects.endTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-select class="vm10" filterable v-model="searchFields.ask_content_id" placeholder="请选择巡查内容">
<el-option v-for="item in selects.sequiementList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
<el-date-picker class="vm10" v-model="datesearch" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd">
</el-date-picker>
<Button type="primary" @click="load(false)" style="margin-left: 10px">查询</Button>
</div>
</slot>
</LxHeader>
</div>
<div ref="lxTable">
<el-table :data="tableData" @row-click="clickShowInfo" class="v-table"
:height="tableHeight" style="width: 100%">
<el-table-column type="index" width="50" fixed label="序号" align="center"> </el-table-column>
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width" :fixed="column.fixed">
<template slot-scope="scope">
<div v-if="column.type=='opt'">
<Button ghost size="small" @click.native.stop="showInfo(scope.row,'showform')" type="primary"
style="margin-left: 10px;">查看</Button>
</div>
<div v-else-if="column.type=='type'">
<el-tag v-if="scope.row[column.field]==1"></el-tag>
<el-tag v-if="scope.row[column.field]==2"></el-tag>
</div>
<div v-else-if="column.type=='end_type'">
<el-tag v-if="scope.row[column.field]==2" type="warning"></el-tag>
<el-tag v-else></el-tag>
</div>
<div v-else-if="column.type=='status'">
<el-tag v-if="scope.row[column.field]==0"></el-tag>
<el-tag type="success" v-if="scope.row[column.field]==1"></el-tag>
<el-tag type="warning" v-if="scope.row[column.field]==2"></el-tag>
<el-tag type="info" v-if="scope.row[column.field]==3">退</el-tag>
</div>
<div v-else-if="column.type=='audit_status' && scope.row['status']==2">
<el-tag v-if="scope.row[column.field]==0"></el-tag>
<el-tag type="success" v-if="scope.row[column.field]==1"></el-tag>
</div>
<div v-else-if="column.type=='audit_status' && scope.row['status']!=2">
</div>
<div v-else-if="column.type=='format'">
{{scope.row[column.field]?scope.row[column.field].name:""}}
</div>
<div v-else-if="column.type=='admin'">
{{getUserName(scope.row)}}
</div>
<div v-else-if="column.type=='maintain'">
{{getMaintinName(scope.row)}}
</div>
<div v-else>{{scope.row[column.field]}}</div>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination @current-change="handleCurrentChange" :current-page="paginations.page"
:page-size="paginations.page_size" background layout="prev, pager, next" :total="paginations.total">
</el-pagination>
</div>
</div>
<!-- 查看 审核 办结 -->
<showRainEquipmentInfo ref="showRainEquipmentInfo" @auditSuccess="load"></showRainEquipmentInfo>
<showRainSiteInfo ref="showRainSiteInfo" @auditSuccess="load"></showRainSiteInfo>
</div>
</div>
</template>
<script>
import {
listall,
del,
review
} from '../../../api/rain/inspection.js'
import {
getToken
} from '@/utils/auth'
import {
getCurrentMonthFirst,
getCurrentMonthLast
} from '@/utils/index'
import {
getparameteritem
} from '../../../api/system/dictionary.js'
import {
listarea
} from '../../../api/basic/area.js'
import {
listmaintain
} from '../../../api/basic/unit.js'
import {
listroad
} from '../../../api/basic/road.js'
import LxHeader from "@/components/LxHeader/index.vue";
import showRainEquipmentInfo from '@/views/rain/inspection/components/showRainEquipmentInfo'
import showRainSiteInfo from '@/views/rain/inspection/components/showRainSiteInfo'
export default {
components: {
LxHeader,
showRainEquipmentInfo,
showRainSiteInfo
},
data() {
return {
tableHeight: 0,
formLabelWidth: "120px",
baseurl: "",
rainTypeVisible: false,
rainType: 1,
mapArr: [],
tableData: [],
paginations: {
page: 1,
page_size: 15,
total: 0
},
searchFields: {
is_export: 0,
is_auth: 1
},
datesearch: "",
roadsList: [],
roaddisabled: false,
roadloading: false,
selects: {
sunusualList: [{
id: "",
value: "所有"
}],
areasList: [{
id: "",
name: "所有"
}],
typeList: [{
id: "",
name: "所有"
}, {
id: 1,
name: "日常雨水设施"
}, {
id: 2,
name: "在建工地"
}],
statusList: [{
id: "",
name: "所有"
}, {
id: 0,
name: "未审核"
}, {
id: 1,
name: "已审核"
}, {
id: 2,
name: "已办结"
}, {
id: 3,
name: "已退回"
}],
endTypeList: [{
id: 0,
name: "所有"
}, {
id: 1,
name: "养护转办"
}, {
id: 2,
name: "违法转办"
}],
sequiementList: [{
id: "",
value: "所有"
}],
maintainList: [{
id: "",
name: "所有"
}]
},
reviewFormVisible: false,
reviewList: [],
reviewForm: {
ids: [],
audit_status: 0,
audit_reamrk: ""
},
reviewStatusList: [{
id: 0,
value: "待复核"
}, {
id: 1,
value: "已复核"
}],
rules: {
},
columns: [{
field: "address",
title: "地址",
type: "string",
align: "left",
width: 360
},
{
field: "area_info",
title: "所属片区",
type: "format",
align: "center",
width: 180
},
{
field: "maintain",
title: "所属养护单位",
type: "maintain",
align: "center",
width: 180
},
{
field: "askName",
title: "巡查内容",
type: "string",
align: "center",
width: 180
},
{
field: "type",
title: "类型",
type: "type",
align: "center",
width: 180
},
{
field: "end_type",
title: "是否有违法转办",
type: "end_type",
align: "center",
width: 180
},
{
field: "status",
title: "状态",
type: "status",
align: "center",
width: 180
},
{
field: "audit_status",
title: "复核状态",
type: "audit_status",
align: "center",
width: 180
},
{
field: "userName",
title: "提交人",
type: "admin",
align: "center",
width: 180
},
{
field: "created_at",
title: "提交日期",
type: "string",
align: "center",
width: 180
},
{
field: "操作",
title: "操作",
width: 120,
align:"center",
type: "opt",
fixed: "right"
}
],
}
},
created() {
this.initLoad();
this.load();
},
watch: {
datesearch(newVal, oldVal) {
if (newVal) {
this.searchFields.start_date = newVal[0]
this.searchFields.end_date = newVal[1]
} else {
this.searchFields.start_date = ""
this.searchFields.end_date = ""
}
}
},
methods: {
initLoad() {
var that = this;
var clientHeight = document.documentElement.clientHeight
var lxHeader_height = 96.5; //
var paginationHeight = 37; //
var topHeight = 50; //
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 60;
that.tableHeight = tableHeight;
that.baseurl = location.host;
getparameteritem('equiementList').then(res => {
for (var m of res.detail) {
that.selects.sequiementList.push(m)
}
})
getparameteritem('unusualList').then(res => {
for (var m of res.detail) {
that.selects.sunusualList.push(m)
}
})
listarea({
page: 1,
page_size: 999
}).then(res => {
for (var m of res.data) {
that.selects.areasList.push({
id: m.id,
name: m.name
})
}
})
listmaintain({
page: 1,
page_size: 999,
}).then(response => {
for (var m of response.data) {
this.selects.maintainList.push(m)
}
}).catch(error => {
console.log(error)
reject(error)
});
},
load(is_export) {
listall({
page: this.paginations.page,
page_size: this.paginations.page_size,
...this.searchFields
}).then(response => {
for (var m of response.data) {
if (m.rain_equipment_info) {
m.askName = m.rain_equipment_info.ask_content_detail ? m.rain_equipment_info.ask_content_detail :
""
}
}
this.tableData = response.data;
this.paginations.total = response.total;
}).catch(error => {
console.log(error)
reject(error)
});
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
},
clickShowInfo(row) {
this.showInfo(row, 'showform')
},
//
showInfo(obj, formtype) {
//
if (obj.type == 1) {
this.$refs.showRainEquipmentInfo.isShow = true
this.$refs.showRainEquipmentInfo.getEquipmentInfo(obj.id)
this.$refs.showRainEquipmentInfo.infoId = obj.id
this.$refs.showRainEquipmentInfo.formType = formtype
}
//
if (obj.type == 2) {
this.$refs.showRainSiteInfo.isShow = true
this.$refs.showRainSiteInfo.getSiteInfo(obj.id)
this.$refs.showRainSiteInfo.infoId = obj.id
this.$refs.showRainSiteInfo.formType = formtype
}
},
getUserName(row) {
if (row.admin) {
return row.admin.name;
} else if (row.user) {
return row.user.name;
} else {
return "未知";
}
},
getMaintinName(row) {
if (row.user) {
if (row.user.maintain) {
return row.user.maintain.name;
} else {
return "";
}
} else {
return "";
}
},
remoteRoad() {
this.roadsList = []
},
remoteMethod(query) {
if (query != '') {
this.roadloading = true
listroad({
name: query
}).then(res => {
this.roadloading = false
this.roadsList = res.data
})
} else {
this.roadsList = []
}
}
}
}
</script>
<style>
.dialogConcent {
overflow-y: auto;
}
.width100 {
width: 100%;
}
.files_check .el-upload.el-upload--picture-card {
display: none;
}
.vm10 {
margin-right: 10px;
margin-bottom: 10px;
height: 32px;
vertical-align: bottom;
}
.vm10 input {
height: 32px;
vertical-align: middle;
}
.vm10 .el-select__caret.el-input__icon.el-icon-arrow-up {
line-height: 30px;
}
.vm10 .el-input__icon.el-range__icon.el-icon-date,
.vm10 .el-range-separator {
line-height: 25px;
}
.selerchcontent button {
vertical-align: top;
}
</style>

@ -1,8 +1,203 @@
<template>
<div class="container">
<div style="padding: 0px">
<div ref="lxTable">
<maps ref="maps" @loadMap="loadMap"></maps>
</div>
</div>
</div>
</template>
<script>
import {
listall
} from '../../../api/rain/inspection.js'
import {
getCurrentMonthFirst,
getCurrentMonthLast
} from '@/utils/index'
import {
getparameteritem
} from '../../../api/system/dictionary.js'
import {
listarea
} from '../../../api/basic/area.js'
import {
listmaintain
} from '../../../api/basic/unit.js'
import {
listroad
} from '../../../api/basic/road.js'
import maps from '@/views/rain/inspection/components/maps'
export default {
components: {
maps
},
data() {
return {
mapArr: [],
searchFields: {
is_export: 0,
is_auth: 1
},
datesearch: "",
roadsList: [],
roaddisabled: false,
roadloading: false,
selects: {
sunusualList: [{
id: "",
value: "所有"
}],
areasList: [{
id: "",
name: "所有"
}],
typeList: [{
id: "",
name: "所有"
}, {
id: 1,
name: "日常雨水设施"
}, {
id: 2,
name: "在建工地"
}],
statusList: [{
id: "",
name: "所有"
}, {
id: 0,
name: "未审核"
}, {
id: 1,
name: "已审核"
}, {
id: 2,
name: "已办结"
}, {
id: 3,
name: "已退回"
}],
endTypeList: [{
id: 0,
name: "所有"
}, {
id: 1,
name: "养护转办"
}, {
id: 2,
name: "违法转办"
}],
sequiementList: [{
id: "",
value: "所有"
}],
maintainList: [{
id: "",
name: "所有"
}]
},
}
},
created() {
this.initLoad();
this.showMap();
},
watch: {
},
methods: {
initLoad() {
var that = this;
getparameteritem('equiementList').then(res => {
for (var m of res.detail) {
that.selects.sequiementList.push(m)
}
})
getparameteritem('unusualList').then(res => {
for (var m of res.detail) {
that.selects.sunusualList.push(m)
}
})
listarea({
page: 1,
page_size: 999
}).then(res => {
for (var m of res.data) {
that.selects.areasList.push({
id: m.id,
name: m.name
})
}
})
listmaintain({
page: 1,
page_size: 999,
}).then(response => {
for (var m of response.data) {
this.selects.maintainList.push(m)
}
}).catch(error => {
console.log(error)
reject(error)
});
},
showMap() {
this.loadMap(this.searchFields)
this.$nextTick(function() {
this.$refs.maps.pointArr = this.mapArr
this.$refs.maps.isShow = true
this.$refs.maps.mapdatesearch = [getCurrentMonthFirst(),getCurrentMonthLast()]
this.$refs.maps.selects = this.selects
})
},
//
loadMap(search) {
// return
this.mapArr = []
listall({
page: 1,
page_size: 9999999,
start_date: getCurrentMonthFirst(),
end_date: getCurrentMonthLast(),
...search
}).then(response => {
for (var m of response.data) {
if (m.rain_equipment_info) {
this.mapArr.push([
m.rain_equipment_info.longitude, m.rain_equipment_info.latitude, m.rain_equipment_info.address,
m.id, m.type
])
}
if (m.building_site_info) {
this.mapArr.push([
m.building_site_info.building_site.longitude, m.building_site_info.building_site.latitude, m
.building_site_info.building_site.address, m.id, m.type
])
}
}
this.$refs.maps.showSearch = false
this.$refs.maps.pointArr = this.mapArr
this.$refs.maps.resetPointArr()
}).catch(error => {
console.log(error)
reject(error)
});
},
}
}
</script>
<style>
</style>
</style>

@ -163,9 +163,9 @@
save,
del
} from '../../../api/inspectionmanagement/index.js'
import {
listCommonuser
} from '../../../api/common.js'
import {
listaccount
} from '../../../api/basic/account.js'
import {
listarea
} from '../../../api/basic/area.js'
@ -326,7 +326,7 @@
console.log(error)
reject(error)
});
listCommonuser({
listaccount({
page:1,
page_size:999
}).then(res => {

@ -1,81 +1,79 @@
<template>
<div>
<dialogShow :title="title" :is-show.sync="isShow" :width="width" @resetform="resetPointArr">
<template v-slot:searchtype>
<el-popover
placement="right-start"
width="500"
trigger="click"
v-model="showSearch"
>
<div>
<el-row>
<el-col :span="11">
<Input class="vm10" style="width: 93%;" v-model="searchFields.keyword"
placeholder="关键字搜索" />
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" v-model="searchFields.road_id" filterable remote reserve-keyword clearable
@focus="remoteRoad" placeholder="请输入关键词查找道路" :remote-method="remoteMethod" :loading="roadloading">
<el-option v-for="item in roadsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11">
<el-select class="vm10" filterable v-model="searchFields.area_id" placeholder="请选择所属片区">
<el-option v-for="item in selects.areasList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" filterable v-model="searchFields.maintain_id" placeholder="请选择所属养护单位">
<el-option v-for="item in selects.maintaingroupList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11">
<el-select class="vm10" filterable v-model="searchFields.status" placeholder="请选择状态">
<el-option v-for="item in selects.statusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" filterable v-model="searchFields.type" placeholder="请选择类型">
<el-option v-for="item in selects.typeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" >
<el-select class="vm10" filterable v-model="searchFields.end_type" placeholder="请选择结办类型">
<el-option v-for="item in selects.endTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" filterable v-model="searchFields.title_id" placeholder="请选择养护内容">
<el-option v-for="item in allmaintaninList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="24">
<el-date-picker class="vm10" v-model="mapdatesearch" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd">
</el-date-picker>
</el-col>
<el-col :span="24">
<Button type="primary" @click="loadMap(false)" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="resetSearch" style="margin-left: 10px">重置</Button>
</el-col>
</el-row>
</div>
<el-button type="primary" slot="reference">多项搜索</el-button>
</el-popover>
</template>
<!-- 地图 -->
<template v-slot:content>
<div class="mapwrap" :title="title" :is-show.sync="isShow" :width="width" @resetform="resetPointArr">
<div class="mapbtn">
<el-popover
placement="right-start"
width="500"
trigger="click"
v-model="showSearch"
>
<div>
<el-row>
<el-col :span="11">
<Input class="vm10" style="width: 93%;" v-model="searchFields.keyword"
placeholder="关键字搜索" />
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" v-model="searchFields.road_id" filterable remote reserve-keyword clearable
@focus="remoteRoad" placeholder="请输入关键词查找道路" :remote-method="remoteMethod" :loading="roadloading">
<el-option v-for="item in roadsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11">
<el-select class="vm10" filterable v-model="searchFields.area_id" placeholder="请选择所属片区">
<el-option v-for="item in selects.areasList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" filterable v-model="searchFields.maintain_id" placeholder="请选择所属养护单位">
<el-option v-for="item in selects.maintaingroupList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11">
<el-select class="vm10" filterable v-model="searchFields.status" placeholder="请选择状态">
<el-option v-for="item in selects.statusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" filterable v-model="searchFields.type" placeholder="请选择类型">
<el-option v-for="item in selects.typeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" >
<el-select class="vm10" filterable v-model="searchFields.end_type" placeholder="请选择结办类型">
<el-option v-for="item in selects.endTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="11" :offset="2">
<el-select class="vm10" filterable v-model="searchFields.title_id" placeholder="请选择养护内容">
<el-option v-for="item in allmaintaninList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
</el-col>
<el-col :span="24">
<el-date-picker class="vm10" v-model="mapdatesearch" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd">
</el-date-picker>
</el-col>
<el-col :span="24">
<Button type="primary" @click="loadMap(false)" style="margin-left: 10px">查询</Button>
<Button type="primary" @click="resetSearch" style="margin-left: 10px">重置</Button>
</el-col>
</el-row>
</div>
<el-button type="primary" slot="reference">多项搜索</el-button>
</el-popover>
</div>
<div class="wrapper" v-if="showmap">
<div class="chooseMap">
<div>
@ -101,9 +99,8 @@
</div>
</div>
</template>
</div>
</dialogShow>
<showCirculationInfo ref="showCirculationInfo"></showCirculationInfo>
<showDischargeInfo ref="showDischargeInfo"></showDischargeInfo>
<showMireInfo ref="showMireInfo"></showMireInfo>
@ -135,12 +132,14 @@ import proj4 from 'proj4'
import {CONFIGS,MAPCONFIGS} from '@/views/rain/inspection/components/config'
import {listroad} from '../../../../api/basic/road.js'
import {
getparameteritem
} from '../../../../api/system/dictionary.js'
import showCirculationInfo from '@/views/rain/maintain/components/showCirculationInfo'
import showDischargeInfo from '@/views/rain/maintain/components/showDischargeInfo'
import showMireInfo from '@/views/rain/maintain/components/showMireInfo'
import dialogShow from '@/components/dialogShow'
export default {
components: {
@ -148,8 +147,7 @@ export default {
showDischargeInfo,
showMireInfo,
CONFIGS,
MAPCONFIGS,
dialogShow
MAPCONFIGS
},
data() {
return {
@ -539,7 +537,18 @@ export default {
};
</script>
<style lang="scss" scoped>
.mapwrap{
position: relative;
.mapbtn{
position: absolute;
top: 10px;
left: 50px;
z-index: 999;
}
}
.vm10{
margin-bottom:10px
}
.chooseMap{
position: absolute;
margin: 15px 20px;

@ -46,7 +46,7 @@
<Button type="primary" @click="edit()" style="margin-left: 10px">新增</Button>
<Button type="primary" @click="review()" style="margin-left: 10px">批量复核</Button>
<Button type="primary" @click="exportExcel()" style="margin-left: 10px">导出</Button>
<Button type="primary" @click="showMap()" style="margin-left: 10px">当月点位</Button>
<!-- <Button type="primary" @click="showMap()" style="margin-left: 10px">当月点位</Button> -->
</div>
</slot>
</LxHeader>
@ -145,8 +145,6 @@
<el-button type="primary" v-preventReClick @click="submitRainType()"></el-button>
</div>
</el-dialog>
<!-- 地图 -->
<maps ref="maps" @loadMap="loadMap"></maps>
<el-dialog class="common-dialog" title="批量复核" :visible.sync="reviewFormVisible" width="40%">
<div class="dialogConcent">
@ -226,7 +224,6 @@
import editCirculation from '@/views/rain/maintain/components/editCirculation'
import editMire from '@/views/rain/maintain/components/editMire'
import AvueMap from 'avue-plugin-map'
import maps from '@/views/rain/maintain/components/maps'
import {
getCurrentMonthFirst,
getCurrentMonthLast
@ -241,7 +238,6 @@
showMireInfo,
editCirculation,
editMire,
maps
},
data() {
@ -531,55 +527,7 @@
});
},
showMap() {
this.loadMap(this.searchFields)
this.$nextTick(function() {
this.$refs.maps.pointArr = this.mapArr
this.$refs.maps.isShow = true
// this.$refs.maps.showMaps()
this.$refs.maps.selects = this.selects
})
},
//
loadMap(search) {
// return
this.mapArr = []
listmain({
page: 1,
page_size: 9999999,
start_date: getCurrentMonthFirst(),
end_date: getCurrentMonthLast(),
...search
}).then(response => {
for (var m of response.data) {
if (m.help_discharge_info) {
this.mapArr.push([
m.help_discharge_info.longitude, m.help_discharge_info.latitude, m.help_discharge_info.address,
m.id, m.old_type
])
}
if (m.circulation_info) {
this.mapArr.push([
m.circulation_info.longitude, m.circulation_info.latitude, m.circulation_info.address, m.id, m
.old_type
])
}
if (m.mire_info) {
this.mapArr.push([
m.mire_info.longitude, m.mire_info.latitude, m.mire_info.address, m.id, m.old_type
])
}
}
this.$refs.maps.showSearch = false
this.$refs.maps.pointArr = this.mapArr
this.$refs.maps.resetPointArr()
}).catch(error => {
console.log(error)
reject(error)
});
},
exportExcel() {
var that = this
that.searchFields.is_export = 1

@ -0,0 +1,547 @@
<template>
<div class="container">
<div style="padding: 0px 20px">
<div ref="lxHeader">
<LxHeader icon="md-apps" text="雨管养护管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
<div slot="content"></div>
<slot>
<div>
<Input class="vm10" style="width: 200px; margin-right: 10px" v-model="searchFields.keyword"
placeholder="关键字搜索" />
<el-select class="vm10" v-model="searchFields.road_id" filterable remote reserve-keyword clearable
@focus="remoteRoad" placeholder="请输入关键词查找道路" :remote-method="remoteMethod" :loading="roadloading">
<el-option v-for="item in roadsList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-select class="vm10" filterable v-model="searchFields.area_id" placeholder="请选择所属片区">
<el-option v-for="item in selects.areasList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-select class="vm10" filterable v-model="searchFields.maintain_id" placeholder="请选择所属养护单位">
<el-option v-for="item in selects.maintaingroupList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-select class="vm10" filterable v-model="searchFields.status" placeholder="请选择状态">
<el-option v-for="item in selects.statusList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-select class="vm10" filterable v-model="searchFields.type" placeholder="请选择类型">
<el-option v-for="item in selects.typeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-select class="vm10" filterable v-model="searchFields.end_type" placeholder="请选择结办类型">
<el-option v-for="item in selects.endTypeList" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
<el-select class="vm10" filterable v-model="searchFields.title_id" placeholder="请选择养护内容">
<el-option v-for="item in allmaintaninList" :key="item.id" :label="item.value" :value="item.id">
</el-option>
</el-select>
<el-date-picker class="vm10" v-model="datesearch" type="daterange" range-separator=""
start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd">
</el-date-picker>
<Button type="primary" @click="load(false)" style="margin-left: 10px">查询</Button>
</div>
</slot>
</LxHeader>
</div>
<div ref="lxTable">
<el-table :data="tableData" class="v-table" @row-click="clickShowInfo"
:height="tableHeight" style="width: 100%">
<el-table-column type="index" width="50" fixed label="序号" align="center"> </el-table-column>
<el-table-column :prop="column.field" :align="column.align" v-for="(column,index) in columns"
:label="column.title" :width="column.width" :fixed="column.fixed">
<template slot-scope="scope">
<div v-if="column.type=='opt'">
<Button ghost size="small" @click.native.stop="showInfo(scope.row,'showform')" type="primary"
style="margin-left: 10px;">查看</Button>
</div>
<div v-else-if="column.type=='end_type'">
<el-tag v-if="scope.row[column.field]==1" type="warning"></el-tag>
<el-tag v-else></el-tag>
</div>
<div v-else-if="column.type=='old_type'">
<div v-for="item in selects.typeList">
<el-tag v-if="scope.row[column.field]==item.id">{{item.name}}</el-tag>
</div>
</div>
<div v-else-if="column.type=='status'">
<el-tag v-if="scope.row[column.field]==0"></el-tag>
<el-tag type="success" v-if="scope.row[column.field]==1"></el-tag>
<el-tag type="warning" v-if="scope.row[column.field]==2"></el-tag>
<el-tag type="info" v-if="scope.row[column.field]==3">退</el-tag>
<el-tag type="danger" v-if="scope.row[column.field]==4"></el-tag>
</div>
<div v-else-if="column.type=='audit_status' && scope.row['status']==2">
<el-tag v-if="scope.row[column.field]==0"></el-tag>
<el-tag type="success" v-if="scope.row[column.field]==1"></el-tag>
<!-- <el-tag type="warning" v-if="scope.row[column.field]==2"></el-tag> -->
</div>
<div v-else-if="column.type=='audit_status' && scope.row['status']!=2">
</div>
<div v-else-if="column.type=='format'">
{{scope.row[column.field]?scope.row[column.field].name:""}}
</div>
<div v-else-if="column.type=='admin'">
{{getUserName(scope.row)}}
</div>
<div v-else-if="column.type=='maintain'">
{{getMaintinName(scope.row)}}
</div>
<!-- <div v-else-if="column.type=='end_type'">
<el-tag v-if="scope.row[column.field]==0"></el-tag>
<el-tag type="danger" v-if="scope.row[column.field]==1" >违法转办</el-tag>
</div> -->
<div v-else>{{scope.row[column.field]}}
</div>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination @current-change="handleCurrentChange" :current-page="paginations.page"
:page-size="paginations.page_size" background layout="prev, pager, next" :total="paginations.total">
</el-pagination>
</div>
</div>
<!-- 查看 审核 办结 -->
<showCirculationInfo ref="showCirculationInfo" @auditSuccess="load"></showCirculationInfo>
<showDischargeInfo ref="showDischargeInfo" @auditSuccess="load"></showDischargeInfo>
<showMireInfo ref="showMireInfo" @auditSuccess="load"></showMireInfo>
</div>
</div>
</template>
<script>
import {
listmain,
get,
del,
update,
review
} from '../../../api/rain/maintain.js'
import {
getToken
} from '@/utils/auth'
import {
listarea
} from '../../../api/basic/area.js'
import {
listroad
} from '../../../api/basic/road.js'
import {
listmaintain
} from '../../../api/basic/unit.js'
import {
getparameteritem
} from '../../../api/system/dictionary.js'
import LxHeader from "@/components/LxHeader/index.vue";
import showCirculationInfo from '@/views/rain/maintain/components/showCirculationInfo'
import showDischargeInfo from '@/views/rain/maintain/components/showDischargeInfo'
import showMireInfo from '@/views/rain/maintain/components/showMireInfo'
import {
getCurrentMonthFirst,
getCurrentMonthLast
} from "@/utils/index"
export default {
components: {
LxHeader,
showCirculationInfo,
showDischargeInfo,
showMireInfo
},
data() {
return {
tableHeight: 0,
formLabelWidth: "120px",
mapArr: [],
tableData: [],
paginations: {
page: 1,
page_size: 15,
total: 0
},
tableHeight: 0,
rainTypeVisible: false,
rainType: 1,
datesearch: "",
baseurl: "",
searchFields: {
is_export: 0,
is_auth: 1
},
roadsList: [],
roadName: "",
roaddisabled: false,
roadloading: false,
selects: {
areasList: [{
id: "",
name: "所有"
}],
typeList: [{
id: "",
name: "所有"
}, {
id: 1,
name: "雨水管道疏挖"
}, {
id: 2,
name: "雨水管道疏通"
}, {
id: 3,
name: "汛期助排"
}, {
id: 4,
name: "污泥外运"
}, {
id: 5,
name: "出水口排查"
}, {
id: 6,
name: "专项处理"
}, {
id: 7,
name: "维修"
}],
statusList: [{
id: "",
name: "所有"
}, {
id: 0,
name: "未审核"
}, {
id: 1,
name: "已审核"
}, {
id: 2,
name: "已办结"
}, {
id: 3,
name: "已退回"
}],
endTypeList: [{
id: 0,
name: "所有"
}, {
id: 1,
name: "养护转办"
}, {
id: 2,
name: "违法转办"
}],
maintaingroupList: [{
id: "",
name: "所有"
}],
},
maintaninList: [],
allmaintaninList: [{
id: "",
value: "所有"
}],
reviewFormVisible: false,
reviewList: [],
reviewForm: {
ids: [],
audit_status: 0,
audit_reamrk: ""
},
reviewStatusList: [{
id: 0,
value: "待复核"
}, {
id: 1,
value: "已复核"
}],
columns: [{
field: "address",
title: "地址/排放点",
type: "string",
align: "left",
width: 360
},
{
field: "area_info",
title: "所属片区",
type: "format",
align: "center",
width: 180
},
{
field: "maintain",
title: "所属养护单位",
type: "maintain",
align: "center",
width: 180
},
{
field: "old_type",
title: "类型",
type: "old_type",
align: "center",
width: 180
},
{
field: "end_type",
title: "有无违法转办",
type: "end_type",
align: "center",
width: 180
},
{
field: "status",
title: "状态",
type: "status",
align: "center",
width: 180
},
{
field: "audit_status",
title: "复核状态",
type: "audit_status",
align: "center",
width: 180
},
// {
// field: "end_type",
// title: "",
// type: "end_type",
// align: "center",
// width:160
// },
{
field: "userName",
title: "提交人",
type: "admin",
align: "center",
width: 180
},
{
field: "created_at",
title: "提交日期",
type: "string",
align: "center",
width: 180
},
{
field: "操作",
title: "操作",
width: 120,
align:"center",
type: "opt",
fixed: "right"
}
],
}
},
created() {
this.initLoad();
this.load();
},
watch: {
rainType() {
this.roadsList = []
},
datesearch(newVal, oldVal) {
if (newVal) {
this.searchFields.start_date = newVal[0]
this.searchFields.end_date = newVal[1]
} else {
this.searchFields.start_date = ""
this.searchFields.end_date = ""
}
},
'searchFields.type': function(val) {
if (val == 1 || val == 2 || val == 3 || val == 5 || val == 6 || val == 7) {
getparameteritem('maintainContent_' + val).then(res => {
for (var m of res.detail) {
this.allmaintaninList.push(m)
}
})
} else {
this.allmaintaninList = [{
id: "",
value: "所有"
}]
}
},
},
methods: {
initLoad() {
var that = this;
var clientHeight = document.documentElement.clientHeight
var lxHeader_height = 96.5; //
var paginationHeight = 37; //
var topHeight = 50; //
let tableHeight = clientHeight - lxHeader_height - topHeight - paginationHeight - 20;
that.tableHeight = tableHeight;
that.baseurl = location.host; //process.env.VUE_APP_BASE_API
// this.uploadOther.token = getToken();
listarea({
page: 1,
page_size: 99
}).then(res => {
for (var m of res.data) {
that.selects.areasList.push({
id: m.id,
name: m.name
})
}
})
listmaintain({
page: 1,
page_size: 999,
}).then(response => {
for (var m of response.data) {
this.selects.maintaingroupList.push(m)
}
}).catch(error => {
console.log(error)
reject(error)
});
},
handleCurrentChange(page) {
this.paginations.page = page;
this.load();
},
load(is_export) {
listmain({
page: this.paginations.page,
page_size: this.paginations.page_size,
...this.searchFields
}).then(response => {
this.tableData = response.data;
this.paginations.total = response.total;
}).catch(error => {
console.log(error)
reject(error)
});
},
remoteRoad() {
this.roadsList = []
},
remoteMethod(query) {
if (query != '') {
this.roadloading = true
listroad({
name: query
}).then(res => {
this.roadloading = false
this.roadsList = res.data
})
} else {
this.roadsList = []
}
},
resetrainType() {
this.rainType = 1
this.rainTypeVisible = false
},
clickShowInfo(row) {
this.showInfo(row, 'showform')
},
//
showInfo(obj, formtype) {
if (obj.old_type == 1 || obj.old_type == 2 || obj.old_type == 6 || obj.old_type == 7 || obj.old_type == 5) {
this.$refs.showCirculationInfo.isShow = true
this.$refs.showCirculationInfo.infoId = obj.id
this.$refs.showCirculationInfo.formType = formtype
this.$refs.showCirculationInfo.getInfo(obj.id)
} else if (obj.old_type == 3) {
this.$refs.showDischargeInfo.isShow = true
this.$refs.showDischargeInfo.infoId = obj.id
this.$refs.showDischargeInfo.formType = formtype
this.$refs.showDischargeInfo.getInfo(obj.id)
} else if (obj.old_type == 4) {
this.$refs.showMireInfo.isShow = true
this.$refs.showMireInfo.infoId = obj.id
this.$refs.showMireInfo.formType = formtype
this.$refs.showMireInfo.getInfo(obj.id)
}
},
getUserName(row) {
if (row.admin) {
return row.admin.name;
} else if (row.user) {
return row.user.name;
} else {
return "未知";
}
},
getMaintinName(row) {
if (row.user) {
if (row.user.maintain) {
return row.user.maintain.name;
} else {
return "";
}
} else {
return "";
}
},
}
}
</script>
<style lang="scss">
.dialogConcent {
overflow-y: auto;
}
.width100 {
width: 100%;
}
.files_check .el-upload.el-upload--picture-card {
display: none;
}
.vm10 {
margin-right: 10px;
margin-bottom: 10px;
height: 32px;
vertical-align: bottom;
}
.vm10 input {
height: 32px;
vertical-align: middle;
}
.vm10 .el-select__caret.el-input__icon.el-icon-arrow-up {
line-height: 30px;
}
.vm10 .el-input__icon.el-range__icon.el-icon-date,
.vm10 .el-range-separator {
line-height: 25px;
}
.selerchcontent button {
vertical-align: top;
}
</style>

@ -1,8 +1,216 @@
<template>
</template>
<template>
<div class="container">
<div style="padding: 0px">
<div ref="lxTable">
<maps ref="maps" @loadMap="loadMap"></maps>
</div>
</div>
</div>
</template>
<script>
</script>
import {
listmain
} from '../../../api/rain/maintain.js'
import {
getCurrentMonthFirst,
getCurrentMonthLast
} from '@/utils/index'
import {
listarea
} from '../../../api/basic/area.js'
import {
listroad
} from '../../../api/basic/road.js'
import {
listmaintain
} from '../../../api/basic/unit.js'
import {
getparameteritem
} from '../../../api/system/dictionary.js'
import maps from '@/views/rain/maintain/components/maps'
export default {
components: {
maps
},
data() {
return {
mapArr: [],
datesearch: "",
searchFields: {
is_export: 0,
is_auth: 1
},
roadsList: [],
roadName: "",
roaddisabled: false,
roadloading: false,
selects: {
areasList: [{
id: "",
name: "所有"
}],
typeList: [{
id: "",
name: "所有"
}, {
id: 1,
name: "雨水管道疏挖"
}, {
id: 2,
name: "雨水管道疏通"
}, {
id: 3,
name: "汛期助排"
}, {
id: 4,
name: "污泥外运"
}, {
id: 5,
name: "出水口排查"
}, {
id: 6,
name: "专项处理"
}, {
id: 7,
name: "维修"
}],
statusList: [{
id: "",
name: "所有"
}, {
id: 0,
name: "未审核"
}, {
id: 1,
name: "已审核"
}, {
id: 2,
name: "已办结"
}, {
id: 3,
name: "已退回"
}],
endTypeList: [{
id: 0,
name: "所有"
}, {
id: 1,
name: "养护转办"
}, {
id: 2,
name: "违法转办"
}],
maintaingroupList: [{
id: "",
name: "所有"
}],
},
maintaninList: [],
allmaintaninList: [{
id: "",
value: "所有"
}],
}
},
created() {
this.initLoad();
this.showMap();
},
watch: {
},
methods: {
initLoad() {
var that = this;
// this.uploadOther.token = getToken();
listarea({
page: 1,
page_size: 999
}).then(res => {
for (var m of res.data) {
that.selects.areasList.push({
id: m.id,
name: m.name
})
}
})
listmaintain({
page: 1,
page_size: 999,
}).then(response => {
console.log(response.data)
for (var m of response.data) {
this.selects.maintaingroupList.push(m)
}
}).catch(error => {
console.log(error)
reject(error)
});
},
showMap() {
this.loadMap(this.searchFields)
this.$nextTick(function() {
this.$refs.maps.pointArr = this.mapArr
this.$refs.maps.isShow = true
this.$refs.maps.mapdatesearch = [getCurrentMonthFirst(),getCurrentMonthLast()]
// this.$refs.maps.showMaps()
console.log(this.selects)
this.$refs.maps.selects = this.selects
})
},
//
loadMap(search) {
// return
this.mapArr = []
listmain({
page: 1,
page_size: 9999999,
start_date: getCurrentMonthFirst(),
end_date: getCurrentMonthLast(),
...search
}).then(response => {
for (var m of response.data) {
if (m.help_discharge_info) {
this.mapArr.push([
m.help_discharge_info.longitude, m.help_discharge_info.latitude, m.help_discharge_info.address,
m.id, m.old_type
])
}
if (m.circulation_info) {
this.mapArr.push([
m.circulation_info.longitude, m.circulation_info.latitude, m.circulation_info.address, m.id, m
.old_type
])
}
if (m.mire_info) {
this.mapArr.push([
m.mire_info.longitude, m.mire_info.latitude, m.mire_info.address, m.id, m.old_type
])
}
<style>
</style>
}
this.$refs.maps.showSearch = false
this.$refs.maps.pointArr = this.mapArr
this.$refs.maps.resetPointArr()
}).catch(error => {
console.log(error)
reject(error)
});
}
}
}
</script>
<style>
</style>

Loading…
Cancel
Save