Merge branch 'dev' into limingyu-20240416-一公司动火作业地图

pet_li_6.6
limingyu 2024-04-22 09:32:45 +08:00
commit a53d9140ea
12 changed files with 450 additions and 86 deletions

View File

@ -281,8 +281,8 @@ export default {
dialogVisible: false,
dialogAlarm: false,
rules: {
LONGITUDE: [{ required: true, message: '不可为空', trigger: 'blur' }],
LATITUDE: [{ required: true, message: '不可为空', trigger: 'blur' }],
// LONGITUDE: [{ required: true, message: '', trigger: 'blur' }],
// LATITUDE: [{ required: true, message: '', trigger: 'blur' }],
RECIPIENT: [{ required: true, message: '不可为空', trigger: 'blur' }],
INDICATORSOURCE: [{ required: true, message: '不可为空', trigger: 'blur' }],
ALARMTHRESHOLD: [{ required: true, message: '不可为空', trigger: 'blur' }],
@ -582,7 +582,8 @@ export default {
RECIPIENT: '',
TYPE: '',
LATITUDE: '',
LONGITUDE: ''
LONGITUDE: '',
LONGTITUDEANDLATITUDE: ''
}
this.addForm.dialogType = ''
},

View File

@ -0,0 +1,170 @@
<template>
<div>
<el-dialog :visible.sync="visible" :append-to-body="appendToBody" title="修改班级名称" width="700px" destroy-on-close >
<el-form ref="form" :model="form" label-width="110px">
<el-form-item label="班级名称" prop="CLASS_NAME">
<el-input
id="CLASS_NAME"
ref="CLASS_NAME"
v-model="form.CLASS_NAME"
style="width: 400px;"
maxlength="255"
placeholder="这里输入班级名称..."
title="班级名称"/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="close"> </el-button>
<el-button type="primary" @click="confirm"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import vueQr from 'vue-qr'
import { requestFN } from '@/utils/request'
export default {
components: { vueQr },
props: {
appendToBody: {
type: Boolean,
default: false
}
},
data() {
return {
visible: false,
qrCodeStr: '',
form: {
CLASS_NAME: '',
CLASS_MESSAGE_ID: ''
}
}
},
methods: {
init(row) {
this.visible = true
this.form.CLASS_MESSAGE_ID = row.CLASS_MESSAGE_ID
},
close() {
this.visible = false
this.form = {
CLASS_NAME: '',
CLASS_MESSAGE_ID: ''
}
},
confirm() {
this.loading = true
if (!this.form.CLASS_NAME || this.form.CLASS_NAME === '') {
this.$message.error('请输入班级名称')
return
}
requestFN('/classMessage/changeName', this.form).then((data) => {
this.$message.success('保存成功')
this.visible = false
this.close()
this.$emit('getResult')
}).catch((e) => {
this.loading = false
})
}
}
}
</script>
<style lang="scss" scoped>
.name{
width: 120px;
overflow: hidden;//
white-space: nowrap; //
text-overflow: ellipsis;//
}
.red {
width: 660px;
color: #ff0000;
margin-left: 34px;
font-size: 24px;
}
.bg_table {
background: url("../../../../assets/tablebg.jpg") no-repeat bottom center;
background-size: 100%;
width: 660px;
height: 430px;
border: 4px solid #453d3a;
transform: scale(0.5);
transform-origin: top left;
.title {
font-size: 28px;
text-align: center;
margin-top: 34px;
font-weight: bold;
color: #000000;
}
.table {
border-collapse: collapse;
width: 590px;
color: #453d3a;
font-size: 20px;
margin: 34px;
text-align: left;
margin-top: 10px;
.tcenter {
text-align: center
}
.w60 {
width: 100px;
}
.w74 {
width: 148px
}
th, td {
border: 2px solid #453d3a;
text-align: left;
height: 40px;
padding: 0 16px;
box-sizing: border-box;
.textone {
width: 80px;
text-align: justify;
text-align-last: justify;
text-justify: distribute-all-lines;
margin: 0 auto;
}
.text1 {
width: 60px;
text-align: justify;
text-align-last: justify;
text-justify: distribute-all-lines;
margin: 0 auto;
}
.text2 {
width: 50px;
text-align: justify;
text-align-last: justify;
text-justify: distribute-all-lines;
margin: 0 auto;
}
.text {
}
}
}
}
</style>

View File

@ -1,5 +1,5 @@
<template>
<el-dialog v-loading="loading" :visible.sync="visible" :title="title" :before-close="close" width="70%">
<el-dialog v-loading="loading" :visible.sync="visible" :title="title" :before-close="close" width="70%" top="50px">
<el-form ref="form" :rules="rules" :model="form" label-width="110px">
<el-row :gutter="10">
<el-col :span="12">
@ -81,6 +81,7 @@
:data="peopleList"
:row-key="getRowKey"
:header-cell-style="{'font-weight': 'bold','color': '#000'}"
height="500px"
tooltip-effect="dark"
border
fit

View File

@ -104,7 +104,7 @@
border
fit
highlight-current-row
@select="updateSelect"
@selection-change="updateSelect"
>
<el-table-column :reserve-selection="true" type="selection" width="55" align="center"/>
@ -164,6 +164,7 @@
</el-col>
<el-col :span="6">
<div style="margin-left: 10px">
<div>已选择人员数量{{ ($refs.multipleTable && $refs.multipleTable.selection)?$refs.multipleTable.selection.length:0 }}</div>
<div class="el-form-item__label">已选择人员名称</div>
<el-table
:data="selectPeopleList"
@ -270,9 +271,10 @@ export default {
this.getDic()
},
updateSelect(rows, row) {
console.log(rows)
if (this.visible) {
if (this.form.CLASS_SIZE === '' || !this.form.CLASS_SIZE) {
this.$message.error('请先选择班级容量')
this.$refs.multipleTable.clearSelection()
return
}
if (rows.length > this.form.CLASS_SIZE) {
@ -280,6 +282,7 @@ export default {
return
}
this.selectPeopleList = rows
}
},
confirm() {
const list = this.$refs.multipleTable.selection
@ -325,6 +328,7 @@ export default {
}
this.selectPeopleList = []
this.util.BELONG_TO_CORP = ''
this.$refs.multipleTable.clearSelection()
},
getDic() {
let i = 0
@ -474,7 +478,9 @@ export default {
this.$refs.userPdf.init({ CLASS_MESSAGE_ID: CLASS_MESSAGE_ID })
},
changePeopleList() {
requestFN('/classMessage/getPeopleList?showCount=' + this.form.CLASS_SIZE + '&currentPage=1').then((data) => {
requestFN('/classMessage/getPeopleList?showCount=' + this.form.CLASS_SIZE + '&currentPage=1',
{ BELONG_TO_CORP: this.util.BELONG_TO_CORP }
).then((data) => {
this.peopleList = data.varList
for (let i = 0; i < this.peopleList.length; i++) {
this.peopleList[i].STATUS = ''

View File

@ -60,10 +60,10 @@
width="55"
align="center"/>
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column prop="CLASS_NAME" label="班级名称" />
<el-table-column prop="TRAINING_TYPE_NAME" label="培训类型" />
<el-table-column prop="CLASS_NAME" width="300px" label="班级名称" />
<el-table-column prop="TRAINING_TYPE_NAME" width="200px" label="培训类型" />
<el-table-column prop="OPENING_TIME" label="开班时间" />
<el-table-column prop="PLACE_NAME" label="培训地点" />
<el-table-column prop="PLACE_NAME" width="200px" label="培训地点" />
<el-table-column prop="CLASS_SIZE" label="班级容量" />
<el-table-column prop="TRAINEES_NUM" label="培训人员数量" />
<el-table-column prop="CLASS_STATUS" label="班级状态">
@ -71,11 +71,12 @@
{{ row.CLASS_STATUS === '0'?'待开班':(row.CLASS_STATUS === '1'?'已开班':'完成') }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200">
<el-table-column label="操作" align="center" width="400" fixed="right">
<template slot-scope="{row}">
<el-button type="primary" icon="el-icon-edit" size="mini" @click="handleEdit(row.CLASS_MESSAGE_ID)"></el-button>
<el-button v-show=" row.CLASS_STATUS === '0'" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.CLASS_MESSAGE_ID)"></el-button>
<el-button v-show=" row.CLASS_STATUS === '1'" type="primary" size="mini" @click="uploadExcel(row)"></el-button>
<el-button v-if="false" v-show="del" type="danger" icon="el-icon-delete" size="mini" @click="handleDelete(row.CLASS_MESSAGE_ID)"></el-button>
<el-button v-show=" row.CLASS_STATUS === '0'" type="primary" icon="el-icon-edit" size="mini" @click="changeName(row)"></el-button>
</template>
</el-table-column>
</el-table>
@ -89,6 +90,7 @@
<edit ref="edit" :title="title" :is-show="isShow" @getResult = "getList"/>
<init-class ref="initClass" :title="title" :is-show="isShow" @getResult = "getList"/>
<upload-excel ref="uploadExcel" title="上传" append-to-body @getChoose="getFile"/>
<change-name ref="changeName" @getResult = "getList"/>
</div>
</template>
<script>
@ -99,8 +101,9 @@ import edit from './edit.vue'
import { upload } from '@/utils/upload'
import uploadExcel from '../../../../components/uploadExcel/index.vue'
import InitClass from './initClass.vue'
import ChangeName from './changeName.vue'
export default {
components: { InitClass, uploadExcel, Pagination, edit },
components: { ChangeName, InitClass, uploadExcel, Pagination, edit },
directives: { waves },
data() {
return {
@ -200,7 +203,7 @@ export default {
requestFN(
'/classMessage/delete',
{
CLASSMESSAGE_ID: id
CLASS_MESSAGE_ID: id
}
).then(() => {
this.$message({
@ -335,6 +338,9 @@ export default {
},
uploadExcel(row) {
this.$refs.uploadExcel.init(row)
},
changeName(row) {
this.$refs.changeName.init(row)
}
}
}

View File

@ -166,7 +166,7 @@ export default {
downloadPdf(dom, '相关方安全告知培训合格证')
},
getShowPicture(row) {
if (row.PHOTO && row.PHOTO !== '' && (row.PHOTO.indexOf('.jpg') >= 0 || row.PHOTO.indexOf('.png') >= 0 || row.PHOTO.indexOf('.jpeg') >= 0)) {
if (row.PHOTO) {
return true
}
},

View File

@ -1,6 +1,6 @@
<template>
<div class="renyuan">
<div class="block1">
<div v-if="false" class="block1">
<layout-title title="定位基础信息"/>
<div class="options">
<div v-for="(item,index) in block1OptionsList" :key="index" class="option">
@ -15,7 +15,7 @@
</div>
</div>
</div>
<div class="block2">
<div v-if="false" class="block2">
<layout-title title="定位状态数据"/>
<div class="options">
<div class="bg"/>
@ -29,7 +29,7 @@
</div>
</div>
</div>
<div class="block3">
<div v-if="false" class="block3">
<layout-title title="定位标签状态"/>
<div class="content">
<div class="options">
@ -56,18 +56,42 @@
</div>
</div>
</div>
<div class="block4">
<layout-title title="报警列表"/>
<div class="content">
<div class="table">
<div class="tr">
<div class="td">区域名称</div>
<div class="td">报警设备编号</div>
<div class="td">状态告警</div>
</div>
<div v-for="(item,index) in block4List" :key="index" class="tr">
<div class="td">{{ item.alarmName }}</div>
<div class="td">{{ item.equipmentName }}</div>
<div class="td">{{ item.statusName }}</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import layoutTitle from './title.vue'
import CountTo from 'vue-count-to'
import { requestFN } from '../../../utils/request'
export default {
components: {
CountTo,
layoutTitle
},
props: {
corpInfoId: {
type: String,
default: ''
}
},
data() {
return {
block1OptionsList: [
@ -131,12 +155,26 @@ export default {
count: '-',
facount: '-'
}
]
],
block4List: []
}
},
created() {
this.getData()
},
methods: {
block3OptionsClick(index) {
this.block3OptionsIndex = index
},
getData() {
requestFN(
'/map/getAlarmList',
{ corpId: this.corpInfoId }
).then((data) => {
this.block4List = data.list
}).catch((e) => {
this.$message.error(e)
})
}
}
}
@ -321,6 +359,48 @@ export default {
}
}
}
.block4 {
margin-top: 10px;
width: 410px;
background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.8));
.content {
border: 1px solid;
border-image: linear-gradient(to bottom, rgba(58, 122, 149, 0), rgba(58, 122, 149, 1)) 1;
border-top: none;
padding: 10px;
.options {
display: flex;
justify-content: flex-end;
.title {
cursor: pointer;
}
}
.table {
margin-top: 5px;
.tr {
display: flex;
&:nth-child(odd) {
background-color: rgba(42, 86, 158, 0.53);
}
.td {
flex: 1;
text-align: center;
font-size: 12px;
color: #fff;
padding: 5px;
}
}
}
}
}
}
@keyframes scale {

View File

@ -54,7 +54,7 @@
<!--曹妃甸东 八项作业 曹实业详细页面 end-->
<peoplePositionNine v-if="type === 'peoplePositionNine'" :id="id" :type="type" :infoname="infoname"/>
<peoplePositionOne v-if="type === 'peoplePositionOne' && corpInfoId !== '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" />
<peoplePositionYGS v-if="type === 'peoplePositionOne' && corpInfoId === '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" />
<peoplePositionYGS v-if="type === 'peoplePositionOne' && corpInfoId === '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" :corp-id="corpInfoId" />
<!-- 重点工程 start -->
<outSourceInfo v-if="type === 'PROJECT'" :id="id" :type="type" />
<outSourceVideoInfo v-if="type === 'VIDEO'" :id="id" :type="type" />

View File

@ -8,19 +8,25 @@
<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>
<td >{{ info?info.userName:'' }}</td>
</tr>
<tr>
<td class="bbg-transparent">公司</td>
<td >{{ info?info.corpName:'' }}</td>
<td class="bbg-transparent">部门</td>
<td >{{ info?info.DEPARTMENT_NAME:'' }}</td>
<td class="bbg-transparent">岗位</td>
<td >{{ info?info.POST_NAME:'' }}</td>
<td >{{ info?info.departmentName:'' }}</td>
</tr>
<tr>
<td class="bbg-transparent">设备id</td>
<td >{{ info?info.deviceId:'' }}</td>
<td class="bbg-transparent">设备名称</td>
<td >{{ info?info.deviceName:'' }}</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>
<td>{{ otherInfo?otherInfo.personType:'' }}</td>
<td class="bbg-transparent">岗位</td>
<td>{{ otherInfo?otherInfo.postName:'' }}</td>
</tr>
</table>
</div>
@ -42,12 +48,19 @@ export default {
default() {
return ''
}
},
corpId: {
type: String,
default() {
return ''
}
}
},
data() {
return {
config: config,
info: {}
info: {},
otherInfo: {}
}
},
created() {
@ -58,10 +71,12 @@ export default {
requestFN(
'/map/getPersonByCardNo',
{
CARDNO: this.id
CARDNO: this.id,
corpId: this.corpId
}
).then((data) => {
this.info = data.pd
this.info = data.info.required
this.otherInfo = data.otherInfo
}).catch((e) => {
})
}

View File

@ -1117,6 +1117,7 @@ export default {
subscription: {
// '+'
topic: '+/UwbBQ/+/prop',
topic1: '+/+/+/alarm',
qos: 0
},
@ -1143,7 +1144,8 @@ export default {
vmport: '7010',
linkPort: '8093',
VIIDPort: '8088'
}
},
trajectoryEntityCollection: {}
}
},
mounted() {
@ -1466,6 +1468,58 @@ export default {
}
// var cartesian = this.getCatesian3FromPX(movement.position)
}, Cesium.ScreenSpaceEventType.LEFT_CLICK)
viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_DOUBLE_CLICK)
viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.RIGHT_CLICK)
document.addEventListener('contextmenu', function(event) {
event.preventDefault()
})
this.handler.setInputAction(movement => {
const pick = viewer.scene.pick(movement.position)
if (Cesium.defined(pick) && (pick.id.id)) {
if (!pick.id._monitoItems) {
this.removeTrajectory()
return
}
const point_type = pick.id._monitoItems.data.point_type
const point_id = pick.id._monitoItems.data.id
const corpInfoId = pick.id._monitoItems.data.corpInfoId
if (point_type === '标记点peoplePositionOne') {
this.removeTrajectory()
this.addTrajectory(point_id, corpInfoId)
}
} else {
this.removeTrajectory()
}
}, Cesium.ScreenSpaceEventType.RIGHT_CLICK)
},
addTrajectory(point_id, corpInfoId) {
requestFN(
'/map/getPersonTrace',
{
id: point_id,
corpId: corpInfoId
}
).then((data) => {
if (data.list) {
const positions = []
for (let i = 0; i < data.list.length; i++) {
positions.push(Cesium.Cartesian3.fromDegrees(data.list[i].XAxis, data.list[i].YAxis))
}
const entity = new Cesium.Entity({
id: 'trajectory',
polyline: { positions, width: 5.0, material: Cesium.Color.RED }
})
const collection = new Cesium.CustomDataSource('trajectoryEntityCollection')
collection.entities.add(entity)
viewer.dataSources.add(collection)
this.trajectoryEntityCollection = collection
}
})
},
removeTrajectory() {
if (Object.keys(this.trajectoryEntityCollection).length === 0) return
viewer.dataSources.remove(this.trajectoryEntityCollection)
this.trajectoryEntityCollection = {}
},
getCatesian3FromPX: function(px) {
@ -1820,6 +1874,7 @@ export default {
this.destroyConnection()
this.clearAllBottomOptionsItemsCheck()
this.clearAllBottomOptionsItemsEntityCollection()
this.removeTrajectory()
this.onePerLocArr = []
this.perLocArr = []
this.clearMqttPoint()
@ -1864,6 +1919,7 @@ export default {
this.addBranchPoint()
this.clearAllBottomOptionsItemsCheck()
this.clearAllBottomOptionsItemsEntityCollection()
this.removeTrajectory()
},
bottomOptionsClick(index) {
if (this.bottomClickDisable) return
@ -1938,6 +1994,7 @@ export default {
} else if (this.CORP_INFO_ID) {
this.CORP_INFO_ID = ''
this.clearAllBottomOptionsItemsEntityCollection()
this.removeTrajectory()
this.dragAreaEntity(this.branchPoint)
this.toCenter(this.parentCenter)
this.destroyConnection()
@ -2010,7 +2067,8 @@ export default {
}
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
this.doUnSubscribe()
this.clearMqttPoint('1698584148364034050/UwbBQ/')
this.clearMqttPoint('+/UwbBQ/')
this.removeTrajectory()
}
this.bottomOptionsList[pindex].list[index].check = false
if (this.gangkouActive === '00004') {
@ -2529,6 +2587,7 @@ export default {
},
mqttMessage(CORP_INFO_ID) {
this.client.on('message', (topic, message) => {
if (topic.indexOf('UwbBQ') !== -1 && topic.indexOf('prop') !== -1) {
// created by liu jun mqtt
let peopleList = JSON.parse(message)
if (!Array.isArray(peopleList)) {
@ -2569,6 +2628,15 @@ export default {
this.mqttPoint[this.subscription.topic.substring(0, this.subscription.topic.lastIndexOf('+')) + item.deviceCode] = item.deviceCode
}
}
} else if (topic.indexOf('alarm') !== -1) {
const formatMessage = JSON.parse(message)
this.$notify({
title: '报警信息',
dangerouslyUseHTMLString: true,
message: `部门:${formatMessage.deptName}<br/>类型:${formatMessage.identifierName}`,
type: 'error'
})
}
})
},
clearMqttPoint(prefix) {
@ -2589,8 +2657,8 @@ export default {
},
//
doSubscribe() {
const { topic, qos } = this.subscription
this.client.subscribe(topic, { qos }, (error, res) => {
const { topic, topic1, qos } = this.subscription
this.client.subscribe([topic, topic1], { qos }, (error, res) => {
if (error) {
console.log('Subscribe to topics error', error)
return
@ -2601,8 +2669,8 @@ export default {
},
//
doUnSubscribe() {
const { topic } = this.subscription
this.client.unsubscribe(topic, error => {
const { topic, topic1 } = this.subscription
this.client.unsubscribe([topic, topic1], error => {
if (error) {
console.log('Subscribe to topics error', error)
}

View File

@ -140,6 +140,7 @@ export default {
this.$message.success('推送成功')
this.visible = false
this.$emit('refresh', '')
this.beforeClose()
})
.catch((e) => {
console.log(e)
@ -182,28 +183,40 @@ export default {
handleClose() {
this.form = {
STATUS: '',
STATUS: '1',
APPOINT_CORP_ID: '',
APPOINT_CORP_NAME: '',
APPOINT_DEPARTMENT_ID: null,
APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: '',
APPOINT_USER_ID: null,
APPOINT_USER_NAME: '',
OPINION: '',
user: '',
tm: new Date().getTime(),
list: [],
tm: new Date().getTime()
isShow: true,
info: {},
entrustFlag: '1'
}
this.visible = false
},
beforeClose() {
this.visible = false
this.form = {
STATUS: '',
STATUS: '1',
APPOINT_CORP_ID: '',
APPOINT_CORP_NAME: '',
APPOINT_DEPARTMENT_ID: null,
APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: '',
APPOINT_USER_ID: null,
APPOINT_USER_NAME: '',
OPINION: '',
user: '',
tm: new Date().getTime(),
list: [],
tm: new Date().getTime()
isShow: true,
info: {},
entrustFlag: '1'
}
}
}

View File

@ -153,12 +153,14 @@ export default {
this.$message.error('请填写完整信息')
} else {
if (this.form.TYPE !== '2') {
this.loading = true
requestFN('/xgf/user/approveMax', this.form)
.then((data) => {
this.$message.success('推送成功')
this.visible = false
this.$emit('refresh', '')
this.handleClose()
this.loading = false
})
.catch((e) => {
console.log(e)
@ -174,12 +176,14 @@ export default {
formData.append('weiTuoShu', this.form.APPOINT_ANNEX[i].raw)
}
}
this.loading = true
upload('/xgf/user/approveMax', formData)
.then((data) => {
this.$message.success('推送成功')
this.visible = false
this.$emit('refresh', '')
this.handleClose()
this.loading = false
})
.catch((e) => {
console.log(e)