|
@@ -2,43 +2,65 @@
|
|
|
<!-- 爆管分析 -->
|
|
|
<div class="panel-container">
|
|
|
<div class="op-box">
|
|
|
- <el-button type="primary" size="small" style="width:100%" @click="mapSelect" :loading="loading">选择爆管管线</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ @click="mapSelect"
|
|
|
+ :loading="loading"
|
|
|
+ >选择爆管管线</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
|
|
|
<!-- 分析结果 -->
|
|
|
<div class="result-box">
|
|
|
<div class="item-head">
|
|
|
爆管管线
|
|
|
- <el-tooltip class="item" effect="dark" content="选择一根管线进行分析" placement="top">
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ content="选择一根管线进行分析"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
<span class="el-icon-info"></span>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
<div class="result-description">
|
|
|
- <div class="result-title" v-cloak>{{burstInfo.description}}</div>
|
|
|
+ <div class="result-title" v-cloak>{{ burstInfo.description }}</div>
|
|
|
<!-- <div v-cloak style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">{{burstInfo.addr}}</div> -->
|
|
|
- <div v-cloak>{{burstInfo.lonlat}}</div>
|
|
|
+ <div v-cloak>{{ burstInfo.lonlat }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="op-box">
|
|
|
- <el-button type="primary" size="small" style="width:100%" @click="executeBurst" :loading="doLoading">开始分析</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ @click="executeBurst"
|
|
|
+ :loading="doLoading"
|
|
|
+ >开始分析</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
<div class="result-total">
|
|
|
<div class="panel-item">
|
|
|
<div>必关阀门</div>
|
|
|
<div>
|
|
|
- <span>{{burstInfo.valveArray.length}}</span>个
|
|
|
+ <span>{{ burstInfo.valveArray.length }}</span
|
|
|
+ >个
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="panel-item">
|
|
|
<div>受影响管线</div>
|
|
|
<div>
|
|
|
- <span>{{burstInfo.pipeLength}}</span>m
|
|
|
+ <span>{{ burstInfo.pipeLength }}</span
|
|
|
+ >m
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="panel-item">
|
|
|
<div>受影响设施</div>
|
|
|
<div>
|
|
|
- <span>{{burstInfo.facilities.length}}</span>个
|
|
|
+ <span>{{ burstInfo.facilities.length }}</span
|
|
|
+ >个
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -46,18 +68,62 @@
|
|
|
<div class="table-chart">
|
|
|
<div class="item-head">
|
|
|
受影响阀门(
|
|
|
- <span>{{burstInfo.valveArray.length}}</span>个)
|
|
|
- <el-button type="primary" size="mini" style="margin-left:10px" @click="reExecuteBurst">二次分析</el-button>
|
|
|
- <el-tooltip class="item" effect="dark" content="可设置失效阀门,进行二次分析" placement="top">
|
|
|
+ <span>{{ burstInfo.valveArray.length }}</span
|
|
|
+ >个)
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="mini"
|
|
|
+ style="margin-left: 10px"
|
|
|
+ @click="reExecuteBurst"
|
|
|
+ >二次分析</el-button
|
|
|
+ >
|
|
|
+ <el-tooltip
|
|
|
+ class="item"
|
|
|
+ effect="dark"
|
|
|
+ content="可设置失效阀门,进行二次分析"
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
<span class="el-icon-info"></span>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
<div class="table-container">
|
|
|
- <el-table ref="valvesTable" :data="burstInfo.valveArray" stripe max-height="200" @row-click="tableRowLook" :header-cell-style="{fontSize: '14px', fontWeight:'600',background:'#eaf1fd',color:'#909399'}" style="width: 100%">
|
|
|
- <el-table-column type="selection" align="center" width="50"></el-table-column>
|
|
|
- <el-table-column prop="SID" label="编号" align="center" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="ADJUNCT" label="附属物" align="center" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="SPEC" label="规格" align="center" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table
|
|
|
+ ref="valvesTable"
|
|
|
+ :data="burstInfo.valveArray"
|
|
|
+ stripe
|
|
|
+ max-height="200"
|
|
|
+ @row-click="tableRowLook"
|
|
|
+ :header-cell-style="{
|
|
|
+ fontSize: '14px',
|
|
|
+ fontWeight: '600',
|
|
|
+ background: '#eaf1fd',
|
|
|
+ color: '#909399',
|
|
|
+ }"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ type="selection"
|
|
|
+ align="center"
|
|
|
+ width="50"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="SID"
|
|
|
+ label="编号"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="ADJUNCT"
|
|
|
+ label="附属物"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="SPEC"
|
|
|
+ label="规格"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
<!-- <el-table-column label="操作" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button type="text" @click="tableRowLook(scope)">查看</el-button>
|
|
@@ -69,21 +135,56 @@
|
|
|
<div class="table-chart">
|
|
|
<div class="item-head">
|
|
|
所有结果
|
|
|
- <el-button type="text" size="middle" style="margin-left:10px" @click="viewDetails">查看详情</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="middle"
|
|
|
+ style="margin-left: 10px"
|
|
|
+ @click="viewDetails"
|
|
|
+ >查看详情</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
<div class="table-container">
|
|
|
- <el-table :data="totalResultTable" stripe max-height="200" :header-cell-style="{fontSize: '14px', fontWeight:'600',background:'#eaf1fd',color:'#909399'}" style="width: 100%">
|
|
|
+ <el-table
|
|
|
+ :data="totalResultTable"
|
|
|
+ stripe
|
|
|
+ max-height="200"
|
|
|
+ :header-cell-style="{
|
|
|
+ fontSize: '14px',
|
|
|
+ fontWeight: '600',
|
|
|
+ background: '#eaf1fd',
|
|
|
+ color: '#909399',
|
|
|
+ }"
|
|
|
+ style="width: 100%"
|
|
|
+ >
|
|
|
<el-table-column label="序号" align="center">
|
|
|
<template slot-scope="scope">
|
|
|
- <span>{{scope.$index+1}}</span>
|
|
|
+ <span>{{ scope.$index + 1 }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="name" label="名称" align="center" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="num" label="数量" align="center" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="name"
|
|
|
+ label="名称"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="num"
|
|
|
+ label="数量"
|
|
|
+ align="center"
|
|
|
+ show-overflow-tooltip
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column align="center" label="操作">
|
|
|
- <template slot-scope="{row}">
|
|
|
- <download-excel style="display: inline-block;" :data="row.data" :fields="row.fields" type="xls" :name="getFileName(row.name)">
|
|
|
- <el-button type="text" @click="beforeExport(row)">导出</el-button>
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <download-excel
|
|
|
+ style="display: inline-block"
|
|
|
+ :data="row.data"
|
|
|
+ :fields="row.fields"
|
|
|
+ type="xls"
|
|
|
+ :name="getFileName(row.name)"
|
|
|
+ >
|
|
|
+ <el-button type="text" @click="beforeExport(row)"
|
|
|
+ >导出</el-button
|
|
|
+ >
|
|
|
</download-excel>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -91,7 +192,13 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="op-box">
|
|
|
- <el-button type="danger" size="small" style="width:100%" @click="clearBurstResult">清除结果</el-button>
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ size="small"
|
|
|
+ style="width: 100%"
|
|
|
+ @click="clearBurstResult"
|
|
|
+ >清除结果</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -128,9 +235,9 @@ export default {
|
|
|
valveArray: [],
|
|
|
pipeArray: [],
|
|
|
pipeLength: 0,
|
|
|
- facilities: []
|
|
|
+ facilities: [],
|
|
|
},
|
|
|
- totalResultTable: []
|
|
|
+ totalResultTable: [],
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -145,7 +252,7 @@ export default {
|
|
|
// 获取点击查询结果
|
|
|
resultInfo() {
|
|
|
return this.data.that.queryByClick.resultInfo
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
// 监听面板是否被改变
|
|
@@ -180,7 +287,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.pipeDataSet = mapConfig.iServerUrl.netWorkConfig // 获取所有管道爆管分析配置
|
|
@@ -190,19 +297,19 @@ export default {
|
|
|
style: new Style({
|
|
|
stroke: new Stroke({
|
|
|
width: 5,
|
|
|
- color: '#F40'
|
|
|
+ color: '#F40',
|
|
|
}),
|
|
|
image: new Circle({
|
|
|
radius: 7,
|
|
|
stroke: new Stroke({
|
|
|
width: 3,
|
|
|
- color: '#ffce44'
|
|
|
+ color: '#ffce44',
|
|
|
}),
|
|
|
fill: new Fill({
|
|
|
- color: '#F40'
|
|
|
- })
|
|
|
- })
|
|
|
- })
|
|
|
+ color: '#F40',
|
|
|
+ }),
|
|
|
+ }),
|
|
|
+ }),
|
|
|
})
|
|
|
this.data.that.map.addLayer(this.vectorLayer)
|
|
|
},
|
|
@@ -231,7 +338,7 @@ export default {
|
|
|
this.$store.dispatch('gis/writeLog', {
|
|
|
operateModule: '爆管分析',
|
|
|
operateContent: `导出${row.name},共导出数据${row.data.length}条`,
|
|
|
- operateParams: ''
|
|
|
+ operateParams: '',
|
|
|
})
|
|
|
},
|
|
|
/**
|
|
@@ -243,18 +350,18 @@ export default {
|
|
|
/**先查询阀门的ID */
|
|
|
let queryParam = new SuperMap.FilterParameter({
|
|
|
name: this.selectPipeConfig.netWorkNodeLayer, // 网络数据集图层名称
|
|
|
- attributeFilter: "ADJUNCT LIKE '%阀%'"
|
|
|
+ attributeFilter: "ADJUNCT LIKE '%阀%'",
|
|
|
})
|
|
|
let queryBySQLParams = new SuperMap.QueryBySQLParameters({
|
|
|
- queryParams: [queryParam]
|
|
|
+ queryParams: [queryParam],
|
|
|
})
|
|
|
let queryBySQLService = new SuperMap.QueryBySQLService(
|
|
|
this.selectPipeConfig.mapUrl,
|
|
|
{
|
|
|
eventListeners: {
|
|
|
processCompleted: this.queryValveCompleted,
|
|
|
- processFailed: this.processFailed
|
|
|
- }
|
|
|
+ processFailed: this.processFailed,
|
|
|
+ },
|
|
|
}
|
|
|
)
|
|
|
queryBySQLService.processAsync(queryBySQLParams)
|
|
@@ -272,7 +379,7 @@ export default {
|
|
|
// console.log("阀门查询结果", res)
|
|
|
let valves = res.result.recordsets[0].features.features
|
|
|
let valveIDs = []
|
|
|
- valves.forEach(item => {
|
|
|
+ valves.forEach((item) => {
|
|
|
valveIDs.push(item.properties.SmID)
|
|
|
})
|
|
|
this.valveIDs = valveIDs // 保存阀门数据
|
|
@@ -285,12 +392,12 @@ export default {
|
|
|
reExecuteBurst() {
|
|
|
this.doLoading = true // 执行状态
|
|
|
let currentSelect = this.$refs.valvesTable.selection
|
|
|
- let IDs = currentSelect.map(item => {
|
|
|
+ let IDs = currentSelect.map((item) => {
|
|
|
return item.SmID
|
|
|
})
|
|
|
let differenceIDs = this.tempValveIDs
|
|
|
.concat(IDs)
|
|
|
- .filter(v => this.valveIDs.includes(v) && !IDs.includes(v)) // 排查失效阀门
|
|
|
+ .filter((v) => this.valveIDs.includes(v) && !IDs.includes(v)) // 排查失效阀门
|
|
|
this.tempValveIDs = differenceIDs
|
|
|
// 再次执行分析
|
|
|
this.BurstPipelineAnalyst(differenceIDs)
|
|
@@ -300,7 +407,7 @@ export default {
|
|
|
*/
|
|
|
getNetWorkConfig(selectInfo) {
|
|
|
let netWorkConfig = null
|
|
|
- this.pipeDataSet.forEach(item => {
|
|
|
+ this.pipeDataSet.forEach((item) => {
|
|
|
if (
|
|
|
item.name == selectInfo.feature.dataType.label &&
|
|
|
item.burstAnalysis
|
|
@@ -331,13 +438,13 @@ export default {
|
|
|
showBurstPoint() {
|
|
|
this.vectorLayer.getSource().clear() // 清空显示
|
|
|
let burstPoint = new Feature({
|
|
|
- geometry: this.burstPoint
|
|
|
+ geometry: this.burstPoint,
|
|
|
})
|
|
|
burstPoint.setStyle(
|
|
|
new Style({
|
|
|
image: new Icon({
|
|
|
- src: require('@/assets/images/burst.png')
|
|
|
- })
|
|
|
+ src: require('@/assets/images/burst.png'),
|
|
|
+ }),
|
|
|
})
|
|
|
)
|
|
|
this.data.that.popupWindowClose() // 清除地图视图点击选择的要素,关闭弹窗
|
|
@@ -364,18 +471,19 @@ export default {
|
|
|
sourceNodeIDs: valvesArray, //设施点ID数组
|
|
|
edgeID: this.burstSegmentID, //爆管弧段ID,既查询弧段内容
|
|
|
nodeID: null, //爆管结点ID (注:edgeID 与 nodeID 不能同时使用)
|
|
|
- isUncertainDirectionValid: true //指定不确定流向是否有效
|
|
|
+ isUncertainDirectionValid: true, //指定不确定流向是否有效
|
|
|
})
|
|
|
|
|
|
- var burstPipelineAnalystService = new SuperMap.BurstPipelineAnalystService(
|
|
|
- this.selectPipeConfig.netWorkServiceurl,
|
|
|
- {
|
|
|
- eventListeners: {
|
|
|
- processCompleted: this.BurstPipelineAnalyst_processCompleted,
|
|
|
- processFailed: this.processFailed
|
|
|
+ var burstPipelineAnalystService =
|
|
|
+ new SuperMap.BurstPipelineAnalystService(
|
|
|
+ this.selectPipeConfig.netWorkServiceurl,
|
|
|
+ {
|
|
|
+ eventListeners: {
|
|
|
+ processCompleted: this.BurstPipelineAnalyst_processCompleted,
|
|
|
+ processFailed: this.processFailed,
|
|
|
+ },
|
|
|
}
|
|
|
- }
|
|
|
- )
|
|
|
+ )
|
|
|
burstPipelineAnalystService.processAsync(parameter)
|
|
|
},
|
|
|
/**
|
|
@@ -399,7 +507,7 @@ export default {
|
|
|
queryBySQL(criticalNodes, edgeID) {
|
|
|
let queryParam = new SuperMap.FilterParameter({
|
|
|
name: this.selectPipeConfig.netWorkNodeLayer, // 网络数据集结点图层名称
|
|
|
- attributeFilter: 'SmNodeID in (' + criticalNodes + ')'
|
|
|
+ attributeFilter: 'SmNodeID in (' + criticalNodes + ')',
|
|
|
})
|
|
|
let str = '('
|
|
|
for (var i = 0; i < edgeID.length; i++) {
|
|
@@ -408,10 +516,10 @@ export default {
|
|
|
}
|
|
|
let queryParam2 = new SuperMap.FilterParameter({
|
|
|
name: this.selectPipeConfig.netWorkLayerName, // 网络数据集图层名称
|
|
|
- attributeFilter: 'SMID in ' + str
|
|
|
+ attributeFilter: 'SMID in ' + str,
|
|
|
})
|
|
|
let queryBySQLParams = new SuperMap.QueryBySQLParameters({
|
|
|
- queryParams: [queryParam, queryParam2]
|
|
|
+ queryParams: [queryParam, queryParam2],
|
|
|
})
|
|
|
|
|
|
let queryBySQLService = new SuperMap.QueryBySQLService(
|
|
@@ -419,8 +527,8 @@ export default {
|
|
|
{
|
|
|
eventListeners: {
|
|
|
processCompleted: this.processCompleted,
|
|
|
- processFailed: this.processFailed
|
|
|
- }
|
|
|
+ processFailed: this.processFailed,
|
|
|
+ },
|
|
|
}
|
|
|
)
|
|
|
queryBySQLService.processAsync(queryBySQLParams)
|
|
@@ -430,7 +538,7 @@ export default {
|
|
|
*/
|
|
|
getFileName(layerName) {
|
|
|
let securities = this.$store.state.permission.sysDics.serviceLevel
|
|
|
- let securityClass = securities.find(item => {
|
|
|
+ let securityClass = securities.find((item) => {
|
|
|
return (
|
|
|
item.code.toString() == this.selectPipeConfig.securityClass.toString()
|
|
|
)
|
|
@@ -447,19 +555,42 @@ export default {
|
|
|
this.burstInfo.valveArray = []
|
|
|
this.burstInfo.pipeArray = []
|
|
|
this.totalResultTable = []
|
|
|
+ let mapLayers = this.$store.state.permission.mapLayers
|
|
|
|
|
|
- recordsets.forEach(item => {
|
|
|
+ recordsets.forEach((item) => {
|
|
|
let features = item.features.features
|
|
|
+ const objLayer = mapLayers.find(
|
|
|
+ (layer) => layer.datasetsNodeLayer === item.datasetName || layer.datasetsNetLayer === item.datasetName
|
|
|
+ )
|
|
|
+ let securityClass = ''
|
|
|
+ if (objLayer) {
|
|
|
+ switch (parseInt(objLayer.securityClass)) {
|
|
|
+ case 1:
|
|
|
+ securityClass = '公开'
|
|
|
+ break
|
|
|
+ case 2:
|
|
|
+ securityClass = '内部'
|
|
|
+ break
|
|
|
+ case 3:
|
|
|
+ securityClass = '秘密'
|
|
|
+ break
|
|
|
+ case 4:
|
|
|
+ securityClass = '机密'
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
let pipeLength = new Number()
|
|
|
if (features.length > 0)
|
|
|
if (features[0].geometry.type == 'Point') {
|
|
|
- features.forEach(pointFeature => {
|
|
|
+ features.forEach((pointFeature) => {
|
|
|
pointFeature.properties['geometry'] = pointFeature.geometry
|
|
|
- this.burstInfo.valveArray.push(pointFeature.properties)
|
|
|
+ let properties = pointFeature.properties
|
|
|
+ properties['SECURITY'] = securityClass
|
|
|
+ this.burstInfo.valveArray.push(properties)
|
|
|
// 显示设施
|
|
|
this.vectorLayer.getSource().addFeature(
|
|
|
new Feature({
|
|
|
- geometry: new GeoJSON().readGeometry(pointFeature.geometry)
|
|
|
+ geometry: new GeoJSON().readGeometry(pointFeature.geometry),
|
|
|
})
|
|
|
)
|
|
|
})
|
|
@@ -467,11 +598,12 @@ export default {
|
|
|
name: '受影响阀门',
|
|
|
num: this.burstInfo.valveArray.length + '个',
|
|
|
data: this.burstInfo.valveArray,
|
|
|
- fields: this.getFields('point')
|
|
|
+ fields: this.getFields('point'),
|
|
|
})
|
|
|
} else {
|
|
|
- features.forEach(LineFeature => {
|
|
|
+ features.forEach((LineFeature) => {
|
|
|
LineFeature.properties['geometry'] = LineFeature.geometry
|
|
|
+ LineFeature.properties['SECURITY'] = securityClass
|
|
|
this.burstInfo.pipeArray.push(LineFeature.properties)
|
|
|
pipeLength += parseFloat(LineFeature.properties.SmLength)
|
|
|
let edgeGeometry = new GeoJSON().readGeometry(
|
|
@@ -480,7 +612,7 @@ export default {
|
|
|
// 显示管道
|
|
|
this.vectorLayer.getSource().addFeature(
|
|
|
new Feature({
|
|
|
- geometry: edgeGeometry
|
|
|
+ geometry: edgeGeometry,
|
|
|
})
|
|
|
)
|
|
|
})
|
|
@@ -494,7 +626,7 @@ export default {
|
|
|
this.burstInfo.pipeLength +
|
|
|
'm',
|
|
|
data: this.burstInfo.pipeArray,
|
|
|
- fields: this.getFields('line')
|
|
|
+ fields: this.getFields('line'),
|
|
|
})
|
|
|
// 查询受影响设施
|
|
|
this.queryPoint(features)
|
|
@@ -503,7 +635,7 @@ export default {
|
|
|
this.$store.dispatch('gis/writeLog', {
|
|
|
operateModule: '爆管分析',
|
|
|
operateContent: `对${this.burstInfo.burstPipe}进行爆管分析;`,
|
|
|
- operateParams: JSON.stringify({ lonLat: this.burstInfo.lonlat })
|
|
|
+ operateParams: JSON.stringify({ lonLat: this.burstInfo.lonlat }),
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -525,34 +657,53 @@ export default {
|
|
|
toIndex: -1,
|
|
|
maxFeatures: 10000000,
|
|
|
datasetNames: [this.selectPipeConfig.facilitiesDatasetName],
|
|
|
- queryParameter: { attributeFilter: 'SID in ' + str }
|
|
|
+ queryParameter: { attributeFilter: 'SID in ' + str },
|
|
|
})
|
|
|
+ let securityClass = ''
|
|
|
+ switch (parseInt(this.selectPipeConfig.securityClass)) {
|
|
|
+ case 1:
|
|
|
+ securityClass = '公开'
|
|
|
+ break
|
|
|
+ case 2:
|
|
|
+ securityClass = '内部'
|
|
|
+ break
|
|
|
+ case 3:
|
|
|
+ securityClass = '秘密'
|
|
|
+ break
|
|
|
+ case 4:
|
|
|
+ securityClass = '机密'
|
|
|
+ break
|
|
|
+ }
|
|
|
let url = mapConfig.iServerUrl.pipelineDataServer.url
|
|
|
//向服务器发送请求,并对返回的结果进行处理
|
|
|
- new FeatureService(url).getFeaturesBySQL(sqlQueryParam, serviceResult => {
|
|
|
- if (serviceResult.type == 'processFailed') {
|
|
|
- this.$message.error(
|
|
|
- `查询受影响设施失败,${serviceResult.error.errorMsg}!`
|
|
|
- )
|
|
|
+ new FeatureService(url).getFeaturesBySQL(
|
|
|
+ sqlQueryParam,
|
|
|
+ (serviceResult) => {
|
|
|
+ if (serviceResult.type == 'processFailed') {
|
|
|
+ this.$message.error(
|
|
|
+ `查询受影响设施失败,${serviceResult.error.errorMsg}!`
|
|
|
+ )
|
|
|
+ this.doLoading = false // 关闭执行状态
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let features = serviceResult.result.features.features
|
|
|
+ if (features.length == 0) return
|
|
|
+ else {
|
|
|
+ features.forEach((pointFeature) => {
|
|
|
+ pointFeature.properties['geometry'] = pointFeature.geometry
|
|
|
+ pointFeature.properties['SECURITY'] = securityClass
|
|
|
+ this.burstInfo.facilities.push(pointFeature.properties)
|
|
|
+ })
|
|
|
+ this.totalResultTable.push({
|
|
|
+ name: '受影响设施',
|
|
|
+ num: this.burstInfo.facilities.length + '个',
|
|
|
+ data: this.burstInfo.facilities,
|
|
|
+ fields: this.getFields('point'),
|
|
|
+ })
|
|
|
+ }
|
|
|
this.doLoading = false // 关闭执行状态
|
|
|
- return
|
|
|
- }
|
|
|
- let features = serviceResult.result.features.features
|
|
|
- if (features.length == 0) return
|
|
|
- else {
|
|
|
- features.forEach(pointFeature => {
|
|
|
- pointFeature.properties['geometry'] = pointFeature.geometry
|
|
|
- this.burstInfo.facilities.push(pointFeature.properties)
|
|
|
- })
|
|
|
- this.totalResultTable.push({
|
|
|
- name: '受影响设施',
|
|
|
- num: this.burstInfo.facilities.length + '个',
|
|
|
- data: this.burstInfo.facilities,
|
|
|
- fields: this.getFields('point')
|
|
|
- })
|
|
|
}
|
|
|
- this.doLoading = false // 关闭执行状态
|
|
|
- })
|
|
|
+ )
|
|
|
},
|
|
|
/**
|
|
|
* 获取字段,Excel导出时使用
|
|
@@ -560,11 +711,11 @@ export default {
|
|
|
getFields(type) {
|
|
|
let fields = {}
|
|
|
if (type == 'line')
|
|
|
- this.$store.state.common.PipeLineFields.forEach(item => {
|
|
|
+ this.$store.state.common.PipeLineFields.forEach((item) => {
|
|
|
fields[item.pipelineVal] = item.pipelineKey
|
|
|
})
|
|
|
else {
|
|
|
- this.$store.state.common.PipePointFields.forEach(item => {
|
|
|
+ this.$store.state.common.PipePointFields.forEach((item) => {
|
|
|
fields[item.pipelineVal] = item.pipelineKey
|
|
|
})
|
|
|
}
|
|
@@ -580,11 +731,11 @@ export default {
|
|
|
let infoObject = {
|
|
|
properties: row,
|
|
|
dataType: { label: '' },
|
|
|
- geometry: row.geometry
|
|
|
+ geometry: row.geometry,
|
|
|
}
|
|
|
|
|
|
let feature = new Feature({
|
|
|
- geometry: geometry
|
|
|
+ geometry: geometry,
|
|
|
})
|
|
|
if (geometry.getType() == 'LineString') {
|
|
|
popupPosition = getCenter(geometry.getExtent())
|
|
@@ -616,7 +767,7 @@ export default {
|
|
|
valveArray: [],
|
|
|
pipeArray: [],
|
|
|
pipeLength: 0,
|
|
|
- facilities: []
|
|
|
+ facilities: [],
|
|
|
}
|
|
|
this.burstSegmentID = []
|
|
|
this.selectPipeConfig = {}
|
|
@@ -648,16 +799,20 @@ export default {
|
|
|
pathId: pid,
|
|
|
widgetid: 'HalfPanel',
|
|
|
type: 'gis',
|
|
|
- component: () => Promise.resolve(require(`@/views/kxcSystem/pipelineSystem/specialtyAnalysis/burstAnalysis/${pid}/widget`).default),
|
|
|
+ component: () =>
|
|
|
+ Promise.resolve(
|
|
|
+ require(`@/views/kxcSystem/pipelineSystem/specialtyAnalysis/burstAnalysis/${pid}/widget`)
|
|
|
+ .default
|
|
|
+ ),
|
|
|
label: this.totalResultTable[i].name,
|
|
|
meta: { title: this.totalResultTable[i].name },
|
|
|
- param: { dataType: dataType, features: features }
|
|
|
+ param: { dataType: dataType, features: features },
|
|
|
}
|
|
|
this.$store.dispatch('map/delHalfPanels', pid)
|
|
|
this.$store.dispatch('map/changeMethod', panel)
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|