This commit is contained in:
zzyuan 2024-10-14 09:30:25 +08:00
commit 51ff64de31
32 changed files with 1872 additions and 1278 deletions

View File

@ -81,11 +81,11 @@
}
function onServerOpen(time) {
alert("第" + time + "次连接上视频服务器");
// alert("第" + time + "次连接上视频服务器");
}
function onServerClose(time) {
alert("第" + time + "次断开视频服务器");
// alert("第" + time + "次断开视频服务器");
}
//视频================================================================================================

View File

@ -37,8 +37,8 @@ export function updateProject(data) {
'decrypt': 'decrypt',
'Content-Type': 'multipart/form-data'
},
url: '/bracelet/project',
method: 'put',
url: '/bracelet/project/update',
method: 'post',
data: data
})
}

View File

@ -44,6 +44,15 @@ export function getPersonInfo(data) {
})
}
// 文件地址详情
export function getFileUrl(data) {
return request({
url: '/bracelet/person/getFileUrl',
method: 'post',
data: data
})
}
//证书详情
export function getCertificate(memberId) {
return request({

View File

@ -0,0 +1,19 @@
import request from '@/utils/request'
// 查询列表
export function getTemporarilyPersons(query) {
return request({
url: '/bracelet/temporarilyPerson/list',
method: 'get',
params: query
})
}
// 删除
export function delTemporarilyPerson(data) {
return request({
url: '/bracelet/temporarilyPerson/delTemporarilyPerson',
method: 'post',
data: data
})
}

View File

@ -0,0 +1,9 @@
import request from '@/utils/request'
/* 判断人员管控是否有告警 */
export function getPersonControlIsWarn(query) {
return request({
url: '/bracelet/consControl/getPersonControlIsWarn',
method: 'get',
params: query
})
}

View File

@ -60,4 +60,13 @@ export function getJdWarnList(query) {
method: 'get',
params: query
})
}
/* 关闭近电感应告警 */
export function closeJdWarn(data) {
return request({
url: '/tcp/netty/closeWarn',
method: 'post',
data:data
})
}

BIN
src/assets/gif/1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

BIN
src/assets/gif/12.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
src/assets/gif/123.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
src/assets/gif/1234.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
src/assets/gif/124.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
src/assets/gif/13.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
src/assets/gif/134.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
src/assets/gif/14.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
src/assets/gif/2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
src/assets/gif/23.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
src/assets/gif/234.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
src/assets/gif/24.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 72 KiB

BIN
src/assets/gif/3.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
src/assets/gif/34.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
src/assets/gif/4.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

View File

@ -158,7 +158,7 @@
<el-input
v-model="queryshCode.shCode"
placeholder="请输入手环编码"
maxlength="20"
maxlength="50"
/>
</el-form-item>
</el-form>
@ -247,7 +247,7 @@
<el-input
v-model="queryshEdit.shCode"
placeholder="请输入手环编码"
maxlength="20"
maxlength="50"
/>
</el-form-item>
</el-form>
@ -590,7 +590,7 @@
placeholder="请输入手环编码"
clearable
@keyup.enter.native="handleQueryShBind"
maxlength="20"
maxlength="50"
/>
</el-form-item>
<el-form-item prop="shPersonName">
@ -1382,6 +1382,13 @@
const param = {
shId:row.shId,
}
if(row.shPersonName!=null && row.shPersonName!=''){
this.$alert('手环已绑定使用人,不可解绑', '提示', {
type: 'warning',
confirmButtonText: '确定',
});
return;
}
this.$modal.confirm('确定把该手环与手环箱解除绑定吗?解绑后重新绑定才能继续使用!').then(function() {
return delSh(param);
}).then(() => {
@ -1806,6 +1813,13 @@
});
return;
}
if (row.teamId!=null && row.teamId!='' && row.teamId!=0) {
this.$alert('手环箱未归还,无法删除', '提示', {
type: 'warning',
confirmButtonText: '确定',
});
return;
}
const param = {
shboxId:row.shboxId
}

View File

