Merge branch 'pet' into dev
commit
41d7b44c00
Binary file not shown.
After Width: | Height: | Size: 8.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 8.6 KiB |
|
@ -30,13 +30,12 @@
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
:disabled="isDisabled"
|
:disabled="isDisabled"
|
||||||
v-model="infoForm.incidentDate"
|
v-model="infoForm.incidentDate"
|
||||||
type="date"
|
type="datetime"
|
||||||
placeholder="选择事故发生时间"
|
placeholder="选择事故发生时间"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
format="yyyy-MM-dd HH:mm:ss"
|
/>
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label-width="formLabelWidth" label="直接经济损失" prop="directLoss">
|
<el-form-item :label-width="formLabelWidth" label="直接经济损失(万元)" prop="directLoss">
|
||||||
<el-input v-model="infoForm.directLoss" :disabled="isDisabled" type="number" autocomplete="off"/>
|
<el-input v-model="infoForm.directLoss" :disabled="isDisabled" type="number" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label-width="formLabelWidth" label="受伤人数" prop="injured">
|
<el-form-item :label-width="formLabelWidth" label="受伤人数" prop="injured">
|
||||||
|
@ -90,11 +89,9 @@
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="infoForm.reportDate"
|
v-model="infoForm.reportDate"
|
||||||
:disabled="isDisabled"
|
:disabled="isDisabled"
|
||||||
type="date"
|
type="datetime"
|
||||||
placeholder="请选择报出日期"
|
placeholder="请选择报出日期"
|
||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -162,8 +159,7 @@ export default {
|
||||||
rules: {
|
rules: {
|
||||||
incidentNumber: [{ required: true, message: '事故案号不能为空', trigger: 'blur' }],
|
incidentNumber: [{ required: true, message: '事故案号不能为空', trigger: 'blur' }],
|
||||||
incidentName: [{ required: true, message: '事故名称不能为空', trigger: 'blur' }],
|
incidentName: [{ required: true, message: '事故名称不能为空', trigger: 'blur' }],
|
||||||
HIDDENTYPE: [{ required: true, message: '事故类型不能为空', trigger: 'blur' }],
|
incidentType: [{ required: true, message: '事故类型不能为空', trigger: 'blur' }],
|
||||||
incidentType: [{ required: true, message: '隐患类型不能为空', trigger: 'blur' }],
|
|
||||||
incidentLevel: [{ required: true, message: '事故级别不能为空', trigger: 'blur' }],
|
incidentLevel: [{ required: true, message: '事故级别不能为空', trigger: 'blur' }],
|
||||||
incidentNature: [{ required: true, message: '事故性质不能为空', trigger: 'blur' }],
|
incidentNature: [{ required: true, message: '事故性质不能为空', trigger: 'blur' }],
|
||||||
location: [{ required: true, message: '事故发生地点不能为空', trigger: 'blur' }],
|
location: [{ required: true, message: '事故发生地点不能为空', trigger: 'blur' }],
|
||||||
|
@ -339,6 +335,10 @@ export default {
|
||||||
* 表单确认按钮
|
* 表单确认按钮
|
||||||
*/
|
*/
|
||||||
confirm() {
|
confirm() {
|
||||||
|
this.$refs.form.validate(valid => {
|
||||||
|
if (!valid) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
const params = {
|
const params = {
|
||||||
...this.infoForm,
|
...this.infoForm,
|
||||||
photos: this.infoForm.fileList[0].remotePathName
|
photos: this.infoForm.fileList[0].remotePathName
|
||||||
|
@ -354,6 +354,7 @@ export default {
|
||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.$message.error(this.tableName + '失败')
|
this.$message.error(this.tableName + '失败')
|
||||||
})
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -4,20 +4,22 @@
|
||||||
<el-row :gutter="12">
|
<el-row :gutter="12">
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="事故名称" prop="incidentName">
|
<el-form-item label="事故名称" prop="incidentName">
|
||||||
<el-input v-model="searchForm.incidentName" placeholder="请输入隐患描述" class="filter-item"/>
|
<el-input v-model="searchForm.incidentName" placeholder="请输入事故名称" class="filter-item"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<el-form-item label="发生时间" prop="incidentDates">
|
<el-form-item label="发生时间" prop="incidentDates">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="searchForm.incidentDates"
|
v-model="searchForm.incidentDates"
|
||||||
|
:default-time="['00:00:00', '23:59:59']"
|
||||||
value-format="yyyy-MM-dd HH:mm:ss"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
format="yyyy-MM-dd HH:mm:ss"
|
format="yyyy-MM-dd"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
range-separator="-"
|
range-separator="-"
|
||||||
start-placeholder="开始日期"
|
start-placeholder="开始日期"
|
||||||
end-placeholder="结束日期" />
|
end-placeholder="结束日期"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
|
@ -25,14 +27,14 @@
|
||||||
<el-input v-model="searchForm.location" placeholder="请输入发生地点" />
|
<el-input v-model="searchForm.location" placeholder="请输入发生地点" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="3">
|
||||||
<el-form-item label="事故类型" prop="incidentType">
|
<el-form-item label="事故类型" prop="incidentType">
|
||||||
<el-select v-model="searchForm.incidentType" placeholder="请选择">
|
<el-select v-model="searchForm.incidentType" placeholder="请选择">
|
||||||
<el-option v-for="item in incidentTypes" :key="item.id" :label="item.name" :value="item.id" />
|
<el-option v-for="item in incidentTypes" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="3">
|
||||||
<el-form-item label="事故等级" prop="incidentLevel">
|
<el-form-item label="事故等级" prop="incidentLevel">
|
||||||
<el-select v-model="searchForm.incidentLevel" placeholder="请选择">
|
<el-select v-model="searchForm.incidentLevel" placeholder="请选择">
|
||||||
<el-option v-for="item in incidentLevels" :key="item.id" :label="item.name" :value="item.id" />
|
<el-option v-for="item in incidentLevels" :key="item.id" :label="item.name" :value="item.id" />
|
||||||
|
@ -51,7 +53,6 @@
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-button type="primary" icon="el-icon-circle-plus" @click="goView('', '新增')">新增</el-button>
|
<el-button type="primary" icon="el-icon-circle-plus" @click="goView('', '新增')">新增</el-button>
|
||||||
<el-button icon="el-icon-s-promotion" @click="handleAllExport">全部导出</el-button>
|
<el-button icon="el-icon-s-promotion" @click="handleAllExport">全部导出</el-button>
|
||||||
<el-button icon="el-icon-refresh-left" @click="handleRefresh">刷新</el-button>
|
|
||||||
<el-button type="danger" icon="el-icon-delete-solid" @click="handleBatchDel">批量删除</el-button>
|
<el-button type="danger" icon="el-icon-delete-solid" @click="handleBatchDel">批量删除</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -64,14 +65,19 @@
|
||||||
v-loading="listLoading"
|
v-loading="listLoading"
|
||||||
ref="multipleTable"
|
ref="multipleTable"
|
||||||
:data="varList"
|
:data="varList"
|
||||||
border
|
|
||||||
tooltip-effect="dark"
|
tooltip-effect="dark"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@selection-change="handleSelectionChange">
|
border
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
<el-table-column type="selection" width="55"/>
|
<el-table-column type="selection" width="55"/>
|
||||||
<el-table-column label="事故名称" prop="incidentName"/>
|
<el-table-column label="事故名称" prop="incidentName"/>
|
||||||
<el-table-column label="所属公司" prop="companyName"/>
|
<el-table-column label="所属公司" prop="companyName"/>
|
||||||
<el-table-column label="发生时间" prop="incidentDate"/>
|
<el-table-column label="发生时间" prop="incidentDate">
|
||||||
|
<template v-slot="{row}">
|
||||||
|
{{ formatDate(row.incidentDate,'YYYY-MM-DD HH:mm:ss') }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="发生地点" prop="location"/>
|
<el-table-column label="发生地点" prop="location"/>
|
||||||
<el-table-column label="操作" width="300">
|
<el-table-column label="操作" width="300">
|
||||||
<template v-slot="{row}">
|
<template v-slot="{row}">
|
||||||
|
@ -93,6 +99,7 @@
|
||||||
<script>
|
<script>
|
||||||
import Pagination from '@/components/Pagination'
|
import Pagination from '@/components/Pagination'
|
||||||
import waves from '@/directive/waves'
|
import waves from '@/directive/waves'
|
||||||
|
import formatDate from '@/utils/dateformat'
|
||||||
import { requestFN } from '../../../../utils/request'
|
import { requestFN } from '../../../../utils/request'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -160,7 +167,7 @@ export default {
|
||||||
requestFN(url, { ...this.searchForm }).then((data) => {
|
requestFN(url, { ...this.searchForm }).then((data) => {
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
this.varList = data.varList
|
this.varList = data.varList
|
||||||
this.total = data.page.totalResult
|
this.listQuery.total = data.page.totalResult
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
})
|
})
|
||||||
|
@ -171,13 +178,14 @@ export default {
|
||||||
*/
|
*/
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.searchForm = this.$options.data().searchForm
|
this.searchForm = this.$options.data().searchForm
|
||||||
|
this.searchList()
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 表格行选择器处理
|
* 表格行选择器处理
|
||||||
*/
|
*/
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.multipleSelection.push(val)
|
this.multipleSelection = val
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -264,7 +272,7 @@ export default {
|
||||||
// 获取选中的行数据
|
// 获取选中的行数据
|
||||||
const selectedRows = this.multipleSelection
|
const selectedRows = this.multipleSelection
|
||||||
// 如果没有选中任何行,则提示用户
|
// 如果没有选中任何行,则提示用户
|
||||||
if (selectedRows.length === 0) {
|
if (this.multipleSelection === '' || selectedRows.length === 0) {
|
||||||
this.$message.warning('请选择要删除的行')
|
this.$message.warning('请选择要删除的行')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -275,15 +283,16 @@ export default {
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// 获取所有选中行的 ID
|
// 获取所有选中行的 ID
|
||||||
const ids = selectedRows.map(row => row.id).join(',')
|
let ids = ''
|
||||||
|
selectedRows.forEach(row => { ids += row.id + ',' })
|
||||||
// 发送批量删除请求
|
// 发送批量删除请求
|
||||||
const url = '/accident/delete/' + '' + ids
|
const url = '/accident/delete/' + '' + ids
|
||||||
requestFN(url).then((response) => {
|
requestFN(url).then((response) => {
|
||||||
// 删除成功后的处理
|
// 删除成功后的处理
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功')
|
||||||
|
this.searchList()
|
||||||
// eslint-disable-next-line handle-callback-err
|
// eslint-disable-next-line handle-callback-err
|
||||||
}).catch((error) => {
|
}).catch(() => {
|
||||||
this.$message.error('删除失败')
|
this.$message.error('删除失败')
|
||||||
})
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
@ -292,7 +301,6 @@ export default {
|
||||||
message: '已取消删除'
|
message: '已取消删除'
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.searchList()
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -314,6 +322,10 @@ export default {
|
||||||
).then((data) => {
|
).then((data) => {
|
||||||
this.incidentLevels = JSON.parse(data.zTreeNodes)
|
this.incidentLevels = JSON.parse(data.zTreeNodes)
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
formatDate(date, format) {
|
||||||
|
return formatDate(date, format)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
<div>
|
<div>
|
||||||
<List v-if="activeName === 'List'" ref="List" />
|
<List v-if="activeName === 'List'" ref="List" />
|
||||||
<Add v-if="activeName === 'AddOrEdit'" ref="AddOrEdit" />
|
<Add v-if="activeName === 'AddOrEdit'" ref="AddOrEdit" />
|
||||||
<!-- <Detail v-if="activeName==='Detail'"/>-->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -14,7 +13,6 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
List: List,
|
List: List,
|
||||||
Add: Add
|
Add: Add
|
||||||
// Detail: Detail
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -386,6 +386,18 @@ export default {
|
||||||
checkImg: require('../../assets/map/index/map_on.png'),
|
checkImg: require('../../assets/map/index/map_on.png'),
|
||||||
check: '',
|
check: '',
|
||||||
label: '气象监测'
|
label: '气象监测'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
img: require('../../assets/map/index/sisetu.png'),
|
||||||
|
checkImg: require('../../assets/map/index/sisetu_on.png'),
|
||||||
|
check: false,
|
||||||
|
label: '四色图'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
img: require('../../assets/map/index/bianjie.png'),
|
||||||
|
checkImg: require('../../assets/map/index/bianjie_on.png'),
|
||||||
|
check: false,
|
||||||
|
label: '边界'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
myEntityCollection: {},
|
myEntityCollection: {},
|
||||||
|
@ -1364,7 +1376,7 @@ export default {
|
||||||
this.bottomOptionsKey = Math.random()
|
this.bottomOptionsKey = Math.random()
|
||||||
this.bottomOptionsAnimationComplex = false
|
this.bottomOptionsAnimationComplex = false
|
||||||
this.toCenter({ longitude, latitude, height })
|
this.toCenter({ longitude, latitude, height })
|
||||||
drag.addPolygon(id)
|
// drag.addPolygon(id)
|
||||||
viewer.dataSources.removeAll()
|
viewer.dataSources.removeAll()
|
||||||
this.poinEntity = {}
|
this.poinEntity = {}
|
||||||
this.branchPoint = []
|
this.branchPoint = []
|
||||||
|
@ -1624,6 +1636,26 @@ export default {
|
||||||
this.dialog.corpInfoId = ''
|
this.dialog.corpInfoId = ''
|
||||||
this.dialog.infoname = ''
|
this.dialog.infoname = ''
|
||||||
this.dialog.width = '96%'
|
this.dialog.width = '96%'
|
||||||
|
} else if (index === 7) {
|
||||||
|
if (!this.gangkouActive) {
|
||||||
|
this.$message.warning('请先选择港口')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.rightOptionsList[index].check) {
|
||||||
|
drag.addPolygon(this.gangkouActive, '')
|
||||||
|
} else {
|
||||||
|
drag.removeFourColorDiagram()
|
||||||
|
}
|
||||||
|
} else if (index === 8) {
|
||||||
|
if (!this.gangkouActive) {
|
||||||
|
this.$message.warning('请先选择港口')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.rightOptionsList[index].check) {
|
||||||
|
drag.addPolygon(this.gangkouActive, 'wall')
|
||||||
|
} else {
|
||||||
|
drag.removeWall()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeSceneMode(check) {
|
changeSceneMode(check) {
|
||||||
|
@ -1735,6 +1767,8 @@ export default {
|
||||||
this.poinEntity = {}
|
this.poinEntity = {}
|
||||||
this.toCenter(this.initCenter)
|
this.toCenter(this.initCenter)
|
||||||
this.dragAreaEntity(this.initPoint)
|
this.dragAreaEntity(this.initPoint)
|
||||||
|
this.rightOptionsList[7].check = false
|
||||||
|
this.rightOptionsList[8].check = false
|
||||||
}
|
}
|
||||||
|
|
||||||
this.componentKey = Math.random()
|
this.componentKey = Math.random()
|
||||||
|
|
|
@ -80,6 +80,7 @@ const polygonMap = {
|
||||||
export default class DragEntity {
|
export default class DragEntity {
|
||||||
constructor(val) {
|
constructor(val) {
|
||||||
this.viewer = val.viewer
|
this.viewer = val.viewer
|
||||||
|
this.id = []
|
||||||
}
|
}
|
||||||
|
|
||||||
addEntity(value) {
|
addEntity(value) {
|
||||||
|
@ -243,16 +244,24 @@ export default class DragEntity {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
addPolygon(id) {
|
addPolygon(id, type) {
|
||||||
if (!polygonMap[id]) return
|
if (!polygonMap[id]) return
|
||||||
const loadMapBoxObj = polygonMap[id]()
|
const loadMapBoxObj = polygonMap[id]()
|
||||||
|
if (type === 'wall') {
|
||||||
|
const loadMapBoxItem = loadMapBoxObj['wallList']
|
||||||
|
for (let i = 0; i < loadMapBoxItem.length; i++) {
|
||||||
|
this.addWall(this.formatPolygon(loadMapBoxItem[i]))
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
// 循环获取所有颜色
|
// 循环获取所有颜色
|
||||||
for (const loadMapBoxKey in loadMapBoxObj) {
|
for (const loadMapBoxKey in loadMapBoxObj) {
|
||||||
// 获取每种颜色
|
// 获取每种颜色
|
||||||
const loadMapBoxItem = loadMapBoxObj[loadMapBoxKey]
|
const loadMapBoxItem = loadMapBoxObj[loadMapBoxKey]
|
||||||
|
if (loadMapBoxKey === 'wallList') continue
|
||||||
// 循环每种颜色里每一块创建多边形
|
// 循环每种颜色里每一块创建多边形
|
||||||
for (let i = 0; i < loadMapBoxItem.length; i++) {
|
for (let i = 0; i < loadMapBoxItem.length; i++) {
|
||||||
this.formatPolygon(loadMapBoxItem[i])
|
this.addFourColorDiagram(this.formatPolygon(loadMapBoxItem[i]), loadMapBoxItem[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -263,21 +272,17 @@ export default class DragEntity {
|
||||||
latitudeAndLongitude.push(item.x)
|
latitudeAndLongitude.push(item.x)
|
||||||
latitudeAndLongitude.push(item.y)
|
latitudeAndLongitude.push(item.y)
|
||||||
})
|
})
|
||||||
if (item.type === 'wall') {
|
return latitudeAndLongitude
|
||||||
const target = new Cesium.Entity({
|
|
||||||
wall: {
|
|
||||||
positions: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
|
|
||||||
material: new Cesium.PolylineTrailLinkMaterialProperty({
|
|
||||||
color: Cesium.Color.fromBytes(201, 118, 243).withAlpha(0.5),
|
|
||||||
duration: 2000
|
|
||||||
}, this.viewer),
|
|
||||||
maximumHeights: new Array(latitudeAndLongitude.length).fill(40),
|
|
||||||
minimumHeights: new Array(latitudeAndLongitude.length).fill(0)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addFourColorDiagram(latitudeAndLongitude, item) {
|
||||||
|
const id = Cesium.createGuid()
|
||||||
|
this.id.push({
|
||||||
|
id,
|
||||||
|
key: 'FourColorDiagram'
|
||||||
})
|
})
|
||||||
this.viewer.entities.add(target)
|
|
||||||
} else {
|
|
||||||
const target = new Cesium.Entity({
|
const target = new Cesium.Entity({
|
||||||
|
id,
|
||||||
polygon: {
|
polygon: {
|
||||||
hierarchy: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
|
hierarchy: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
|
||||||
extrudedHeight: item.stretchHeight,
|
extrudedHeight: item.stretchHeight,
|
||||||
|
@ -291,6 +296,45 @@ export default class DragEntity {
|
||||||
})
|
})
|
||||||
this.viewer.entities.add(target)
|
this.viewer.entities.add(target)
|
||||||
}
|
}
|
||||||
|
addWall(latitudeAndLongitude) {
|
||||||
|
const id = Cesium.createGuid()
|
||||||
|
this.id.push({
|
||||||
|
id,
|
||||||
|
key: 'Wall'
|
||||||
|
})
|
||||||
|
const target = new Cesium.Entity({
|
||||||
|
id,
|
||||||
|
wall: {
|
||||||
|
positions: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
|
||||||
|
material: new Cesium.PolylineTrailLinkMaterialProperty({
|
||||||
|
color: Cesium.Color.fromBytes(201, 118, 243).withAlpha(0.5),
|
||||||
|
duration: 2000
|
||||||
|
}, this.viewer),
|
||||||
|
maximumHeights: new Array(latitudeAndLongitude.length).fill(40),
|
||||||
|
minimumHeights: new Array(latitudeAndLongitude.length).fill(0)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.viewer.entities.add(target)
|
||||||
|
}
|
||||||
|
|
||||||
|
removeFourColorDiagram() {
|
||||||
|
for (let i = 0; i < this.id.length; i++) {
|
||||||
|
if (this.id[i].key === 'FourColorDiagram') {
|
||||||
|
this.viewer.entities.removeById(this.id[i].id)
|
||||||
|
this.id.splice(i, 1)
|
||||||
|
i--
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
removeWall() {
|
||||||
|
for (let i = 0; i < this.id.length; i++) {
|
||||||
|
if (this.id[i].key === 'Wall') {
|
||||||
|
this.viewer.entities.removeById(this.id[i].id)
|
||||||
|
this.id.splice(i, 1)
|
||||||
|
i--
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue