|
|
@@ -4,37 +4,41 @@
|
|
|
<div class="content-top">
|
|
|
<el-form ref="form" :model="form" :inline="true" label-width="auto" size="small">
|
|
|
<el-form-item label="关键字">
|
|
|
- <el-input v-model="form.name" placeholder="支持搜索管段编号" clearable></el-input>
|
|
|
+ <el-input v-model="form.pipeNo" placeholder="支持搜索管段编号" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="缺陷类型">
|
|
|
- <el-select v-model="form.model" placeholder="请选择" style="width:150px">
|
|
|
- <el-option v-for="item in []" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ <el-select v-model="form.flawType" placeholder="请选择" style="width:150px" clearable>
|
|
|
+ <el-option v-for="(item,index) in drainageOptions" :key="index" :label="item.notes" :value="item.codeValue">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="缺陷等级">
|
|
|
- <el-select v-model="form.model" placeholder="请选择" style="width:150px">
|
|
|
- <el-option v-for="item in []" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ <el-select v-model="form.flawLevel" placeholder="请选择" style="width:150px" clearable>
|
|
|
+ <el-option v-for="(item,index) in defectLevelsOptions" :key="index" :label="item.notes" :value="item.notes">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="管径" label-width="40px">
|
|
|
- <el-select v-model="form.model" placeholder="请选择" style="width:120px">
|
|
|
- <el-option v-for="item in []" :key="item.value" :label="item.label" :value="item.value">
|
|
|
+ <el-select v-model="form.pipeDiameter" placeholder="请选择" style="width:120px" clearable>
|
|
|
+ <el-option v-for="(item,index) in pipeCalOptions" :key="index" :label="item.notes" :value="item.codeValue">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="排水类型">
|
|
|
- <el-checkbox v-model="form.drainageTypes" label="雨水">雨水</el-checkbox>
|
|
|
- <el-checkbox v-model="form.drainageTypes" label="污水">污水</el-checkbox>
|
|
|
+ <el-checkbox-group v-model="drainageTypes">
|
|
|
+ <el-checkbox label="雨水">雨水</el-checkbox>
|
|
|
+ <el-checkbox label="污水">污水</el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="管道级别" style="margin-left:30px;">
|
|
|
- <el-checkbox v-model="form.checked3">主管道</el-checkbox>
|
|
|
- <el-checkbox v-model="form.checked4">支管</el-checkbox>
|
|
|
- <el-checkbox v-model="form.checked5">小区管网</el-checkbox>
|
|
|
+ <el-checkbox-group v-model="pipelineLevels">
|
|
|
+ <el-checkbox label="主管道">主管道</el-checkbox>
|
|
|
+ <el-checkbox label="支管">支管</el-checkbox>
|
|
|
+ <el-checkbox label="小区管网">小区管网</el-checkbox>
|
|
|
+ </el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item label-width="0" style="margin:0;float:right;">
|
|
|
- <el-button type="primary">搜索</el-button>
|
|
|
+ <el-button type="primary" @click="query()">搜索</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
|
@@ -53,7 +57,7 @@
|
|
|
<el-table-column prop="pipelineLevel" label="管道级别" align="center" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="pipeDiameter" label="管径(mm)" align="center" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="texture" label="材质" align="center" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="length" label="长度(m)" align="center" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="pipeLength" label="长度(m)" align="center" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="healthLever" label="健康等级" align="center" show-overflow-tooltip></el-table-column>
|
|
|
<el-table-column prop="networkBroken" label="管网破损" align="center" show-overflow-tooltip>
|
|
|
<template slot-scope="{row}">
|
|
|
@@ -88,6 +92,8 @@
|
|
|
import Vue from 'vue'
|
|
|
import { getFlawLocation, getFlawDetail } from '../api/api'
|
|
|
import defectPopup from './defectPopup/index.vue'
|
|
|
+
|
|
|
+import { fetchDictionary } from '@/api/common/index'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
@@ -95,27 +101,56 @@ export default {
|
|
|
tableData: [],
|
|
|
pagination: { current: 1, size: 20, total: 0 },
|
|
|
dialogVisible: false,
|
|
|
+ popup: null,
|
|
|
handler: null,
|
|
|
polygonDraw: null,
|
|
|
- opType: 1
|
|
|
+ opType: 1,
|
|
|
+ pipelineLevels: [],
|
|
|
+ drainageTypes: [],
|
|
|
+ levelOptions: [],
|
|
|
+ drainageOptions: [],
|
|
|
+ pipeCalOptions:[],
|
|
|
+ defectLevelsOptions:[]
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.getEnumer()
|
|
|
this.getPages()
|
|
|
},
|
|
|
+ destroyed() {
|
|
|
+ let ety = window.viewer.entities.getById('liner')
|
|
|
+ if (ety) window.viewer.entities.remove(ety)
|
|
|
+ if (this.popup) this.popup.remove()
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ /**
|
|
|
+ * 获取枚举值
|
|
|
+ */
|
|
|
+ getEnumer() {
|
|
|
+ fetchDictionary('HIDDEN_DANGER_TYPE').then((res) => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.drainageOptions = res.result
|
|
|
+ }
|
|
|
+ })
|
|
|
+ fetchDictionary('PIPE_CAL').then((res) => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.pipeCalOptions = res.result
|
|
|
+ }
|
|
|
+ })
|
|
|
+ fetchDictionary('DEFECT_LEVELS').then((res) => {
|
|
|
+ if (res.code == 1) {
|
|
|
+ this.defectLevelsOptions = res.result
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ * 获取分页数据
|
|
|
+ */
|
|
|
getPages() {
|
|
|
let params = JSON.parse(JSON.stringify(this.pagination))
|
|
|
- let p = {
|
|
|
- // pipeNo:'YYS',
|
|
|
- // flawType:'管网破损',
|
|
|
- // flawLevel:'2级',
|
|
|
- // pipeDiameter:300,
|
|
|
- // drainageTypes:'污水',
|
|
|
- // drainageTypes:'雨水',
|
|
|
- // pipelineLevels:'排水管'
|
|
|
- }
|
|
|
- Object.assign(params, p)
|
|
|
+ Object.assign(params, this.form)
|
|
|
+ if (this.pipelineLevels.length > 0) params['pipelineLevels'] = this.pipelineLevels.join(',')
|
|
|
+ if (this.drainageTypes.length > 0) params['drainageTypes'] = this.drainageTypes.join(',')
|
|
|
getFlawLocation(params).then((res) => {
|
|
|
if (res.code == 1) {
|
|
|
this.tableData = res.result.records
|
|
|
@@ -123,19 +158,22 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ /**
|
|
|
+ * 搜索查询
|
|
|
+ */
|
|
|
+ query() {
|
|
|
+ this.pagination.current = 1
|
|
|
+ this.getPages()
|
|
|
+ },
|
|
|
/**
|
|
|
* 行双击事件
|
|
|
*/
|
|
|
rowdbClick(row) {
|
|
|
- console.log('row::>>>', row)
|
|
|
- // latitude: 29.3967272011
|
|
|
- // latitude2: 29.3733292351
|
|
|
- // longitude: 113.1656743213
|
|
|
- // longitude2: 113.1463724053
|
|
|
-
|
|
|
+ let ety = window.viewer.entities.getById('liner')
|
|
|
+ if (ety) window.viewer.entities.remove(ety)
|
|
|
let entity = new Cesium.Entity({
|
|
|
id: 'liner',
|
|
|
- name: '线',
|
|
|
+ name: '管线',
|
|
|
show: true,
|
|
|
polyline: new Cesium.PolylineGraphics({
|
|
|
// show: true,
|
|
|
@@ -145,17 +183,17 @@ export default {
|
|
|
],
|
|
|
width: 5,
|
|
|
material: Cesium.Color.RED,
|
|
|
- clampToGround:true
|
|
|
- }),
|
|
|
+ clampToGround: true
|
|
|
+ })
|
|
|
})
|
|
|
window.viewer.entities.add(entity)
|
|
|
|
|
|
getFlawDetail({ code: row.code }).then((res) => {
|
|
|
if (res.code == 1) {
|
|
|
- console.log('详情数据:', res)
|
|
|
let data = res.result
|
|
|
const defectPopup2 = Vue.extend(defectPopup)
|
|
|
- let searinfoModule = new defectPopup2({
|
|
|
+ if (this.popup) this.popup.remove()
|
|
|
+ this.popup = new defectPopup2({
|
|
|
data: {
|
|
|
id: 'gu',
|
|
|
position: Cesium.Cartesian3.fromDegrees(row.longitude, row.latitude, 0),
|
|
|
@@ -164,7 +202,9 @@ export default {
|
|
|
store: this.$store
|
|
|
}).$mount()
|
|
|
|
|
|
- window.viewer.camera.flyTo(entity)
|
|
|
+ window.viewer.camera.flyTo({
|
|
|
+ destination: Cesium.Cartesian3.fromDegrees(row.longitude, row.latitude, 100)
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
}
|