@ -100,24 +100,25 @@
<!-- 添加或修改岗位对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form ref="form" :model="form" :rules="rules" label-width="200px">
<el-form-item label="项目部名称" prop="projectDepartName">
<el-input v-model="form.projectDepartName" maxlength="20" placeholder="请输入项目名称" />
<el-input v-model="form.projectDepartName" maxlength="20" placeholder="请输入项目名称" style="width: 400px;"/>
</el-form-item>
<el-form-item label="负责人" prop="projectHeadName">
<el-input v-model="form.projectHeadName" maxlength="20" placeholder="请输入负责人名称" />
<el-input v-model="form.projectHeadName" maxlength="20" placeholder="请输入负责人名称" style="width: 400px;"/>
</el-form-item>
<el-form-item label="电话" prop="contactInformation">
<el-input v-model="form.contactInformation" maxlength="11" placeholder="请输入负责人电话号码"/>
<el-input v-model="form.contactInformation" maxlength="11" placeholder="请输入负责人电话号码" style="width: 400px;"/>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" maxlength="50" placeholder="请输入备注内容" />
<el-input v-model="form.remarks" maxlength="50" placeholder="请输入备注内容" style="width: 400px;"/>
</el-form-item>
<el-form-item label="APP展示图片 " label-width="120px">
<el-form-item label="APP展示图片 " label-width="200px">
<el-upload
action="#"
:limit="5"
:file-list="fileList"
:key="uploadKey"
:show-file-list="true"
:auto-upload="false"
list-type="picture-card"
@ -168,6 +169,7 @@ export default {
dicts: ['sys_normal_disable'],
data() {
return {
uploadKey: Date.now(),
//
loading: true,
//
@ -214,7 +216,7 @@ export default {
//
rules: {
projectDepartName: [
{ required: true, message: "项目名称不能为空", trigger: "blur" }
{ required: true, message: "项目名称不能为空", trigger: "blur" }
],
// projectHeadName: [
// { required: true, message: "", trigger: "blur" }
@ -320,6 +322,7 @@ export default {
},
//
cancel() {
this.uploadKey = Date.now();
this.open = false;
this.fileList=[];
this.reset();
@ -356,6 +359,7 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.uploadKey = Date.now();
this.fileList = []
this.reset();
this.open = true;
@ -364,6 +368,7 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.fileList = []
this.delFileIdList = []
this.reset();
const projectId = row.projectId
getProject(projectId).then(response => {
@ -377,7 +382,7 @@ export default {
// response.data.fileList = [];
this.open = true;
this.title = "修改项目";
this.uploadKey = Date.now();
});
},
//
@ -435,13 +440,13 @@ export default {
},
//fileList raw
getFileData() {
const file = []
const fileTwo = []
this.fileList.forEach(item => {
if (item?.hasOwnProperty('raw')) {
file.push(item.raw)
fileTwo.push(item.raw)
}
})
return { file }
return { fileTwo }
},
/** 提交按钮 */
submitForm() {
@ -449,29 +454,40 @@ export default {
if (valid) {
if (this.form.projectId != undefined) {
const reqData = new FormData();
this.form.delFileIdList = this.delFileIdList;
reqData.append('params', JSON.stringify(this.form))
const { file } = this.getFileData()
file.forEach(item => {
const forTemp = {'projectId': this.form.projectId,'projectDepartName': this.form.projectDepartName,'projectHeadName': this.form.projectHeadName,'contactInformation': this.form.contactInformation,'remarks': this.form.remarks};
reqData.append('params', JSON.stringify(forTemp));
// this.form.delFileIdList = this.delFileIdList;
this.delFileIdList.forEach(item => {
reqData.append('delFileIdList', item)
});
// reqData.append('params', JSON.stringify(this.form))
const { fileTwo } = this.getFileData()
fileTwo.forEach(item => {
reqData.append('file', item)
})
console.log(reqData)
updateProject(reqData).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.delFileIdList = [];
this.fileList=[];
this.uploadKey = Date.now();
this.getList();
});
} else {
console.log(this.form)
const reqData = new FormData()
reqData.append('params', JSON.stringify(this.form))
const { file } = this.getFileData()
file.forEach(item => {
const forTemp = {'projectId': this.form.projectId,'projectDepartName': this.form.projectDepartName,'projectHeadName': this.form.projectHeadName,'contactInformation': this.form.contactInformation,'remarks': this.form.remarks};
reqData.append('params', JSON.stringify(forTemp))
const { fileTwo } = this.getFileData()
fileTwo.forEach(item => {
reqData.append('file', item)
})
addProject(reqData).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.fileList=[];
this.delFileIdList = [];
this.uploadKey = Date.now();
this.getList();
});
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,206 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="关键字" prop="keyWord">
<el-input v-model="queryParams.keyWord" placeholder="请输入关键字(姓名/班组)" clearable maxlength="20"
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="lsList">
<el-table-column label="序号" align="center" width="80" type="index">
<template slot-scope="scope">
<span>{{ (queryParams.pageNum - 1) * queryParams.pageSize + scope.$index + 1 }}</span>
</template>
</el-table-column>
<el-table-column label="姓名" align="center" prop="name" sortable />
<el-table-column label="身份证号 " align="center" prop="idCard" sortable />
<el-table-column label="手机号" align="center" prop="phone" sortable />
<el-table-column label="所属班组" align="center" prop="teamName" sortable />
<el-table-column label="人脸信息" align="center" prop="filePath">
<template slot-scope="scope">
<div @click="openImg(scope.row.base64Url)" style="color: #02a7f0; cursor: pointer">
<img :src="scope.row.base64Url" style="width: 100px;height: 100px;">
</div>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-delete"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 图片查看弹窗 -->
<el-dialog :visible.sync="dialogVisible">
<img width="100%" height="650px" :src="dialogImageUrl" />
</el-dialog>
</div>
</template>
<script>
import { getTemporarilyPersons, delTemporarilyPerson } from "@/api/base/temporarilyPerson";
export default {
name: "TemporarilyPersons",
dicts: ['sys_normal_disable', 'sys_user_sex', 'post_type'],
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
lsList: [],
//
title: "",
//
open: false,
formQuery: {
teamId: '',
pageNum: 1,
pageSize: 10,
name: undefined,
sex: undefined,
},
memberTotal: 0, //
//
queryParams: {
pageNum: 1,
pageSize: 10,
keyWord: '',
},
//
form: {},
openPeople: false,
//
dialogImageUrl: '',
dialogVisible: false,
};
},
created() {
this.getList();
},
methods: {
/** 查询临时人员列表 */
getList() {
this.loading = true;
getTemporarilyPersons(this.queryParams).then(response => {
this.lsList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//-
openImg(url) {
this.dialogImageUrl = url
this.dialogVisible = true
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 删除按钮操作 */
handleDelete(row) {
const obj = {
id:row.id,
filePath:row.filePath,
fileId:row.fileId
}
this.$modal.confirm('是否确认删除姓名为"' + row.name + '"的数据项?').then(function () {
return delTemporarilyPerson(obj);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => { });
},
}
};
</script>
<style lang="scss" scoped>
.el-table::before {
display: none !important;
}
.people-dialog {
width: 100%;
height: 500px;
display: flex;
justify-content: space-between;
}
.people-list-box {
width: 55%;
height: 98%;
border: 1px solid #e0e0e0;
}
.chosen-list-box {
width: 40%;
height: 98%;
border: 1px solid #e0e0e0;
}
.chosen-list {
height: 85%;
overflow-y: auto;
}
.chosen-list-item {
width: 100%;
height: 40px;
display: flex;
justify-content: space-between;
align-items: center;
}
.dialog-header {
width: 100%;
height: 60px;
background-color: #F2F2F2;
display: flex;
align-items: center;
justify-content: space-between;
}
.teamLeaderBox {
width: 40px;
height: 20px;
line-height: 20px;
text-align: center;
display: inline-block;
font-size: 10px;
background: #E7F4EE;
border: 1px solid #19BE6B;
border-radius: 20px;
margin-left: 5px;
color: #19BE6B;
}
</style>

View File

@ -7,10 +7,10 @@
<el-button type="primary" plain @click="searchData">查询</el-button>
</div>
<div class="dev-box" v-if="isShow">
<div :class="getStyle(item)" @click="sendParams(item.devCode, index)" v-for="(item, index) in devArr"
:key="item.id">
<div :class="getStyle(item)" @click="sendParams(item.devCode, item.warnPosition, index)"
v-for="(item, index) in devArr" :key="item.id">
<img :src="dz_dev_img">
<div class="layout dev-info">
<div class="layout dev-info" :style="{ color: (item.isWarn === 0 ? '#000' : '#ff0000') }">
<div>{{ item.proName }}</div>
<div>班组{{ item.teamName }}</div>
<div>班组长{{ item.teamLeader }}-{{ item.leaderPhone }}</div>
@ -25,7 +25,7 @@
</div>
<div class="center">
<div class="center-1">
<img :src="dz_dev_warn_img" />
<img :src="dz_dev_warn_img" style="width: 100%;height: 100%;object-fit: contain;" />
</div>
<div class="center-2 layout">
<!-- 吊装视频播放 -->
@ -46,7 +46,9 @@
<img :src="battery3" alt="电量" v-if="parseFloat(item.electricQuantity) < 20">
<span style="margin-left: 5px;">{{ item.electricQuantity }}%</span>
</div>
<div class="jd-dev-img layout"><img :src="config" alt="配置" @click.stop="clickJdDev(item.devId, item.devCode)">
<div class="jd-dev-img layout">
<img :src="config" alt="配置" title="配置" @click.stop="clickJdDev(item.devId, item.devCode)">
<img :src="close" alt="关闭报警" title="关闭报警" @click.stop="closeWarn(item.devId, item.devCode)">
</div>
</div>
</div>
@ -59,7 +61,7 @@
</div>
<div class="infinite-list-wrapper" v-if="isShow3">
<ul class="list" v-infinite-scroll="loadWarnInfoData" infinite-scroll-disabled="busy"
infinite-scroll-distance="50">
infinite-scroll-distance="0">
<li v-for="(item, index) in tableData" :key="index" class="warn-li layout">
<span class="layout">{{ item.devName }}</span>
<span class="layout">{{ item.warnTime }}</span>
@ -110,6 +112,18 @@
@click.prevent="removeConfig(data)"><i class="el-icon-delete"></i></el-button>
</el-col> -->
</el-form-item>
<el-form-item style="margin-left: 10px;" label="距离等级" :prop="'configItems.' + index + '.nearelectric'">
<el-col :span="20">
<el-select v-model="data.nearelectric" placeholder="请选择距离等级" class="filter-item" style="width: 101%"
clearable>
<el-option v-for="item in nearelectricArr" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-col>
<!-- <el-col :span="5" style="margin-left: 10px;">
<el-button type="danger" plain
@click.prevent="removeConfig(data)"><i class="el-icon-delete"></i></el-button>
</el-col> -->
</el-form-item>
<!-- <hr> -->
</div>
</div>
@ -124,14 +138,49 @@
</div>
</template>
<script>
import { getDzWarnList, getJdList, getLineStats, getVoltageLevelByLineStats, configJdDevice, getConfigJdDevice, getJdWarnList } from "@/api/construction/manage/hoistManage.js";
import { getDzWarnList, getJdList, getLineStats, getVoltageLevelByLineStats, configJdDevice, getConfigJdDevice, getJdWarnList,closeJdWarn } from "@/api/construction/manage/hoistManage.js";
import dz_dev_img from "@/assets/images/dz_dev.png";
import dz_dev_warn_img from "@/assets/images/test.jpg";
import jd_dev_img from "@/assets/images/jd_dev.png";
const nearelectricArr = [
{
id: '0',
name: '<10KV'
},
{
id: '1',
name: '20-35KV'
},
{
id: '2',
name: '66-110KV'
},
{
id: '3',
name: '220KV'
},
{
id: '4',
name: '330KV'
},
{
id: '5',
name: '500KV'
},
{
id: '6',
name: '750KV'
},
{
id: '7',
name: '1000KV'
}
]
export default {
name: 'hoistManage',
data() {
return {
nearelectricArr: nearelectricArr,
keyWord: '',
dz_dev_img: dz_dev_img,
dz_dev_warn_img: dz_dev_warn_img,
@ -158,6 +207,7 @@ export default {
battery2: require('../../../../assets/images/battery2.png'),
battery3: require('../../../../assets/images/battery3.png'),
config: require('../../../../assets/images/config.png'),
close: require('../../../../assets/images/close_img.png'),
//
tableData: [],
//
@ -184,6 +234,10 @@ export default {
pageNum: 0,
pageSize: 10
},
//
intervalId: null,
//
checkDevCode: null
};
},
created() {
@ -195,8 +249,33 @@ export default {
this.$refs.iframePage.src = this.htmlContent;
this.busy = false;
})
this.startRefresh();
},
destroyed() {
this.stopRefresh();
},
methods: {
startRefresh() {
// 3
this.intervalId = setInterval(this.refreshData, 1000 * 60 * 3);
},
stopRefresh() {
if (this.intervalId) {
clearInterval(this.intervalId);
this.intervalId = null;
}
},
refreshData() {
//
this.tableData.splice(0);
this.queryParams.pageNum = 0;
this.isHasData = true;
this.loadWarnInfoData();
//
this.devArr.splice(0);
this.isShow = false;
this.laodDzWarnList();
},
/* 吊装设备点击赋值 */
getStyle(item) {
if (item.status === "check") {
@ -208,11 +287,18 @@ export default {
}
},
/* 向吊装视频传递参数 */
sendParams(devCode, index) {
sendParams(devCode, warnPosition, index) {
this.checkDevCode = devCode;
this.devArr.forEach(item => {
item.status = 'nocheck'
})
this.devArr[index].status = 'check'
//
if (warnPosition) {
this.dz_dev_warn_img = require('../../../../assets/gif/' + warnPosition + '.gif');
} else {
this.dz_dev_warn_img = dz_dev_warn_img;
}
// dom
this.$forceUpdate();
this.$refs.iframePage.contentWindow.postMessage({ devCode: devCode }, '*');
@ -230,6 +316,21 @@ export default {
} else {
this.isShow = false;
}
if (this.checkDevCode) {
this.devArr.forEach((item, index) => {
if (item.devCode === this.checkDevCode) {
this.devArr[index].status = 'check'
//
if (warnPosition) {
this.dz_dev_warn_img = require('../../../../assets/gif/' + warnPosition + '.gif');
} else {
this.dz_dev_warn_img = dz_dev_warn_img;
}
}
})
// dom
this.$forceUpdate();
}
}).catch(() => { })
},
/* 加载近电感应设备 */
@ -262,8 +363,8 @@ export default {
})
} else {
this.isHasData = false;
if(this.queryParams.pageNum === 1){
this.isShow3 = false;
if (this.queryParams.pageNum === 1) {
this.isShow3 = false;
}
}
this.loading = false;
@ -299,7 +400,7 @@ export default {
if (this.form.configItems.length === 0) {
this.form.configItems.push({
configType: this.configTypeArr[0].id,
voltageLevel: this.jlArr[0].id,
voltageLevel: null,
distance: 1,
key: Date.now()
});
@ -332,7 +433,7 @@ export default {
data.forEach((item, index) => {
this.form.configItems.push({
configType: item.configType,
voltageLevel: item.voltageLevel,
nearelectric: item.voltageLevel,
distance: item.distance,
key: Date.now()
})
@ -463,7 +564,19 @@ export default {
//
provingDialogConfirm() {
this.dialogVisible = false;
}
},
//
closeWarn(devId, devCode) {
let obj = {
devCode: devCode,
}
this.$modal.confirm('是否确认关闭报警?').then(function () {
return closeJdWarn(obj);
}).then(() => {
this.getList();
this.$modal.msgSuccess("关闭成功");
}).catch(() => { });
},
}
};
</script>
@ -623,17 +736,17 @@ export default {
}
.jd-dev-elec {
width: 100px;
width: 70px;
height: 100%;
align-items: center;
justify-content: flex-start;
}
.jd-dev-img {
width: 30px;
width: 60px;
height: 100%;
align-items: center;
justify-content: center;
justify-content: space-evenly;
cursor: pointer;
}

View File

@ -1,7 +1,10 @@
<template>
<div class="app-container" style="background-color: #F9F9F9;">
<el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
<el-tab-pane v-for="(item, index) in tabs" :key="index" :label="item.label" :name="item.name" lazy>
<!-- <el-tab-pane v-for="(item, index) in tabs" :key="index" :label="item.label" :name="item.name" lazy> -->
<el-tab-pane v-for="(item, index) in tabs" :key="index" :name="item.name" lazy>
<span slot="label"><img v-if="item.label === '人员管控' && item.isWarn === 1"
src="../../../assets/images/warn_img.png">{{ item.label }}</span>
<component :is=item.content v-if="item.flag"></component>
</el-tab-pane>
</el-tabs>
@ -13,6 +16,7 @@
import realTimeManage from './realTimeManage/realTimeManage.vue';
import personManage from './personManage/personManage.vue';
import hoistManage from './hoistManage/hoistManage.vue';
import { getPersonControlIsWarn } from "@/api/construction/index.js";
export default {
name: "manage",
components: {
@ -25,15 +29,35 @@ export default {
activeName: 'realTimeManage',
currentTab: 'realTimeManage', //
tabs: [
{ name: 'realTimeManage', label: '实时监控', content: 'realTimeManage', flag: true },
{ name: 'personManage', label: '人员管控', content: 'personManage', flag: false },
{ name: 'hoistManage', label: '吊装管控', content: 'hoistManage', flag: false },
{ name: 'realTimeManage', label: '实时监控', isWarn: 0, content: 'realTimeManage', flag: true },
{ name: 'personManage', label: '人员管控', isWarn: 1, content: 'personManage', flag: false },
{ name: 'hoistManage', label: '吊装管控', isWarn: 0, content: 'hoistManage', flag: false },
],
};
},
created() {
this.loadPersonControlIsWarn();
},
mounted() {
this.startRefresh();
},
destroyed() {
this.stopRefresh();
},
methods: {
startRefresh() {
// 2
this.intervalId = setInterval(this.refreshData, 1000 * 60 * 2);
},
stopRefresh() {
if (this.intervalId) {
clearInterval(this.intervalId);
this.intervalId = null;
}
},
refreshData() {
this.loadPersonControlIsWarn();
},
handleClick(tab, event) {
const arr = this.tabs
for (var i = 0; i < arr.length; i++) {
@ -44,7 +68,16 @@ export default {
}
}
this.tabs = arr
}
},
//
loadPersonControlIsWarn() {
getPersonControlIsWarn().then(res => {
this.tabs[1].isWarn = res.data;
this.$forceUpdate();
}).catch(res => {
});
},
}
};
</script>

View File

@ -16,7 +16,7 @@
</div>
<div class="content">
<div id="searchBox" class="layout" v-if="isShowHistoryGj">
<el-button type="primary" plain @click="clsoeHistoryGj" style="margin-right: 10px;">返回</el-button>
<el-button type="primary" plain @click="closeHistoryGj" style="margin-right: 10px;">返回</el-button>
<el-date-picker v-model="chooseDate" @change="loadHistoryGj" :editable="false" :clearable="false" type="date"
format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="选择日期">
</el-date-picker>
@ -32,7 +32,7 @@
</div>
<!-- 班组 -->
<div id="team-box" v-if="isTeam">
<h4>智能安全帽</h4>
<!-- <h4>智能安全帽</h4>
<el-table :data="hatTable" style="width: 100%" max-height="400">
<el-table-column prop="name" label="姓名" align="center">
</el-table-column>
@ -43,8 +43,8 @@
<img style="cursor: pointer;margin-right: 10px;" title="对讲" src="../../../../assets/person_img/talk.png">
<img style="cursor: pointer;" title="视频" src="../../../../assets/person_img/video.png">
</template>
</el-table-column>
</el-table>
</el-table-column>
</el-table> -->
</div>
<!-- 人员 -->
<div id="person-box" v-if="isPerson">
@ -59,7 +59,11 @@
</div>
<div id="sh-info" class="layout">
<div class="layout">
<div class="layout"><img src="../../../../assets/person_img/sh.png">{{ person.sh.name }}</div>
<div class="layout"><img src="../../../../assets/person_img/sh.png">
<el-tooltip class="item" effect="dark" :content="person.sh.name" placement="top-start">
<span>{{ person.sh.name.substr(0,16) }}...</span>
</el-tooltip>
</div>
<div class="layout info" v-if="person.sh.elec == 100">
<img width="30px" height="16px" src="../../../../assets/person_img/elec.png">
{{ person.sh.elec }}%
@ -78,7 +82,7 @@
src="../../../../assets/person_img/position_nowarn.png">正常
</div>
<div class="layout" v-if="person.sh.isWarn == 1"><img
src="../../../../assets/person_img/position_warn.png">异常
src="../../../../assets/person_img/position_warn.png"><span style="color: red;">异常</span>
</div>
<div class="layout info"><img src="../../../../assets/person_img/temp.png">{{ person.sh.temp }}</div>
</div>
@ -88,12 +92,12 @@
<div class="layout info"><img src="../../../../assets/person_img/bloodPressure.png">{{
person.sh.bloodPressure }}</div>
</div>
<div class="layout" v-if="person.hasSafetyHat">
<!-- <div class="layout" v-if="person.hasSafetyHat">
<div class="layout"><img src="../../../../assets/person_img/hat.png">{{ person.hat.name }}
</div>
<div class="layout info2"><img src="../../../../assets/person_img/talk.png" title="对讲"></div>
<div class="layout info2"><img src="../../../../assets/person_img/video.png" title="播放"></div>
</div>
</div> -->
<div class="layout">
<div class="layout"><img src="../../../../assets/person_img/mj.png">{{ person.sh.mjCode }}</div>
</div>
@ -182,6 +186,7 @@ import no_warn2 from "@/assets/svg/no_warn2.svg";
import warn from "@/assets/svg/warn.svg";
import start from "@/assets/person_img/start.png";
import end from "@/assets/person_img/end.png";
import { number } from "echarts";
export default {
name: 'personManage',
/* 人员树前端筛选 */
@ -288,17 +293,7 @@ export default {
//
warnTable: [],
//
hatTable: [
{
name: '张三',
devName: '1号智能安全帽'
},
{
name: '张三',
devName: '1号智能安全帽'
}
],
hatTable: [],
//
dialogVisible1: false,
dialogVisible2: false,
@ -307,13 +302,77 @@ export default {
//
teamTreeData: [],
//
checkTeamId: null
checkTeamId: null,
//
intervalId: null,
// ID
checkNodeId: null,
//
checkNodeLevel: null,
// ID
checkNodeTowerId: null,
//
checkPersonObj: {}
};
},
created() {
this.getPersonsTree();
},
mounted() {
this.startRefresh();
},
destroyed() {
this.stopRefresh();
},
methods: {
startRefresh() {
// 3
this.intervalId = setInterval(this.refreshData, 1000 * 60 * 3);
},
stopRefresh() {
if (this.intervalId) {
clearInterval(this.intervalId);
this.intervalId = null;
}
},
async refreshData() {
// this.$message('');
//
this.treeData.splice(0);
this.idArr.splice(0);
await this.getPersonsTree();
if (this.filterText) {
this.$refs.tree.filter(this.filterText);
}
if (this.checkNodeId) {
this.$refs.tree.setCurrentKey(this.checkNodeId);
if (this.checkNodeLevel === 4) {
this.idArr.push(this.checkNodeId);
}
if (this.checkNodeLevel === 2) { //
this.loadWorkInfo();
} else if (this.checkNodeLevel === 3) { //
this.removeOverlay();
const obj = {
'id': this.checkNodeTowerId,
'teamId': this.checkTeamId
}
this.loadPersonsInfo(obj, null);
} else if (this.checkNodeLevel === 4) { //
if (!this.isShowHistoryGj) {
this.removeOverlay();
const obj = {
'id': this.checkNodeTowerId,
'teamId': this.checkTeamId
}
this.loadPersonsInfo(obj, this.checkPersonObj);
} else {
this.removeOverlay();
this.loadHistoryGj();
}
}
}
},
//
getTodayDate() {
const today = new Date();
@ -332,8 +391,8 @@ export default {
}).catch((res) => { })
},
/* 加载人员树 */
getPersonsTree() {
personsTree().then(res => {
async getPersonsTree() {
await personsTree().then(res => {
const treeData = res.data;
if (treeData && treeData.length > 0) {
this.treeData = treeData
@ -352,14 +411,6 @@ export default {
},
/* 人员树过滤 */
filterNode(value, data, node) {
if (!value) {
if (node.level == 1 || node.level == 2) {
node.expanded = true
} else {
node.expanded = false
}
return true
}
//
let val = value.toLowerCase()
return this.chooseNode(val, data, node)
@ -407,7 +458,6 @@ export default {
/* 加载抽检班组人员树 */
getTeamPersonByTower(params) {
teamPersonByTower(params).then(res => {
console.log(res);
const teamTreeData = res.data;
if (teamTreeData && teamTreeData.length > 0) {
this.teamTreeData = teamTreeData
@ -416,6 +466,7 @@ export default {
this.idArr2.push(item.id);
})
}
this.dialogVisible1 = true;
}).catch(res => {
});
@ -430,18 +481,22 @@ export default {
} else {
this.filterText2 = '';
this.getTeamPersonByTower({ 'id': this.towerId });
this.dialogVisible1 = true;
}
},
//
getCheckConfigDetail() {
getCheckConfig().then((res) => {
async getCheckConfigDetail() {
let loading = this.$loading({
lock: true,
text: "数据加载中,请稍候...",
background: 'rgba(0,0,0,0.2)'
})
await getCheckConfig().then((res) => {
if (res.data && res.data.length > 0) {
const data = res.data;
const configType = data[0].configType + '';
if (configType === '1') {
data.forEach((item, index) => {
this.form.times.push({ value: item.time, key: Date.now() })
this.form.times.push({ value: item.time, key: Date.now() + index })
})
} else if (configType === '2') {
this.form.timeNum = parseInt(res.data[0].time);
@ -450,9 +505,11 @@ export default {
} else {
this.form.configType = '1';
}
}).catch((res) => {
})
loading.close();
this.dialogVisible2 = true;
},
// -
@ -532,8 +589,8 @@ export default {
}).catch((res) => { })
},
//
loadPersonDetail(params) {
getPersonDetail(params).then((res) => {
async loadPersonDetail(params) {
await getPersonDetail(params).then((res) => {
const data = res.data;
if (data && data.vo) {
const obj = data.vo;
@ -558,13 +615,13 @@ export default {
}).catch((res) => { })
},
//
loadHistoryGj() {
async loadHistoryGj() {
// ID
let obj = {
'id': this.person.sh.devId,
'startTime': this.chooseDate
};
getHistoryGj(obj).then((res) => {
await getHistoryGj(obj).then((res) => {
const data = res.data;
if (data && data.length > 0) {
this.gjArr = data;
@ -590,7 +647,12 @@ export default {
},
//
handleNodeClick(data, node, item) {
this.checkNodeId = data.id;
this.checkNodeLevel = data.level;
this.towerId = undefined;
this.checkTeamId = null;
this.checkNodeTowerId = null;
this.checkPersonObj = {};
if (node.level === 2) {
this.removeOverlay();
// towerId,
@ -614,6 +676,7 @@ export default {
'teamId': teamId
}
this.checkTeamId = teamId;
this.checkNodeTowerId = towerId;
this.loadPersonsInfo(obj, null);
} else if (node.level === 4) {
this.isTower = false;
@ -628,7 +691,18 @@ export default {
'teamId': teamId
}
this.checkTeamId = teamId;
this.loadPersonsInfo(obj, data);
this.checkNodeTowerId = towerId;
this.checkPersonObj = _.cloneDeep(data);
if (this.isShowHistoryGj) {
//
const obj = {
'id': data.type === 0 ? parseInt(data.id.replace('zs-', '')) : parseInt(data.id.replace('ls-', '')),
'type': data.type
}
this.relaodHistoryGj(obj);
} else {
this.loadPersonsInfo(obj, data);
}
} else {
//
this.clickMarker(data);
@ -640,6 +714,11 @@ export default {
this.removeOverlay();
}
},
async relaodHistoryGj(obj){
this.removeOverlay();
await this.loadPersonDetail(obj);
await this.loadHistoryGj();
},
//
removeOverlay() {
this.map.clearOverlays();
@ -650,6 +729,17 @@ export default {
},
//
clickMarker(item) {
this.checkNodeLevel = 4;
this.checkPersonObj = item;
let userId = null;
if (new RegExp(/^[0-9]*$/).test(item.id)) {
userId = item.id;
this.$refs.tree.setCurrentKey(item.type === 0 ? 'zs-' + item.id : 'ls-' + item.id);
this.checkNodeId = item.type === 0 ? 'zs-' + item.id : 'ls-' + item.id;
} else {
userId = item.type === 0 ? parseInt(item.id.replace('zs-', '')) : parseInt(item.id.replace('ls-', ''))
this.checkNodeId = item.id;
}
const allOverlay = this.map.getOverlays();
for (let index = 0; index < allOverlay.length; index++) {
let overlay = allOverlay[index];
@ -666,7 +756,7 @@ export default {
let overlay = allOverlay[index];
//
const flag = this.isOverlayPoint(overlay);
if (flag && ("marker-" + item.type + '-' + item.id === overlay.id)) {
if (flag && ("marker-" + item.type + '-' + userId === overlay.id)) {
if (item.isWarn === 0) {
let myIcon = new BMap.Icon(no_warn2, new BMap.Size(50, 50))
myIcon.setImageSize(new BMap.Size(50, 50));
@ -680,7 +770,7 @@ export default {
this.isPerson = true;
// idID type: 0 1
const obj = {
'id': item.id,
'id': userId,
'type': item.type
}
this.loadPersonDetail(obj);
@ -693,7 +783,6 @@ export default {
},
/* 添加人员定位的覆盖物 */
addPersonMarker(item) {
console.log(item);
let point = new BMap.Point(item.lon, item.lat)
let marker = "", myIcon = "";
if (item.isWarn === 0) {
@ -711,23 +800,30 @@ export default {
marker.isWarn = item.isWarn;
this.map.addOverlay(marker);
//
marker.addEventListener("click", () => { this.clickMarker(item) });
},
//
openHistoryGj() {
this.removeOverlay();
this.loadHistoryGj();
this.isShowHistoryGj = true;
if (!this.isShowHistoryGj) {
this.removeOverlay();
this.loadHistoryGj();
this.isShowHistoryGj = true;
}
},
//
clsoeHistoryGj() {
closeHistoryGj() {
this.removeOverlay();
this.isShowHistoryGj = false;
const obj = {
'id': this.id,
'teamId': this.teamId
'id': this.checkNodeTowerId,
'teamId': this.checkTeamId
}
if (Object.keys(this.checkPersonObj).length === 0) {
this.loadPersonsInfo(obj, null);
} else {
this.loadPersonsInfo(obj, this.checkPersonObj);
}
this.loadPersonsInfo(obj, null);
},
//
loadGj() {
@ -760,8 +856,12 @@ export default {
},
//icon
renderContent(h, { node, data }) {
let isTeamLeader = data.isTeamLeader, type = data.type, isWarn = data.isWarn, style = '';
if (isWarn === 1) {
style = 'warnColor'
}
// 使
let icon, span = <span>{node.label}</span>, isTeamLeader = data.isTeamLeader, type = data.type;
let icon, span = <span class={style}>{node.label}</span>;
if (node.level === 1) {
icon = 'pro_icon';
} else if (node.level === 2) {
@ -770,10 +870,13 @@ export default {
icon = 'team_nocheck_icon';
} else if (node.level === 4 && isTeamLeader === 1) {
icon = '';
span = <span>{node.label} <el-tag size="mini">班组长</el-tag></span>;
span = <span class={style}>{node.label}<el-tag size="mini">班组长</el-tag></span>;
} else if (node.level === 4 && type === 1) {
icon = '';
span = <span>{node.label} <el-tag size="mini">临时人员</el-tag></span>;
span = <span class={style}>{node.label} <el-tag size="mini">临时人员</el-tag></span>;
} else if (node.level === 4 && isTeamLeader === 0 && type === 0) {
icon = '';
span = <span class={style}>{node.label}</span>;
}
return (
<span class="custom-tree-node">
@ -820,7 +923,7 @@ export default {
checkedNodes.forEach(item => {
console.error(item.parentId);
if (item.parentId !== -1 && item.parentId !== 0) {
checkArr.push({ "userId": item.id, "userType": item.userType, "devCode": item.devCode, "shCode": item.shCode })
checkArr.push({ "userId": parseInt(item.id.replace('team-', '')), "userType": item.userType, "devCode": item.devCode, "shCode": item.shCode })
}
});
if (checkArr.length == 0) {
@ -832,6 +935,8 @@ export default {
const obj = {
'spotCheckList': checkArr
}
console.log(obj);
spotCheck(obj).then((res) => {
this.$modal.msgSuccess(res.msg);
this.dialogVisible1 = false;
@ -1088,4 +1193,8 @@ export default {
::v-deep .team_nocheck_icon {
background-image: url("../../../../assets/images/team_nocheck_icon.png") !important;
}
::v-deep .warnColor {
color: red;
}
</style>

View File

@ -76,7 +76,7 @@
</div>
<!-- 违章识别 -->
<div class="vio-box">
<el-carousel height="200px" indicator-position="outside" :interval="100000" @change="loadVioInfos"
<el-carousel height="200px" indicator-position="outside" :interval="10000" @change="loadVioInfos"
v-if="vioArr.length > 0">
<el-carousel-item v-for="(itemArr, arrIndex) in vioArr" :key="arrIndex">
<div class="vio-box-info layout">
@ -108,7 +108,7 @@
<h4>预警信息</h4>
<div class="infinite-list-wrapper" v-if="isShow3">
<ul class="list" v-infinite-scroll="loadWarnInfoData" infinite-scroll-disabled="busy"
infinite-scroll-distance="50">
infinite-scroll-distance="0">
<li v-for="(item, index) in warnInfoArr" :key="index" class="warn-li layout">
<span class="layout">{{ item.devTypeName }}</span>
<span class="layout">{{ item.devName }}</span>
@ -164,7 +164,11 @@ export default {
//
boxNum: 1,//14
boxIndex:1,//
classStyle: 'ball-content'
classStyle: 'ball-content',
//
intervalId: null,
// ID
checkNodeId:null
};
},
created() {
@ -175,11 +179,45 @@ export default {
this.$nextTick(() => {
this.busy = false;
});
this.startRefresh();
},
destroyed() {
this.stopRefresh();
},
methods: {
startRefresh() {
// 5
this.intervalId = setInterval(this.refreshData, 1000 * 60 * 5);
},
stopRefresh() {
if (this.intervalId) {
clearInterval(this.intervalId);
this.intervalId = null;
}
},
async refreshData() {
//
this.treeData.splice(0);
this.idArr.splice(0);
await this.laodBallDeviceLists();
if(this.filterText){
this.$refs.tree.filter(this.filterText);
}
if(this.checkNodeId){
this.$refs.tree.setCurrentKey(this.checkNodeId);
}
//
this.warnInfoArr.splice(0);
this.queryParams.pageNum = 0;
this.isHasData = true;
this.loadWarnInfoData();
//
this.vioArr.splice(0);
this.loadBallWarnLists();
},
/* 加载球机树 */
laodBallDeviceLists() {
getBallDeviceLists().then(res => {
async laodBallDeviceLists() {
await getBallDeviceLists().then(res => {
const treeData = res.data;
if (treeData && treeData.length > 0) {
this.treeData = treeData
@ -293,7 +331,7 @@ export default {
},
//
handleNodeClick(data, node, item) {//
console.log(node)
this.checkNodeId = data.id;
if (node.level === 2) {
if(this.boxNum==1){
this.$refs[`monitor`+1].closeVideo()