Merge remote-tracking branch 'origin/pet' into pet

hyx_2024-9-29_tongbu
shanao 2024-09-13 17:52:42 +08:00
commit 364bbe40cd
8 changed files with 10109 additions and 9821 deletions

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

View File

@ -154,11 +154,13 @@
<span>({{ row.VIDEO_ONLINE_COUNT }})</span> <span>({{ row.VIDEO_ONLINE_COUNT }})</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="400"> <el-table-column label="操作" align="center" width="500">
<template slot-scope="{row}"> <template slot-scope="{row}">
<el-button type="success" icon="el-icon-view" size="mini" @click="goDetail(row.OUTSOURCED_ID)"></el-button> <el-button type="success" icon="el-icon-view" size="mini" @click="goDetail(row.OUTSOURCED_ID)"></el-button>
<el-button v-if="row.CREATOR==userInfoUserId && row.STATE==-1" type="success" icon="el-icon-view" size="mini" @click="handleState(row.OUTSOURCED_ID)"></el-button> <el-button v-if="row.CREATOR==userInfoUserId && row.STATE==-1" type="success" icon="el-icon-view" size="mini" @click="handleState(row.OUTSOURCED_ID)"></el-button>
<el-button v-if="row.CREATOR==userInfoUserId && row.STATE==-2" type="success" icon="el-icon-view" size="mini" @click="handleJie(row.OUTSOURCED_ID)"></el-button> <el-button v-if="row.CREATOR==userInfoUserId && row.STATE==-2" type="success" icon="el-icon-view" size="mini" @click="handleJie(row.OUTSOURCED_ID)"></el-button>
<el-button v-if="1 == row.STATE" type="danger" icon="el-icon-delete" size="mini" @click="handlePreForceDelete(row)"></el-button>
<el-button v-if="2 == row.STATE" type="success" icon="el-icon-view" size="mini" @click="handlePreForceDelete(row)"></el-button>
<el-button v-show="edit" v-if="0 === row.IS_CORP_TYPE" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.OUTSOURCED_ID)"></el-button> <el-button v-show="edit" v-if="0 === row.IS_CORP_TYPE" type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.OUTSOURCED_ID)"></el-button>
<el-button v-show="del" v-if="0 === row.IS_CORP_TYPE" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.OUTSOURCED_ID)"></el-button> <el-button v-show="del" v-if="0 === row.IS_CORP_TYPE" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.OUTSOURCED_ID)"></el-button>
</template> </template>
@ -183,6 +185,152 @@
<el-button v-print="'#printTest'" type="primary"> </el-button> <el-button v-print="'#printTest'" type="primary"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :visible.sync="dialogPreDeleteShow" title="强制结束" width="80%" class="top-dialog">
<p>待确认的安全环保检查</p>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="inspectList"
:row-key="getRowKeyInsp"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="INSPECTION_PLACE" label="检查场所" show-overflow-tooltip />
<el-table-column prop="INSPECTION_TYPE_NAME" label="检查类型" show-overflow-tooltip />
<el-table-column prop="INSPECTION_USERS" label="检查人" show-overflow-tooltip />
<el-table-column prop="PERSON_NAME" label="被检查人" show-overflow-tooltip />
<el-table-column label="检查时间" show-overflow-tooltip>
<template slot-scope="{row}">
{{ row.INSPECTION_TIME_START }}-{{ row.INSPECTION_TIME_END }}
</template>
</el-table-column>
<el-table-column prop="HIDDEN_COUNT" label="检查隐患数" />
</el-table>
<p>待整改隐患</p>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="zgList"
:row-key="getRowKeyCf"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="HIDDENDESCR" label="隐患描述" show-overflow-tooltip />
<el-table-column label="隐患发现人" show-overflow-tooltip>
<template slot-scope="{row}">
{{ row.CREATOR_NAME || row.CREATOR_NAMES }}
</template>
</el-table-column>
<el-table-column prop="CREATTIME" label="隐患发现时间" show-overflow-tooltip />
<el-table-column prop="RECTIFICATIONOR_NAME" label="隐患整改人" show-overflow-tooltip />
<el-table-column prop="CREATOR_NAME" label="隐患验收人" show-overflow-tooltip />
<el-table-column label="是否处罚">
<template slot-scope="{row}">
{{ row.ISPUNISH === "1" ? "是" : row.ISPUNISH === "2" ?"否":"处罚人未处理" }}
</template>
</el-table-column>
</el-table>
<p>待验收隐患</p>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="ysList"
:row-key="getRowKeyCf"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="HIDDENDESCR" label="隐患描述" show-overflow-tooltip />
<el-table-column prop="CREATTIME" label="隐患发现时间" show-overflow-tooltip />
<el-table-column prop="RECTIFICATIONOR_NAME" label="隐患整改人" show-overflow-tooltip />
<el-table-column prop="RECTIFICATIONTIME" label="整改时间" show-overflow-tooltip />
<el-table-column prop="CREATOR_NAME" label="隐患验收人" show-overflow-tooltip />
<el-table-column label="是否处罚">
<template slot-scope="{row}">
{{ row.ISPUNISH === "1" ? "是" : row.ISPUNISH === "2" ?"否":"处罚人未处理" }}
</template>
</el-table-column>
</el-table>
<p>待处罚</p>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="cfList"
:row-key="getRowKeyCf"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="CREATOR_NAME" label="下发人" show-overflow-tooltip />
<el-table-column label="是否处罚">
<template slot-scope="{row}">
{{ row.ISPUNISH === "1" ? "是" : row.ISPUNISH === "2" ?"否":"处罚人未处理" }}
</template>
</el-table-column>
</el-table>
<p>待反馈处罚</p>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="fkList"
:row-key="getRowKeyCf"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="REASON" label="处罚原因" show-overflow-tooltip />
<el-table-column prop="CREATOR_NAME" label="下发人" show-overflow-tooltip />
<el-table-column prop="UNITS_NAME" label="被处罚单位" show-overflow-tooltip />
<el-table-column prop="PERSON_NAME" label="被处罚人" show-overflow-tooltip />
<el-table-column label="处罚处理状态" show-overflow-tooltip>
<template slot-scope="{row}">
{{ row.HANDLED === "0" ? "待处理" : "已处理" }}
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button v-if="selectOSTATE == 1" @click="forceJie" type="danger" icon="el-icon-delete"></el-button>
<el-button @click="dialogPreDeleteShow = false"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -221,6 +369,7 @@ export default {
STATE: '', STATE: '',
varList: [], varList: [],
dialogFormShow: false, dialogFormShow: false,
dialogPreDeleteShow: false,
pd: [], pd: [],
unitsList: [], unitsList: [],
corpList: [], corpList: [],
@ -228,6 +377,14 @@ export default {
groupCorpList: [], groupCorpList: [],
treeDataInspectDept: [], treeDataInspectDept: [],
treeDeptOptions: [], treeDeptOptions: [],
inspectList:[],//
zgList:[],//
ysList:[],//
cfList:[],//
fkList:[],//
aiList:[],// AI
selectOID: '',
selectOSTATE:'',
defaultProps: { defaultProps: {
value: 'id', value: 'id',
children: 'nodes', children: 'nodes',
@ -280,6 +437,12 @@ export default {
getRowKey(row) { getRowKey(row) {
return row.OUTSOURCED_ID return row.OUTSOURCED_ID
}, },
getRowKeyInsp(row) {
return row.KEYPROJECTCHECK_ID
},
getRowKeyCf(row) {
return row.HIDDEN_ID
},
// //
getQuery() { getQuery() {
this.$refs.multipleTable.clearSelection() this.$refs.multipleTable.clearSelection()
@ -459,6 +622,57 @@ export default {
}).catch(() => { }).catch(() => {
}) })
}, },
handlePreForceDelete(row){
this.dialogPreDeleteShow = true
requestFN(
'/outsourced/preForceDelete',
{ OUTSOURCED_ID: row.OUTSOURCED_ID }
).then((data) => {
this.inspectList = data.inspectList //
this.zgList = data.zgList //
this.ysList = data.ysList //
this.cfList = data.cfList //
this.fkList = data.fkList //
this.aiList = data.aiList // AI
this.selectOID = row.OUTSOURCED_ID
this.selectOSTATE = row.STATE
}).catch((e) => {
})
},
//
forceJie(){
if (!this.selectOID) {
this.$message('请勿重复点击', {
confirmButtonText: '确定',
type: 'warning'
})
}
// ---
this.$confirm('确定要结束该重点工程吗?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
requestFN(
'/outsourced/forceJie',
{OUTSOURCED_ID: this.selectOID}
).then((data) => {
this.dialogPreDeleteShow = false
this.selectOID = ''
this.selectOSTATE = ''
this.getList()
this.$forceUpdate()
}).catch((e) => {
this.selectOID = ''
this.selectOSTATE = ''
})
}).catch(() => {
})
// ---
},
getUnitsList() { getUnitsList() {
requestFN( requestFN(
'/units/listAll', '/units/listAll',

View File

@ -226,13 +226,13 @@
enter-active-class="animate__animated animate__fadeInDown" enter-active-class="animate__animated animate__fadeInDown"
leave-active-class="animate__animated animate__fadeOutUp" leave-active-class="animate__animated animate__fadeOutUp"
> >
<div class="people_trajectory" v-if="isPeopleTrajectory"> <div v-if="isPeopleTrajectory" class="people_trajectory">
<el-select v-model="peopleTrajectoryValue" popper-class="people_trajectory_select"> <el-select v-model="peopleTrajectoryValue" popper-class="people_trajectory_select">
<el-option v-for="item in onePerLocArr" :key="item.id" :value="item.id" :label="item.id"/> <el-option v-for="item in onePerLocArr" :key="item.id" :value="item.id" :label="item.id"/>
</el-select> </el-select>
<el-button class="search_btn" @click="addTrajectory"></el-button> <el-button class="search_btn" @click="addTrajectory"></el-button>
<el-button class="reset_btn" @click="()=>{removeTrajectory();peopleTrajectoryValue = ''}">重置</el-button> <el-button class="reset_btn" @click="()=>{removeTrajectory();peopleTrajectoryValue = ''}">重置</el-button>
</div> </div>
</transition> </transition>
</div> </div>
</transition> </transition>
@ -256,7 +256,7 @@
:gangkou="gangkouActive" :gangkou="gangkouActive"
:infoname="dialog.infoname" :infoname="dialog.infoname"
:name="dialog.name" :name="dialog.name"
:GATE_VIDEO_ID="dialog.GATE_VIDEO_ID" :gate-video-id="dialog.GATE_VIDEO_ID"
:person-photo="dialog.personPhoto" :person-photo="dialog.personPhoto"
:ry-dept-name="dialog.RyDeptName" :ry-dept-name="dialog.RyDeptName"
:ry-post-name="dialog.RyPostName" :ry-post-name="dialog.RyPostName"
@ -461,6 +461,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: {},
@ -925,7 +937,7 @@ export default {
RyPostName: '', RyPostName: '',
RyRealName: '', RyRealName: '',
personTypeName: '', personTypeName: '',
GATE_VIDEO_ID:'' GATE_VIDEO_ID: ''
}, },
/* 曹妃甸使用参数开始*/ /* 曹妃甸使用参数开始*/
// //
@ -1215,8 +1227,8 @@ export default {
VIIDPort: '8088' VIIDPort: '8088'
}, },
trajectoryEntityCollection: {}, trajectoryEntityCollection: {},
isPeopleTrajectory:false, isPeopleTrajectory: false,
peopleTrajectoryValue:'' peopleTrajectoryValue: ''
} }
}, },
mounted() { mounted() {
@ -1435,7 +1447,7 @@ export default {
} }
const point_type = pick.id._monitoItems.data.point_type const point_type = pick.id._monitoItems.data.point_type
const point_id = pick.id._monitoItems.data.id const point_id = pick.id._monitoItems.data.id
if (point_type == '标记点CAMERA'){ if (point_type == '标记点CAMERA') {
console.log(pick.id._monitoItems.data) console.log(pick.id._monitoItems.data)
this.dialog.GATE_VIDEO_ID = pick.id._monitoItems.data.GATE_VIDEO_ID this.dialog.GATE_VIDEO_ID = pick.id._monitoItems.data.GATE_VIDEO_ID
} }
@ -1670,7 +1682,6 @@ 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)
if (id === '00003') { if (id === '00003') {
this.addBranchPoint() this.addBranchPoint()
} else { } else {
@ -1952,6 +1963,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) {
@ -2067,6 +2098,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()
@ -2121,7 +2154,7 @@ export default {
} }
this.carLocArr = [] this.carLocArr = []
} }
if(urlType === 'peopleTrajectory'){ if (urlType === 'peopleTrajectory') {
this.isPeopleTrajectory = false this.isPeopleTrajectory = false
} }
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') { if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
@ -2129,8 +2162,8 @@ export default {
this.clearMqttPoint('+/UwbBQ/') this.clearMqttPoint('+/UwbBQ/')
this.removeTrajectory() this.removeTrajectory()
for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) { for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) {
if(this.bottomOptionsList[pindex].list[i].type === 'peopleTrajectory'){ if (this.bottomOptionsList[pindex].list[i].type === 'peopleTrajectory') {
if(this.bottomOptionsList[pindex].list[i].check){ if (this.bottomOptionsList[pindex].list[i].check) {
this.bottomOptionsList[pindex].list[i].check = false this.bottomOptionsList[pindex].list[i].check = false
this.isPeopleTrajectory = false this.isPeopleTrajectory = false
break break
@ -2154,20 +2187,20 @@ export default {
} }
}) })
} else { } else {
if(urlType === 'peopleTrajectory'){ if (urlType === 'peopleTrajectory') {
let flag = false let flag = false
for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) { for (let i = 0; i < this.bottomOptionsList[pindex].list.length; i++) {
if(this.bottomOptionsList[pindex].list[i].type === 'peoplePosition'){ if (this.bottomOptionsList[pindex].list[i].type === 'peoplePosition') {
if(!this.bottomOptionsList[pindex].list[i].check){ if (!this.bottomOptionsList[pindex].list[i].check) {
flag = true flag = true
break break
} }
} }
} }
if(flag){ if (flag) {
this.$message.warning('请先选择人员定位!!!') this.$message.warning('请先选择人员定位!!!')
return return
}else{ } else {
this.isPeopleTrajectory = true this.isPeopleTrajectory = true
} }
} }
@ -2652,7 +2685,7 @@ export default {
personTypeName: item.personTypeName, personTypeName: item.personTypeName,
data_id: item.cardId + '', data_id: item.cardId + '',
point_type: 'peoplePositionCzks', point_type: 'peoplePositionCzks',
label: item.realName, label: item.realName
} }
czksPerLoc.push(perLoc) czksPerLoc.push(perLoc)

