Merge branch 'dev' into 新动火作业1128

# Conflicts:
#	src/views/map/dialog/index.vue
main
limingyu 2023-11-30 08:59:19 +08:00
commit 59d2e7c7cd
12 changed files with 5459 additions and 692 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -1115,7 +1115,7 @@ export default {
{
type: 'pie',
startAngle: 0,
radius: [35, 100],
radius: [35, 95],
center: ['40%', '30%'],
roseType: 'area',
avoidLabelOverlap: false,

View File

@ -0,0 +1,171 @@
<template>
<el-dialog
v-if="visible"
:visible.sync="visible"
:before-close="handleClose"
:append-to-body="true"
title="固定摄像头"
width="60%">
<div class="app-container">
<div class="filter-container">
<el-form>
<el-row :gutter="20">
<el-col :span="6"> <el-form-item label="视频名称">
<el-input v-model="KEYWORDS" placeholder="请输入关键字" class="filter-item" style="width: 150px;"/>
</el-form-item></el-col>
<el-col :span="6">
<el-form-item >
<el-button v-waves class="filter-item" type="primary" icon="el-icon-search" @click="getQuery">
搜索
</el-button>
<el-button v-waves class="filter-item" type="success" icon="el-icon-refresh" @click="goKeyReset">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</div>
<el-table
v-loading="listLoading"
ref="multipleTable"
:data="varList"
:row-key="getRowKey"
:header-cell-style="{
'font-weight': 'bold',
'color': '#000'
}"
tooltip-effect="dark"
border
fit
highlight-current-row
>
<el-table-column
:reserve-selection="true"
type="selection"
width="55"
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="name" label="视频名称" />
<el-table-column prop="regionName" label="区域" />
<el-table-column label="操作" align="left" width="500">
<template slot-scope="{row}">
<el-button v-show="row.in !== 1" type="success" icon="el-icon-caret-right" size="mini" @click="selectVideo(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="closeWindow"> </el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import Pagination from '@/components/Pagination' // el-pagination
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves'
export default {
components: { Pagination },
directives: { waves },
data() {
return {
config: config,
visible: false,
listLoading: true,
listQuery: {
page: 1,
limit: 20
},
total: 0,
KEYWORDS: '',
varList: [],
allCodes: []
}
},
methods: {
async init() {
this.visible = true
this.varList = []
this.KEYWORDS = ''
this.getList()
},
getRowKey(row) {
return row.PLATFORMVIDEOMANAGEMENT_ID
},
//
getQuery() {
this.$refs.multipleTable.clearSelection()
this.getList()
},
getAllList() {
return new Promise(resolve => {
requestFN(
'/videomanager/list?showCount=1000&currentPage=1',
{
OUTSOURCED_ID: this.$parent.$parent.OUTSOURCED_ID
}
).then((data) => {
const tempList = data.varList
const allCodes = []
tempList.forEach(item => {
allCodes.push(item.INDEXCODE)
})
this.allCodes = allCodes
resolve()
}).catch((e) => {
})
})
},
//
getList() {
this.listLoading = true
requestFN(
'/platformvideomanagement/platformList',
{
'pageNo': this.listQuery.page,
'pageSize': this.listQuery.limit,
'name': this.KEYWORDS
}
).then((res) => {
this.listLoading = false
const tempList = res.data.list
this.varList = tempList
this.total = res.data.total
}).catch((e) => {
this.listLoading = false
})
},
selectVideo(row) {
this.$emit('handleSelected', row)
this.closeWindow()
},
goKeyReset() {
this.KEYWORDS = ''
this.getList()
},
handleClose() {
this.visible = false
},
closeWindow() {
this.handleClose()
}
}
}
</script>
<style>
.hide .el-upload--picture-card {
display: none;
}
</style>

View File

@ -1,6 +1,6 @@
<template>
<div class="app-container">
<!-- <el-form label-width="100px">
<el-form label-width="100px">
<el-row>
<el-col :span="6">
<el-form-item label="关键字搜索">
@ -18,7 +18,7 @@
</el-form-item>
</el-col>
</el-row>
</el-form>-->
</el-form>
<el-table
v-loading="listLoading"
ref="multipleTable"
@ -39,7 +39,9 @@
width="55"
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="name" label="视频名称" />
<el-table-column prop="corpName" label="企业名称" />
<el-table-column prop="NAME" label="视频名称" />
<el-table-column prop="fangquNames" label="所属区域" />
<el-table-column prop="regionName" label="区域" />
<el-table-column prop="POSITION" label="状态" width="100">
<template slot-scope="{row}">
@ -50,13 +52,17 @@
<el-table-column label="操作" align="left" width="400">
<template slot-scope="{row}">
<el-button type="success" icon="el-icon-caret-right" size="mini" @click="showVideo(row)"></el-button>
<el-button type="info" icon="el-icon-location-information" size="mini" @click="handleMap(row)"></el-button>
<!-- <el-button type="info" icon="el-icon-location-information" size="mini" @click="goEdit(row)"></el-button>-->
<el-button type="primary" icon="el-icon-edit" size="mini" @click="goEdit(row)"></el-button>
</template>
</el-table-column>
</el-table>
<div class="page-btn-group">
<div/>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
<div>
<el-button type="primary" icon="el-icon-plus" @click="handleAdd"></el-button>
<!-- <el-button type="success" icon="el-icon-caret-right" @click="showAll"></el-button>-->
</div>
<pagination :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getAllList" />
</div>
<el-dialog v-if="dialogVideoHLS" :visible.sync="dialogVideoHLS" :before-close="handleBack" title="视频" width="600px">
@ -68,11 +74,6 @@
<el-dialog :visible.sync="dialogFormMap" title="定位" width="1050px" class="dy-dialog">
<el-form ref="form" :model="form" :rules="rules">
<el-form-item label="所属企业" prop="CORPINFO_ID">
<el-select v-model="form.CORPINFO_ID" placeholder="请选择申请状态" clearable >
<el-option v-for="item in corpList" :key="item.CORPINFO_ID" :label="item.CORP_NAME" :value="item.CORPINFO_ID" />
</el-select>
</el-form-item>
<el-form-item>
<div id="map" />
</el-form-item>
@ -86,6 +87,50 @@
<el-button type="primary" @click="setPosition"> </el-button>
</div>
</el-dialog>
<el-dialog :visible.sync="dialogForm" :title="msg==='add'?'新增':'编辑'" width="600px">
<el-form ref="form" :model="form" :rules="rules" label-width="110px" style="width: 500px;">
<el-form-item label="所属企业" prop="CORPINFO_ID">
<el-select v-model="form.CORPINFO_ID" placeholder="请选择申请状态" clearable >
<el-option v-for="item in corpList" :key="item.CORPINFO_ID" :label="item.CORP_NAME" :value="item.CORPINFO_ID" />
</el-select>
</el-form-item>
<el-form-item label="所属区域" prop="bianjiequyu">
<el-select v-model="form.SUOSHUQUYU" placeholder="请选择">
<el-option v-for="item in statusList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="边界入侵区域" prop="bianjiequyu">
<el-select v-model="form.bianjiequyu" multiple placeholder="请选择监理单位" style="width: 100%;">
<el-option v-for="item in quyuList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item v-if="form.VIDEO_TYPE===1" label="视频选择">
<el-button type="success" icon="el-icon-caret-right" size="mini" @click="selectVideo()"></el-button>
</el-form-item>
<el-form-item label="视频名称" prop="CODE">
<el-input :disabled="true" v-model="form.VIDEONAME" placeholder="这里输入视频名称..." />
</el-form-item>
<el-form-item v-if="form.VIDEO_TYPE===0" label="播放地址" prop="VIDEOURL">
<el-input :disabled="true" v-model="form.VIDEOURL" placeholder="这里输入播放地址..." />
</el-form-item>
<el-form-item label="摄像头编号" prop="CODE">
<el-input :disabled="true" v-model="form.CODE" placeholder="这里输入摄像头编号..." />
</el-form-item>
<el-form-item label="坐标">
<el-input v-model="form.LONGITUDEANDLATITUDE" style="width: 200px" placeholder="请输入内容" disabled />
<el-button type="info" icon="el-icon-location-information" size="mini" @click="handleMap(row)"></el-button>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogForm =false"> </el-button>
<el-button type="primary" @click="upload"> </el-button>
</div>
</el-dialog>
<platformvideo ref="platformvideo" @handleSelected="handleSelected"/>
</div>
</template>
<script>
@ -93,8 +138,10 @@ import Pagination from '@/components/Pagination' // 通过 el-pagination二次
import { requestFN } from '@/utils/request'
import waves from '@/directive/waves' // waves directive
import TiandiMap from '../../../components/TianMap/TiandiMap'
import Platformvideo from '../platformelectronic/components/platformvideo.vue'
import SelectTree from '@/components/SelectTree'
export default {
components: { Pagination, TiandiMap },
components: { Pagination, TiandiMap ,Platformvideo,SelectTree},
directives: { waves },
data() {
// eslint-disable-next-line no-unused-vars
@ -115,18 +162,53 @@ export default {
player: {},
dialogFormMap: false,
corpList: [],
form: {},
form: {
CORPINFO_ID:'',
bianjiequyu:[],
PLATFORMELECTRONIC_ID:'',
LONGITUDEANDLATITUDE:'',
VIDEOMANAGER_ID: '',
VIDEO_RESOURCES_ID: '',
VIDEO_TYPE: 1,
VIDEONAME: '', //
VIDEOURL: '',
CODE: '',
PLATFORMVIDEOMANAGEMENT_ID: '',
LATITUDE: '',
LONGITUDE: '',
SUOSHUQUYU:''
},
rules: {
CORPINFO_ID: [
{ required: true, message: '请选择企业', trigger: 'blur' }
],
bianjiequyu: [
{ required: true, message: '请选择区域', trigger: 'blur' }
],
CODE: [
{ required: true, message: '请选择摄像头', trigger: 'blur' }
]
}
},
dialogForm : false,
msg:'add' ,
defaultProps: {
value: 'id',
children: 'nodes',
label: 'name'
},
quyuList :[],
shexiangtouForm:{},
statusList: [
{ id: '0', name: '请选择' },
{ id: '1', name: '油管区' },
{ id: '2', name: '码头区' }
],
}
},
async created() {
this.getCorpList()
await this.getAllList()
this.getList()
await this.getquyuList()
},
methods: {
getRowKey(row) {
@ -137,14 +219,23 @@ export default {
getQuery() {
this.$refs.multipleTable.clearSelection()
this.listQuery.page = 1
this.getList()
this.getAllList()
},
goKeyReset() {
this.KEYWORDS = ''
this.getQuery()
},
getCorpList() {
getquyuList(){ //
requestFN(
'/dictionaries/listSelectTree',
{
DICTIONARIES_ID: '7da8205a07074a1785116fc8c9a7bfc4'
}
).then((data) => {
this.quyuList = JSON.parse(data.zTreeNodes)
})
},
getCorpList() { //
requestFN(
'/corpinfo/listAll',
{}
@ -154,65 +245,118 @@ export default {
})
},
getAllList() {
getAllList() { //
return new Promise(resolve => {
requestFN(
'/platformelectronic/listAll',
{ }
'/platformelectronic/list?showCount=' + this.listQuery.limit + '&currentPage=' + this.listQuery.page,
{
KEYWORDS:this.KEYWORDS
}
).then((data) => {
this.tempList = data.varList
this.varList = data.varList
this.listLoading = false
this.total = data.page.totalResult
resolve()
}).catch((e) => {
this.listLoading = false
})
})
},
handleAdd(row) {
this.msg = 'add'
this.resetForm()
this.dialogForm = true
// this.$refs.platformvideo.init()
},
resetForm(){
this.shexiangtouForm.LONGITUDE = ''
this.shexiangtouForm.LATITUDE = ''
this.shexiangtouForm.SUOSHUQUYU = ''
this.form.LONGITUDEANDLATITUDE = ''
this.shexiangtouForm = {}
this.form= {
CORPINFO_ID:'',
bianjiequyu:'',
LONGITUDEANDLATITUDE:'',
VIDEOMANAGER_ID: '',
VIDEO_RESOURCES_ID: '',
VIDEO_TYPE: 1,
VIDEONAME: '', //
VIDEOURL: '',
CODE: '',
PLATFORMVIDEOMANAGEMENT_ID: '',
LATITUDE: '',
LONGITUDE: ''
}
},
//
getList() {
upload(){
var _this = this
this.$refs.form.validate(valid => {
if (valid) {
this.shexiangtouForm.CORPINFO_ID = this.form.CORPINFO_ID
if (_this.form.bianjiequyu) {
var bianjiequyu = ''
_this.form.bianjiequyu.forEach(item => {
bianjiequyu += item + ','
})
this.shexiangtouForm.FANGQU_IDS = bianjiequyu.substr(0, bianjiequyu.length - 1)
}
this.shexiangtouForm.SUOSHUQUYU = this.form.SUOSHUQUYU
this.dialogFormMap = false
this.dialogForm = false
this.listLoading = true
requestFN(
'/platformelectronic/platformList',
{
'pageNo': this.listQuery.page,
'pageSize': this.listQuery.limit,
'name': this.KEYWORDS
}
).then((res) => {
this.listLoading = false
const tempList = res.data.list
tempList.forEach(item => {
for (let i = 0; i < this.tempList.length; i++) {
if (item.indexCode === this.tempList[i].INDEXCODE) {
console.log(item.indexCode === this.tempList[i].INDEXCODE)
item.PLATFORMELECTRONIC_ID = this.tempList[i].PLATFORMELECTRONIC_ID
item.LONGITUDE = this.tempList[i].LONGITUDE
item.LATITUDE = this.tempList[i].LATITUDE
item.CORPINFO_ID = this.tempList[i].CORPINFO_ID
}
}
})
this.varList = tempList
console.log(tempList)
this.total = res.data.total
'/platformelectronic/savePosition',
this.shexiangtouForm
).then(async(data) => {
await this.getAllList()
this.getList()
}).catch((e) => {
this.listLoading = false
})
} else {
return false
}
})
},
handleIn(row) {
this.$confirm('确认将[' + row.name + ']加入系统吗', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
selectVideo(row) {
this.$refs.platformvideo.init()
},
goEdit(row){
this.dialogForm = true
this.listLoading = true
return new Promise(resolve => {
requestFN(
'/platformelectronic/add',
'/platformelectronic/goEdit',
{
PLATFORMELECTRONIC_ID :row.PLATFORMELECTRONIC_ID
}
).then((data) => {
this.shexiangtouForm = data.pd
this.form.bianjiequyu = data.pd.FANGQU_IDS.split(',')
this.form.CORPINFO_ID = data.pd.CORPINFO_ID
this.form.VIDEONAME = data.pd.NAME
this.form.CODE = data.pd.INDEXCODE
this.form.SUOSHUQUYU = data.pd.SUOSHUQUYU
this.form.LONGITUDEANDLATITUDE = data.pd.LONGITUDE + "," +data.pd.LATITUDE
this.listLoading = false
resolve()
}).catch((e) => {
this.listLoading = false
})
})
},
handleSelected(row) {
this.shexiangtouForm = {
PLATFORMELECTRONIC_ID: row.PLATFORMELECTRONIC_ID,
CORPINFO_ID: row.CORPINFO_ID,
INDEXCODE: row.indexCode,
REGIONINDEXCODE: row.regionIndexCode,
EXTERNALINDEXCODE: row.externalIndexCode,
NAME: row.name,
LONGITUDE: row.LONGITUDE,
LATITUDE: row.LATITUDE,
CAMERATYPE: row.cameraType,
CASCADECODE: row.cascadeCode,
DECODETAG: row.decodeTag,
@ -225,50 +369,34 @@ export default {
CASCADETYPE: row.cascadeType,
REGIONNAME: row.regionName,
REGIONPATH: row.regionPath,
REGIONPATHNAM: row.regionPathName
REGIONPATHNAM: row.regionPathName,
VIDEONAME : row.name,
CODE:row.indexCode
}
).then(() => {
this.$message({
message: '加入成功',
type: 'success'
})
this.listLoading = false
this.allCodes.push(row.indexCode)
this.varList = []
this.getList()
}).catch((e) => {
this.listLoading = false
})
}).catch(() => {
})
this.$set(this.form, 'VIDEONAME', row.name)
this.$set(this.form, 'CODE', row.indexCode)
// this.$set(this.form, 'LATITUDE', row.LATITUDE)
// this.$set(this.form, 'LONGITUDE', row.longitude)
// this.$set(this.form, 'PLATFORMVIDEOMANAGEMENT_ID', row.PLATFORMVIDEOMANAGEMENT_ID)
},
//
setPosition() {
this.$refs.form.validate(valid => {
if (valid) {
this.dialogFormMap = false
this.listLoading = true
requestFN(
'/platformelectronic/savePosition',
this.form
).then(async(data) => {
await this.getAllList()
this.getList()
}).catch((e) => {
this.listLoading = false
})
} else {
return false
if(this.shexiangtouForm.PLATFORMELECTRONIC_ID != null){
}
})
this.shexiangtouForm.LONGITUDE = this.form.LONGITUDE
this.shexiangtouForm.LATITUDE = this.form.LATITUDE
this.form.LONGITUDEANDLATITUDE = this.form.LONGITUDE + ',' + this.form.LATITUDE
this.dialogFormMap = false
},
//
showVideo(row) {
console.info(row)
requestFN(
'/platformelectronic/getHlsPath',
{
INDEXCODE: row.indexCode
INDEXCODE: row.INDEXCODE
}
).then((res) => {
this.dialogVideoHLS = true
@ -295,30 +423,12 @@ export default {
},
handleMap(row) {
this.dialogFormMap = true
this.form = {
PLATFORMELECTRONIC_ID: row.PLATFORMELECTRONIC_ID,
CORPINFO_ID: row.CORPINFO_ID,
INDEXCODE: row.indexCode,
REGIONINDEXCODE: row.regionIndexCode,
EXTERNALINDEXCODE: row.externalIndexCode,
NAME: row.name,
LONGITUDE: row.LONGITUDE,
LATITUDE: row.LATITUDE,
CAMERATYPE: row.cameraType,
CASCADECODE: row.cascadeCode,
DECODETAG: row.decodeTag,
RESOURCETYPE: row.resourceType,
CREATETIME: row.createTime,
UPDATETIME: row.updateTime,
SORT: row.sort,
DISORDER: row.disOrder,
RECORDLOCATION: row.recordLocation,
CASCADETYPE: row.cascadeType,
REGIONNAME: row.regionName,
REGIONPATH: row.regionPath,
REGIONPATHNAM: row.regionPathName
if(row != null){
this.form.LONGITUDE = row.LONGITUDE
this.form.LATITUDE = row.LATITUDE
this.shexiangtouForm =row
}
this.dialogFormMap = true
this.$nextTick(() => {
if (!this.map) this.initMap(this.form.LONGITUDE, this.form.LATITUDE, 16)
else this.initCenter(this.form.LONGITUDE, this.form.LATITUDE, 16)
@ -400,8 +510,8 @@ export default {
}
</script>
<style>
#map{
#map{
width: 1000px;
height: 500px;
}
}
</style>

View File

@ -186,9 +186,9 @@ export default {
}
).then((data) => {
data.varList.forEach(item => {
if (item.REGIONINDEXCODE === '3152c0150e93491fb37f5c015fbb943e') {
if (item.SUOSHUQUYU === '2') {
this.block2OptionsList[0].count = item.co
} else if (item.REGIONINDEXCODE === '1b0f290142534d62957bf0b6f852c589') {
} else if (item.SUOSHUQUYU === '1') {
this.block2OptionsList[1].count = item.co
}
})

View File

@ -47,11 +47,9 @@
<peoplePositionCfdD v-if="type === 'peoplePosition'" :id="id" :type="type" :infoname="infoname"/>
<carPositionCfdD v-if="type === 'carPosition'" :id="id" :type="type" :infoname="infoname"/>
<!--曹妃甸东 八项作业 曹实业详细页面 end-->
<!--秦岗九公司 详情页面 start-->
<!--人员定位-->
<peoplePositionNine v-if="type === 'peoplePositionNine'" :id="id" :type="type" :infoname="infoname"/>
<peoplePositionOne v-if="type === 'peoplePositionOne'" :id="id" :type="type" />
<!--秦岗九公司 详情页面 end-->
<peoplePositionOne v-if="type === 'peoplePositionOne' && corpInfoId !== '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" />
<peoplePositionYGS v-if="type === 'peoplePositionOne' && corpInfoId === '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" />
</el-dialog>
</div>
</template>
@ -91,9 +89,9 @@ import cutroadCfdD from './cutroadCfdD.vue'
import breakgroundCfdD from './breakgroundCfdD.vue'
import hoistingCfdD from './hoistingCfdD.vue'
import peoplePositionCfdD from './peoplePositionCfdD.vue'
import peoplePositionNine from './peoplePositionNine.vue'
import carPositionCfdD from './carPositionCfdD.vue'
import peoplePositionOne from './peoplePositionOne.vue'
import peoplePositionYGS from './peoplePositionYGS.vue'
import hotworkFirst from "./hotworkFirst";
export default {
@ -131,10 +129,10 @@ export default {
hoistingCfdD,
MkGateMachineCfd,
peoplePositionCfdD,
peoplePositionNine,
carPositionCfdD,
videoPlayBianjieruqin,
peoplePositionOne,
peoplePositionYGS,
hotworkFirst
},
props: {

View File

@ -53,7 +53,7 @@
</table>
<div class="video">
<video-play v-if="type === 'CAMERA' && info.GATEVIDEO_ID" :id="info.GATEVIDEO_ID" :type="type" :gangkou="gangkou"/>
</div>ddd
</div>
</div>
</template>

View File

@ -0,0 +1,77 @@
<template>
<div class="app-container print-work">
<div class="level-title">
<h1>人员信息</h1>
</div>
<table class="table-ui">
<tr>
<td class="bbg-transparent">照片</td>
<td ><img src="../../../assets/map/index/touxiang.png" alt="" width="50" height="50"></td>
<td class="bbg-transparent">姓名</td>
<td >{{ info?info.NAME:'' }}</td>
</tr>
<tr>
<td class="bbg-transparent">部门</td>
<td >{{ info?info.DEPARTMENT_NAME:'' }}</td>
<td class="bbg-transparent">岗位</td>
<td >{{ info?info.POST_NAME:'' }}</td>
</tr>
<tr>
<td class="bbg-transparent">人员类型</td>
<td >{{ info?info.PERSON_TYPE:'' }}</td>
<td class="bbg-transparent">是否为隐患确认人</td>
<td >{{ info.IS_HAZARDCONFIRMER == 0 ?'否':'是' }}</td>
</tr>
</table>
</div>
</template>
<script>
import { requestFN } from '@/utils/request'
export default {
props: {
id: {
type: String,
default() {
return ''
}
},
type: {
type: String,
default() {
return ''
}
}
},
data() {
return {
config: config,
info: {}
}
},
created() {
this.getData()
},
methods: {
getData() {
requestFN(
'/map/getPersonByCardNo',
{
CARDNO: this.id
}
).then((data) => {
this.info = data.pd
}).catch((e) => {
})
}
}
}
</script>
<style lang="scss" scoped>
.titles {
margin-top: 20px;
}
</style>

View File

@ -232,8 +232,11 @@ import { animate } from 'motion'
import loadMapBoxCfd from './js/mapboxCfd'
import loadMapBox from './js/mapbox'
import AnquanCfd from './components/anquanCfd'
import { forEach } from 'lodash'
import mqtt from 'mqtt'
import img4_0_1 from '../../assets/map/gangkou_index/point/icon27.png'
import img4_0_2 from '../../assets/map/gangkou_index/point/icon28.png'
import img4_0_3 from '../../assets/map/gangkou_index/point/icon29.png'
import img4_0 from '../../assets/map/gangkou_index/point/ico21.png'
let viewer = null
let drag = null
let ry_drag = null
@ -1151,7 +1154,6 @@ export default {
id = pick.id.id
this.bubble(id)
}
console.log(point_id)
if (this.gangkouActive === '00004' && point_type.indexOf('标记点') !== -1 && (point_id.substring(0, 1) === '0' || point_id.substring(0, 1) === '3' || point_id.substring(0, 3) === '1_2' || point_id.substring(0, 3) === '2_8')) {
// if (this.gangkouActive === '00004' && point_type.indexOf('') !== -1 && point_id.substring(0, 1) === '0' || point_id.substring(0, 1) === '5') {
@ -1174,7 +1176,6 @@ export default {
this.dialog.width = dialog_width || '50%'
}
} else {
console.log(4)
this.closeBubbles()
}
// var cartesian = this.getCatesian3FromPX(movement.position)
@ -1504,7 +1505,6 @@ export default {
},
handleClickRightTools(index) {
console.info(index)
if (this.rightOptionsList[index].check !== '') this.rightOptionsList[index].check = !this.rightOptionsList[index].check
if (index === 0) {
if (this.gangkouActive === '00004') {
@ -1517,7 +1517,6 @@ export default {
if (this.cfdDIngweiTimer) {
clearInterval(this.cfdDIngweiTimer)
}
this.perLocArr = []
}
this.destroyConnection()
@ -1531,9 +1530,22 @@ export default {
this.changeSceneMode(this.rightOptionsList[index].check)
} else if (index === 4) {
this.destroyConnection()
this.onePerLocArr = []
this.clearAllBottomOptionsItemsCheck()
this.clearAllBottomOptionsItemsEntityCollection()
this.onePerLocArr = []
this.perLocArr = []
this.clearMqttPoint()
if (this.gangkouActive === '00004') {
// if (this.fwebsocket) {
// this.fwebsocket.close()
// }
if (this.timer) {
clearInterval(this.timer)
}
if (this.cfdDIngweiTimer) {
clearInterval(this.cfdDIngweiTimer)
}
}
} else if (index === 5) {
this.pureMap = !this.pureMap
this.componentKey = Math.random()
@ -1621,8 +1633,12 @@ export default {
if (this.timer) {
clearInterval(this.timer)
}
if (this.cfdDIngweiTimer) {
clearInterval(this.cfdDIngweiTimer)
}
}
this.clearAllBottomOptionsItemsCheck()
this.CORP_INFO_ID = ''
this.gangkouActive = ''
viewer.entities.removeAll()
@ -1657,8 +1673,6 @@ export default {
},
bottomOptionsItemsClick(pindex, index, label, urlType, pointUrl, dialog_width) {
console.info(urlType)
console.info(this.CORP_INFO_ID + '-')
if (this.bottomOptionsList[pindex].list[index].check || this.gangkouActive === '00004' && this.cfdBottomOptionsList[pindex].list[index].check) {
// websocket 使
if (this.gangkouActive === '00004' && urlType === 'peoplePosition') {
@ -1672,6 +1686,7 @@ export default {
clearInterval(this.cfdDIngweiTimer)
}
this.perLocArr = []
this.clearMqttPoint('cfdrydw')
}
if (this.gangkouActive === '00004' && urlType === 'carPosition') {
if (this.cfdCarDIngweiTimer) {
@ -1698,10 +1713,11 @@ export default {
this.bottomOptionsList[pindex].list[index].check = true
if (this.gangkouActive === '00004') {
this.cfdBottomOptionsList[pindex].list[index].check = true
this.bottomOptionsList[pindex].list[index].check = false
}
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
!this.connecting ? this.createConnection() : this.doSubscribe()
!this.connecting ? this.createConnection(this.CORP_INFO_ID) : this.doSubscribe()
} else {
requestFN(
pointUrl,
@ -1763,10 +1779,10 @@ export default {
await this.initColorList()
this.isItWithinTheArea()
// this.initPerLocWebsocket()
}
// websocket 使 -
this.timerCfdDingweiPoint()
} else {
this.dragEntity(points, pindex, index)
}
}).catch((e) => {
console.log(e)
})
@ -1787,10 +1803,26 @@ export default {
// }
}
},
timerCfdDingweiPoint() {
for (let i = 0; i < this.perLocArr.length; i++) {
if (this.perLocArr[i].color === 'red') this.perLocArr[i].icon_type = 'img4_0_1'
else if (this.perLocArr[i].color === 'orange') this.perLocArr[i].icon_type = 'img4_0_2'
else if (this.perLocArr[i].color === 'yellow') this.perLocArr[i].icon_type = 'img4_0_3'
else this.perLocArr[i].icon_type = 'img4_0'
this.perLocArr[i].id = this.perLocArr[i].cardNo
this.perLocArr[i].x = this.perLocArr[i].position.x
this.perLocArr[i].y = this.perLocArr[i].position.y
if (this.perLocArr[i].lastTime) {
ry_drag.getPosition(this.perLocArr[i])
} else {
ry_drag.addEntity(this.perLocArr[i])
this.mqttPoint['cfdrydw' + this.perLocArr[i].cardNo] = this.perLocArr[i].cardNo
}
}
},
timerCfdDingwei() {
this.cfdDIngweiTimer = setInterval(() => {
this.localtionReload(1, 0)
// this.localtionReload(1, 0)
requestFN(
'/map/getCurrentLocationOnline',
{
@ -1839,12 +1871,28 @@ export default {
}
points.push(point)
}
if (this.perLocArr.length === 0) {
this.perLocArr = points
} else {
for (let i = 0; i < points.length; i++) {
let isExist = false
for (let j = 0; j < this.perLocArr.length; j++) {
if (points[i].cardNo === this.perLocArr[j].cardNo) {
this.perLocArr[j].position = points[i].position
isExist = true
break
}
}
if (!isExist) {
this.perLocArr.push(points[i])
}
}
}
this.isItWithinTheArea()
this.dragEntity(this.perLocArr, pindex, index)
this.timerCfdDingweiPoint()
})
}, 30000)
}, 5000)
},
timerCfdCarDingwei() {
this.cfdCarDIngweiTimer = setInterval(() => {
@ -1909,7 +1957,7 @@ export default {
// eslint-disable-next-line no-implied-eval
this.timer = setInterval(() => {
this.initColorList()
this.localtionReload(1, 0)
// this.localtionReload(1, 0)
}, 300000)
},
//
@ -1944,7 +1992,7 @@ export default {
this.subscribeSuccess = false
},
//
createConnection() {
createConnection(CORP_INFO_ID) {
try {
const { protocol, host, port, endpoint, ...options } = this.connection
const connectUrl = `${protocol}://${host}:${port}${endpoint}`
@ -1961,14 +2009,14 @@ export default {
this.client.on('error', error => {
console.log('Connection failed', error)
})
this.mqttMessage()
this.mqttMessage(CORP_INFO_ID)
}
} catch (error) {
this.connecting = false
console.log('mqtt.connect error', error)
}
},
mqttMessage() {
mqttMessage(CORP_INFO_ID) {
this.client.on('message', (topic, message) => {
// console.info(message)
// if(this.intOne === 0){
@ -1997,8 +2045,9 @@ export default {
icon_type: 'img4_0' + pointColor,
// infoname: item.realName,
data_id: item.deviceCode,
point_type: '标记点peoplePositionOne'
// label: item.realName
point_type: '标记点peoplePositionOne',
label: '人员定位',
corpInfoId: CORP_INFO_ID
}
this.onePerLocArr.push(perLoc)
ry_drag.addEntity(perLoc)
@ -2017,6 +2066,7 @@ export default {
const key = prefix ? prefix + this.mqttPoint[mqttPointKey] : mqttPointKey
viewer.entities.removeById(this.mqttPoint[key])
this.onePerLocArr = this.onePerLocArr.filter(item => item.data_id !== this.mqttPoint[key])
delete this.mqttPoint[key]
}
},
//
@ -2387,7 +2437,6 @@ export default {
_this.pointBoxCfd.orangeList.forEach(item => { orangeFiled.push(...item['position']) })
const yellowFiled = []
_this.pointBoxCfd.yellowList.forEach(item => { yellowFiled.push(...item['position']) })
console.info(_this.pointBoxCfd.orangeList)
if (this.redList.indexOf(item.cardNo) > -1) {
_this.$set(_this.perLocArr[index], 'color', 'red')
} else if (redFiled !== [] && _this.forEachIsPointInPolygon(_this.pointBoxCfd.redList, item.position.x, item.position.y)) {

View File

@ -274,6 +274,7 @@ export default class DragEntity {
polygon: {
hierarchy: Cesium.Cartesian3.fromDegreesArray(latitudeAndLongitude),
extrudedHeight: item.stretchHeight,
height: item.height,
// eslint-disable-next-line new-cap
material: new Cesium.Color.fromCssColorString(item.color),
outline: !!item.strokeColor,

File diff suppressed because it is too large Load Diff

View File

@ -18,7 +18,6 @@ export default class DragEntity {
const position = Cesium.Cartesian3.fromDegrees(point.x, point.y, 0)
point.property.addSample(start, position)
point.lastTime = start
const entityOption = {
id: point.id,
name: point.name,
@ -44,6 +43,7 @@ export default class DragEntity {
this.viewer.clock.clockRange = Cesium.ClockRange.CLAMPED
this.viewer.clock.shouldAnimate = false
}
getPosition(point) {
if (this.viewer.clock.shouldAnimate === false) {
this.viewer.clock.shouldAnimate = true