施工管控

This commit is contained in:
cwchen 2024-08-16 18:10:04 +08:00
parent 988aa969bf
commit 42ceaaf4e0
9 changed files with 406 additions and 102 deletions

View File

@ -6,4 +6,58 @@ export function getDzWarnList(query) {
method: 'get', method: 'get',
params: query params: query
}) })
}
/* 近电感应设备列表 */
export function getJdList(query) {
return request({
url: '/bracelet/consControl/getJdList',
method: 'get',
params: query
})
}
/* 线路属性 */
export function getLineStats(query) {
return request({
url: '/system/select/getLineStats',
method: 'get',
params: query
})
}
/* 线路属性的电压等级 */
export function getVoltageLevelByLineStats(query) {
return request({
url: '/system/select/getVoltageLevelByLineStats',
method: 'get',
params: query
})
}
/* 添加近电感应配置 */
export function configJdDevice(data) {
return request({
url: '/bracelet/consControl/configJdDevice',
method: 'post',
data:data
})
}
/* 查询近电感应设备配置 */
export function getConfigJdDevice(query) {
return request({
url: '/bracelet/consControl/getConfigJdDevice',
method: 'get',
params: query
})
}
/* 近电感应设备预警信息 */
export function getJdWarnList(query) {
return request({
url: '/bracelet/consControl/getJdWarnList',
method: 'get',
params: query
})
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -3,7 +3,7 @@
<div class="left"> <div class="left">
<div class="layout"> <div class="layout">
<el-input placeholder="请输入关键字" prefix-icon="el-icon-search" v-model="keyWord" maxlength="30" <el-input placeholder="请输入关键字" prefix-icon="el-icon-search" v-model="keyWord" maxlength="30"
style="margin: 10px 10px 10px 0;width: 80%;" @keydown="searchData"></el-input> style="margin: 10px 10px 10px 0;width: 80%;" @keydown.enter="searchData"></el-input>
<el-button type="primary" plain @click="searchData">查询</el-button> <el-button type="primary" plain @click="searchData">查询</el-button>
</div> </div>
<div class="dev-box" v-if="isShow"> <div class="dev-box" v-if="isShow">
@ -19,7 +19,7 @@
</div> </div>
</div> </div>
<div class="no-data-box layout" v-if="!isShow"> <div class="no-data-box layout" v-if="!isShow">
<div>暂无数据</div> <el-empty description="暂无数据"></el-empty>
</div> </div>
</div> </div>
<div class="center-1"> <div class="center-1">
@ -44,124 +44,137 @@
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<div class="dev-config"></div> <div class="dev-config layout" v-if="isShow2">
<div class="warn-info"></div> <div class="jd-dev-info layout" v-for="item in jdDevArr" :key="item.devId">
</div> <div class="jd-dev-detail layout">
<img :src="jd_dev_img" alt="近电感应设备" style="margin-right: 5px;">
<el-dialog title="近电感应配置" :visible.sync="dialogVisible" :append-to-body="true" :draggable="true" <span>{{ item.devName }}</span>
:destroy-on-close="true" width="40%" custom-class="my-dialog1"> </div>
<div style="width: 100%;height: 50vh;overflow: auto;"> <div class="jd-dev-elec layout">
<div v-for="(item, index) in hoistSetUpData" style="width: 100%;height: 60%;"> <img :src="battery1" alt="电量" v-if="parseFloat(item.electricQuantity) == 100">
<div>配置{{ index + 1 }}</div> <img :src="battery2" alt="电量"
<el-form label-width="120px"> v-if="parseFloat(item.electricQuantity) < 100 && parseFloat(item.electricQuantity) >= 20">
<el-form-item label="线路属性:"> <img :src="battery3" alt="电量" v-if="parseFloat(item.electricQuantity) < 20">
<el-radio-group v-model="item.lineType" class="ml-4" @change="lineTypeRadioChange(item, index)" <span style="margin-left: 5px;">{{ item.electricQuantity }}%</span>
style="margin-top: 10px;"> </div>
<el-radio label="1" size="large">交流</el-radio> <div class="jd-dev-img layout"><img :src="config" alt="配置" @click.stop="clickJdDev(item.devId)"></div>
<el-radio label="2" size="large">直流</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="电压等级:">
<el-radio-group v-model="item.level" class="ml-4" @change="levelRadioChange(item, index)"
style="margin-top: 10px;">
<el-radio label="1" size="large">10kV</el-radio>
<el-radio label="2" size="large">20~35kV</el-radio>
<el-radio label="3" size="large">66~110kV</el-radio>
<el-radio label="4" size="large">220kV</el-radio>
<el-radio label="5" size="large">330kV</el-radio>
<el-radio label="6" size="large">500kV</el-radio>
<el-radio label="7" size="large">700kV</el-radio>
<el-radio label="8" size="large">1000kV</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="报警距离:">
<el-input v-model="item.distance" type="number" placeholder="请输入" style="width: 25%;">
</el-input>&nbsp;
</el-form-item>
</el-form>
<el-button @click="delHoistSetUp(index)" v-if="index > 0" style="margin-left: 80%;">删除配置</el-button>
</div> </div>
</div> </div>
<template #footer> <div class="no-data-box layout" v-if="!isShow2">
<span class="dialog-footer"> <el-empty description="暂无数据"></el-empty>
<el-button type="primary" @click="addHoistSetUp">添加配置</el-button> </div>
<el-button @click="provingDialogClose">取消</el-button> <div class="warn-info">
<el-button type="primary" @click="provingDialogConfirm">确定</el-button> <el-table :data="tableData" style="width: 100%" max-height="400">
</span> <el-table-column prop="devName" label="设备名称" align="center">
</template> </el-table-column>
<el-table-column prop="warnTime" label="告警时间" align="center">
</el-table-column>
<el-table-column prop="warnContent" label="告警内容" align="center">
</el-table-column>
</el-table>
</div>
</div>
<el-dialog title="近电感应配置" :visible.sync="dialogVisible" :append-to-body="true" width="700px"
@close="closeConfigItem">
<el-form ref="form" :model="form" :rules="rules" v-loading="loading" element-loading-text="数据加载中请稍候..."
element-loading-spinner="el-icon-loading">
<div class="form-box">
<div v-for="(data, index) in form.configItems" :key="data.key">
<h3>配置{{ index + 1 }}</h3>
<el-form-item label="线路属性" :key="data.key">
<el-radio-group v-model="data.configType">
<el-radio v-for="item in configTypeArr" :label="item.id" :key="item.id"
@change="chooseConfigType(index, data.configType)">{{ item.name }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="电压等级">
<el-radio-group v-model="data.voltageLevel" v-if="data.configType === 'communication'">
<el-radio v-for="item in jlArr" :label="item.id" :key="item.id">{{ item.name }}</el-radio>
</el-radio-group>
<el-radio-group v-model="data.voltageLevel" v-if="data.configType === 'direct_current'">
<el-radio v-for="item in zlArr" :label="item.id" :key="item.id">{{ item.name }}</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="报警距离" :prop="'configItems.' + index + '.distance'" :rules="[
{
required: true, message: '报警距离不能为空', trigger: 'blur'
},
{
pattern: /^(?:100(?:\.0{1,2})?|[1-9][0-9]?(?:\.\d{1,2})?|1(?:\.\d{1,2})?)$/,
message: '距离为1-100米区间内,最多保留两位小数',
trigger: 'blur'
}
]">
<el-col :span="12">
<el-input v-model="data.distance"></el-input>
</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>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确定</el-button>
<el-button type="primary" @click="addConfigItem">添加配置</el-button>
<el-button @click="closeConfigItem">取消</el-button>
</div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getDzWarnList } from "@/api/construction/manage/hoistManage.js"; import { getDzWarnList, getJdList, getLineStats, getVoltageLevelByLineStats, configJdDevice, getConfigJdDevice,getJdWarnList } from "@/api/construction/manage/hoistManage.js";
import dz_dev_img from "@/assets/images/dz_dev.png"; import dz_dev_img from "@/assets/images/dz_dev.png";
import dz_dev_warn_img from "@/assets/images/test.jpg"; import dz_dev_warn_img from "@/assets/images/test.jpg";
import jd_dev_img from "@/assets/images/jd_dev.png";
export default { export default {
name: 'hoistManage', name: 'hoistManage',
data() { data() {
return { return {
keyWord: '', keyWord: '',
//
dz_dev_img: dz_dev_img, dz_dev_img: dz_dev_img,
dz_dev_warn_img: dz_dev_warn_img, dz_dev_warn_img: dz_dev_warn_img,
jd_dev_img: jd_dev_img,
// //
devArr: [], devArr: [],
//
jdDevArr: [],
// //
isShow: true, isShow: false,
//
isShow2: false,
// 线
configTypeArr: [],
//
jlArr: [],
//
zlArr: [],
loading: false,
// //
batterys: { battery1: require('../../../../assets/images/battery1.png'),
battery1: require('../../../../assets/images/battery1.png'), battery2: require('../../../../assets/images/battery2.png'),
battery2: require('../../../../assets/images/battery2.png'), battery3: require('../../../../assets/images/battery3.png'),
battery3: require('../../../../assets/images/battery3.png'), config: require('../../../../assets/images/config.png'),
},
//
vibeDeviceData: [
{
name: '近电感应设备DX-J431',
battery: 90
},
{
name: '近电感应设备DX-J431',
battery: 30
}
],
// //
tableData: [ tableData: [],
{
deviceName: '近电感应设备DX-J431',
time: '2024-03-03 13:26',
reason: '低于安全施工sss距离'
},
{
deviceName: '近电感应设备DX-J431',
time: '2024-03-03 13:26',
reason: '低于安全施工sss距离'
},
{
deviceName: '近电感应设备DX-J431',
time: '2024-03-03 13:26',
reason: '低于安全施工sss距离'
},
],
// //
dialogVisible: false, dialogVisible: false,
// //
hoistSetUpData: [ form: {
{ devId: null,
lineType: '1', configItems: [],
level: '1', },
distance: 10 //
} rules: {},
]
}; };
}, },
created() { created() {
this.laodDzWarnList(); this.laodDzWarnList();
this.loadJdList();
this.loadJdWarnList();
}, },
methods: { methods: {
/* 加载吊装预警设备列表 */ /* 加载吊装预警设备列表 */
@ -179,12 +192,173 @@ export default {
} }
}).catch(() => { }) }).catch(() => { })
}, },
/* 加载近电感应设备 */
loadJdList() {
let params = {};
getJdList(params).then((res) => {
const data = res.data
this.jdDevArr = data;
if (data && data.length > 0) {
this.isShow2 = true;
} else {
this.isShow2 = false;
}
}).catch(() => { })
},
/* 加载近电感应设备预警信息 */
loadJdWarnList() {
let params = {};
getJdWarnList(params).then((res) => {
const data = res.data
this.tableData = data;
}).catch(() => { })
},
/* 加载线路属性 */
async loadLineStats() {
this.loading = true;
let params = {};
await getLineStats(params).then((res) => {
const data = res.data
this.configTypeArr = data;
}).catch(() => { })
await this.loadVoltageLevelByLineStats(this.configTypeArr[0].id);
await this.loadVoltageLevelByLineStats(this.configTypeArr[1].id);
await this.loadConfigJdDevice();
if (this.form.configItems.length === 0) {
this.form.configItems.push({
configType: this.configTypeArr[0].id,
voltageLevel: this.jlArr[0].id,
distance: 1,
key: Date.now()
});
}
this.loading = false;
// loading.close();
},
/* 线路属性的电压等级 */
async loadVoltageLevelByLineStats(param) {
let params = {
id: param
};
await getVoltageLevelByLineStats(params).then((res) => {
const data = res.data
if (param === 'communication') { //
this.jlArr = data;
} else if (param === 'direct_current') { //
this.zlArr = data;
}
}).catch(() => { })
},
/* 加载近电感应设备配置 */
async loadConfigJdDevice() {
const params = {
'devId': this.form.devId
}
await getConfigJdDevice(params).then((res) => {
const data = res.data
data.forEach((item, index) => {
this.form.configItems.push({
configType: item.configType,
voltageLevel: item.voltageLevel,
distance: item.distance,
key: Date.now()
})
})
}).catch(() => { })
},
searchData() { searchData() {
this.laodDzWarnList(); this.laodDzWarnList();
}, },
/* 吊装设备点击事件 */ /* 吊装设备点击事件 */
clickDev(id) { clickDev(id) {
},
/* 近电感应设备点击事件 */
clickJdDev(id) {
this.form.devId = id;
this.loadLineStats();
this.dialogVisible = true;
},
//
addConfigItem() {
if (this.form.configItems.length >= 10) {
return this.$message({
message: '最多添加十个配置',
type: 'warning'
});
}
this.form.configItems.push({
configType: this.configTypeArr[0].id,
voltageLevel: this.jlArr[0].id,
distance: 1,
key: Date.now()
});
},
//
removeConfig(item) {
if (this.form.configItems.length === 1) {
return this.$message({
message: '最少保留一个配置',
type: 'warning'
});
}
var index = this.form.configItems.indexOf(item)
if (index !== -1) {
this.form.configItems.splice(index, 1)
}
},
//
closeConfigItem() {
this.form.configItems.splice(0);
this.form.devId = null;
this.dialogVisible = false;
},
// 线
chooseConfigType(index, val) {
if (val === 'communication') { //
this.form.configItems[index].voltageLevel = this.jlArr[0].id
} else if (val === 'direct_current') { //
this.form.configItems[index].voltageLevel = this.zlArr[0].id
}
},
//
submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
const flag = this.hasDuplicates();
if (flag) {
return this.$message({
message: '存在相同配置',
type: 'warning'
});
}
const obj = {
'devId': this.form.devId,
'configItems': this.form.configItems
}
configJdDevice(obj).then((res) => {
this.$modal.msgSuccess(res.msg);
this.closeConfigItem();
}).catch((res) => { });
}
});
},
//
hasDuplicates() {
const configTypes = new Set();
const voltageLevels = new Set();
const distances = new Set();
for (const item of this.form.configItems) {
if (configTypes.has(item.configType) && voltageLevels.has(item.voltageLevel) && distances.has(item.distance)) {
return true;
}
configTypes.add(item.configType);
voltageLevels.add(item.voltageLevel);
distances.add(item.distance);
}
return false;
}, },
// //
searchClick() { searchClick() {
@ -276,7 +450,6 @@ export default {
.no-data-box { .no-data-box {
width: 100%; width: 100%;
height: 60px;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
color: #909399; color: #909399;
@ -324,17 +497,51 @@ export default {
.dev-config { .dev-config {
width: 100%; width: 100%;
min-height: 150px;
max-height: 300px; max-height: 300px;
overflow-y: auto; overflow-y: auto;
border: 1px solid #cccccc; border: 1px solid #cccccc;
border-radius: 6px; border-radius: 6px;
flex-direction: column;
}
.jd-dev-info {
width: 100%;
min-height: 50px;
flex-direction: row;
}
.jd-dev-detail {
width: calc(100% - 130px);
height: 100%;
}
.jd-dev-elec {
width: 100px;
height: 100%;
align-items: center;
justify-content: flex-start;
}
.jd-dev-img {
width: 30px;
height: 100%;
align-items: center;
justify-content: center;
cursor: pointer;
} }
.warn-info { .warn-info {
width: 100%; width: 100%;
margin-top: 10px;
min-height: calc(100% - 300px); min-height: calc(100% - 300px);
max-height: calc(100% - 150px); max-height: calc(100% - 150px);
overflow-y: auto; overflow-y: auto;
} }
.form-box {
min-height: 12vh;
max-height: 70vh;
overflow-y: auto;
}
</style> </style>

View File

@ -111,7 +111,7 @@
</div> </div>
<el-dialog title="选择抽检范围" :visible.sync="dialogVisible1" :append-to-body="true" width="500px"> <el-dialog title="选择抽检范围" :visible.sync="dialogVisible1" :append-to-body="true" width="500px" @close="dialogVisible1 = false">
<el-input placeholder="请输入关键字" prefix-icon="el-icon-search" v-model="filterText2" maxlength="30" <el-input placeholder="请输入关键字" prefix-icon="el-icon-search" v-model="filterText2" maxlength="30"
style="margin-bottom: 10px;"></el-input> style="margin-bottom: 10px;"></el-input>
<el-tree :data="teamTreeData" class="tree-container tree" icon="el-icon-search" show-checkbox node-key="id" <el-tree :data="teamTreeData" class="tree-container tree" icon="el-icon-search" show-checkbox node-key="id"
@ -124,7 +124,7 @@
</el-dialog> </el-dialog>
<el-dialog title="自动验证人脸配置" :visible.sync="dialogVisible2" :append-to-body="true" width="500px"> <el-dialog title="自动验证人脸配置" :visible.sync="dialogVisible2" :append-to-body="true" width="500px" @close="closeTimeConfig">
<el-form ref="form" :model="form" :label-position="labelPosition" :rules="rules"> <el-form ref="form" :model="form" :label-position="labelPosition" :rules="rules">
<el-form-item label="模式选择"> <el-form-item label="模式选择">
<el-radio-group v-model="form.configType"> <el-radio-group v-model="form.configType">

View File

@ -2,8 +2,17 @@
<div class="realTimeManage"> <div class="realTimeManage">
<div class="left"> <div class="left">
<!-- 云平台 --> <!-- 云平台 -->
<div class="cloud-platform-box"> <div class="cloud-platform-box layout">
<div id="platform-left" class="layout">
<div class="left-right-btn-box layout"></div>
</div>
<div id="platform-center">
<div id="center-btn-top-box"></div>
<div id="center-btn-bottom-box"></div>
</div>
<div id="platform-right">
<div class="left-right-btn-box layout"></div>
</div>
</div> </div>
<!-- 球机树 --> <!-- 球机树 -->
<div class="tree-box tree"> <div class="tree-box tree">
@ -56,8 +65,6 @@ export default {
}, },
data() { data() {
return { return {
//
winDom: 'videoPlayer1',
// //
pageNo: 1, pageNo: 1,
// //
@ -167,7 +174,7 @@ export default {
// //
} }
}, },
//icon //icon
renderContent(h, { node, data }) { renderContent(h, { node, data }) {
// 使 // 使
@ -217,12 +224,48 @@ export default {
.cloud-platform-box { .cloud-platform-box {
width: 100%; width: 100%;
height: 250px; height: 35%;
justify-items: center;
justify-content: space-evenly;
}
#platform-left,
#platform-right {
width: 15%;
height: 52%;
margin-top: 30%;
align-items: center;
}
.left-right-btn-box {
width: 100%;
height: 100%;
background: url("../../../../assets/images/video/left_btn.png") no-repeat;
background-position: center center !important;
}
#platform-center {
width: 67%;
height: 100%;
}
#center-btn-top-box {
width: 100%;
height: 80%;
background: url("../../../../assets/images/video/back.png") no-repeat;
background-position: center center !important;
}
#center-btn-bottom-box {
width: 100%;
height: 20%;
background: url("../../../../assets/images/video/back3.png") no-repeat;
background-position: center center !important;
} }
.tree-box { .tree-box {
width: 100%; width: 100%;
height: calc(100% - 250px); height: 65%;
overflow-y: auto; overflow-y: auto;
} }