View File

@ -87,6 +87,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) {
@ -118,10 +119,10 @@ export default class DragEntity {
} }
} }
if (value.point_type.indexOf('标记点') !== -1) { if (value.point_type.indexOf('标记点') !== -1) {
console.info('====' ) console.info('====')
console.info(value ) console.info(value)
console.info('====' ) console.info('====')
if (value.label == '人员' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6'){ if (value.label == '人员' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6') {
billboard = { billboard = {
image: GGimg1, image: GGimg1,
height: 36, height: 36,
@ -131,7 +132,7 @@ export default class DragEntity {
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
disableDepthTestDistance: Number.POSITIVE_INFINITY disableDepthTestDistance: Number.POSITIVE_INFINITY
} }
}else if (value.label == '车辆' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6'){ } else if (value.label == '车辆' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6') {
billboard = { billboard = {
image: GGimg2, image: GGimg2,
height: 36, height: 36,
@ -141,9 +142,9 @@ export default class DragEntity {
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
disableDepthTestDistance: Number.POSITIVE_INFINITY disableDepthTestDistance: Number.POSITIVE_INFINITY
} }
}else if (value.label == '摄像头' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6'){ } else if (value.label == '摄像头' && value.corpInfoId == '035958e685cf4850bc40151c5e0617a6') {
billboard = { billboard = {
image: imgMap['img0_2' ], image: imgMap['img0_2' ],
height: 36, height: 36,
width: 30, width: 30,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM, verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
@ -151,9 +152,9 @@ export default class DragEntity {
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
disableDepthTestDistance: Number.POSITIVE_INFINITY disableDepthTestDistance: Number.POSITIVE_INFINITY
} }
}else if (value.label == '摄像头' ){ } else if (value.label == '摄像头') {
billboard = { billboard = {
image: imgMap['img0_2' ], image: imgMap['img0_2' ],
height: 36, height: 36,
width: 30, width: 30,
verticalOrigin: Cesium.VerticalOrigin.BOTTOM, verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
@ -161,7 +162,7 @@ export default class DragEntity {
heightReference: Cesium.HeightReference.CLAMP_TO_GROUND, heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
disableDepthTestDistance: Number.POSITIVE_INFINITY disableDepthTestDistance: Number.POSITIVE_INFINITY
} }
}else{ } else {
billboard = { billboard = {
image: imgMap['img' + value.icon_type], image: imgMap['img' + value.icon_type],
height: 36, height: 36,
@ -172,7 +173,6 @@ export default class DragEntity {
disableDepthTestDistance: Number.POSITIVE_INFINITY disableDepthTestDistance: Number.POSITIVE_INFINITY
} }
} }
} }
// 曹妃甸使用 // 曹妃甸使用
if (value.gangkou === '00004') { if (value.gangkou === '00004') {
@ -296,16 +296,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])
} }
} }
} }
@ -316,33 +324,68 @@ 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), addFourColorDiagram(latitudeAndLongitude, item) {
material: new Cesium.PolylineTrailLinkMaterialProperty({ const id = Cesium.createGuid()
color: Cesium.Color.fromBytes(201, 118, 243).withAlpha(0.5), this.id.push({
duration: 2000 id,
}, this.viewer), key: 'FourColorDiagram'
maximumHeights: new Array(latitudeAndLongitude.length).fill(40), })
minimumHeights: new Array(latitudeAndLongitude.length).fill(0) const target = new Cesium.Entity({
} id,
}) polygon: {
this.viewer.entities.add(target) hierarchy: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
} else { extrudedHeight: item.stretchHeight,
const target = new Cesium.Entity({ height: item.height,
polygon: { // eslint-disable-next-line new-cap
hierarchy: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude), material: new Cesium.Color.fromCssColorString(item.color),
extrudedHeight: item.stretchHeight, outline: !!item.strokeColor,
height: item.height, // eslint-disable-next-line new-cap
// eslint-disable-next-line new-cap outlineColor: new Cesium.Color.fromCssColorString(item.strokeColor)
material: new Cesium.Color.fromCssColorString(item.color), }
outline: !!item.strokeColor, })
// eslint-disable-next-line new-cap this.viewer.entities.add(target)
outlineColor: new Cesium.Color.fromCssColorString(item.strokeColor) }
} addWall(latitudeAndLongitude) {
}) const id = Cesium.createGuid()
this.viewer.entities.add(target) 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