Browse Source

修改

dev
wangxingyuan 5 months ago
parent
commit
7676da638a
4 changed files with 177 additions and 190 deletions
  1. +24
    -0
      src/api/point/site_management.js
  2. +1
    -0
      src/views/basedata/patrolpointmnt/patrolpoint/index.vue
  3. +4
    -3
      src/views/point/components/site_VideoDialog.vue
  4. +148
    -187
      src/views/point/site_management.vue

+ 24
- 0
src/api/point/site_management.js View File

@ -142,4 +142,28 @@ export function bindingPreset (data) {
method: 'post',
data: data
})
}
// 预置点列表
export function getPresetList (params) {
return request({
url: '/patrol/preset',
method: 'get',
params: params
})
}
// 解绑
export function presetRemove (params) {
return request({
url: `/patrol/preset/remove/${params}`,
method: 'get',
// params: params
})
}
// 监测设备查询
export function eqpbookList (params) {
return request({
url: `/basedata/eqpbook/list`,
method: 'get',
params: params
})
}

+ 1
- 0
src/views/basedata/patrolpointmnt/patrolpoint/index.vue View File

@ -416,6 +416,7 @@ export default {
},
//
tableTyle(row) {
this.tableItem=[]
this.type = 1;
this.tableItem = row;
this.tableItem.alarmThreshold = JSON.parse(row.alarmThreshold);


+ 4
- 3
src/views/point/components/site_VideoDialog.vue View File

@ -207,7 +207,7 @@ export default {
data() {
return {
bindingMonitorPointTitle: "绑定可见光检测点",
pointDialogShow: false,
// pointDialogShow: false,
dialogPointTree: [],
defaultPropsMonitor: {
children: "children",
@ -239,7 +239,8 @@ export default {
},
methods: {
bindingMonitorPointClose() {
this.pointDialogShow = false;
// this.pointDialogShow = false;
this.$emit("site_videoDialogClose",false);
},
//
handleMonitor(e) {
@ -435,7 +436,6 @@ export default {
saveDot1() {
this.presetData.presetPosName = this.presetName;
this.presetData.presetActionList = this.bindingMonitorPointTableData;
bindingPreset(this.presetData).then((res) => {
console.log(res, 11111);
if (res.code == 200) {
@ -458,6 +458,7 @@ export default {
presetParamList: [],
};
this.pointDialogShow=false;
this.$emit('site_saveDot1',true)
} else {
this.$message.error(res.msg);
}


+ 148
- 187
src/views/point/site_management.vue View File

@ -204,7 +204,14 @@
align="center"
>
<template slot-scope="scope">
<span class="intelligenceType">设置</span>
<span
v-if="scope.row.algSubtypeName == null"
class="intelligenceType"
>设置</span
>
<span v-else class="intelligenceType">{{
scope.row.algSubtypeName
}}</span>
</template>
</el-table-column>
<el-table-column
@ -261,6 +268,33 @@
}}</el-button
>
</div>
<el-table
:data="presetList"
:header-cell-style="{ 'text-align': 'center' }"
:cell-style="{ 'text-align': 'center' }"
style="margin-top: 10px"
>
<el-table-column label="设备名称"> </el-table-column>
<el-table-column label="预置点名称" prop="presetPosName">
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="presetDotEdit(scope.row)"
>解绑</el-button
>
<el-button
size="mini"
type="text"
@click="presetDotImg(scope.row.channelImg)"
>
查看快照
</el-button>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane :label="$t('site_management.tabsTwo')" name="second">
<div class="tabsBtn">
@ -433,124 +467,14 @@
}}</el-button>
</span>
</el-dialog>
<siteVideoDialog :pointDialogDataName="pointDialogDataName" :pointDialogShow="pointDialogShow" :dialogProp="dialogProp"/>
<!-- 绑定可见光监测点 -->
<!-- <el-dialog
:title="bindingMonitorPointTitle"
:visible.sync="bindingMonitorPointDialogVisible"
width="70%"
:before-close="bindingMonitorPointClose"
>
<el-row :gutter="20">
<el-col :span="5">
<div class="bindingMonitorPointTree">
<el-tree :data="dialogPointTree" :props="defaultPropsMonitor" @node-click="handleMonitor"></el-tree>
</div>
</el-col>
<el-col :span="13">
<div class="bindingMonitorPointDiv">
<videoPlayer />
</div>
</el-col>
<el-col :span="6">
<div style="background: #eee; padding: 5px">
{{ $t("site_management.PTZ") }}
</div>
<div class="PTZ-content">
<img src="@/assets/images/PTZImg.png" alt="" class="PTZImg" />
<div class="r-ti2-pos">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
</div>
<div class="r-ti3">
<div class="r-ti3-d1">
<img src="@/assets/images/searchImg.png" alt="" />
<div class="r-ti3-d2">
<div></div>
<div></div>
</div>
</div>
<div class="r-ti3-d1">
<img src="@/assets/images/r2Img.png" alt="" />
<div class="r-ti3-d2">
<div></div>
<div></div>
</div>
</div>
<div class="r-ti3-d1">
<img src="@/assets/images/r3Img.png" alt="" />
<div class="r-ti3-d2">
<div></div>
<div></div>
</div>
</div>
</div>
<div class="r-ti4">
<div style="display: flex">
<el-select
v-model="value"
:placeholder="$t('site_management.PleaseSelectAPresetPoint')"
>
<el-option :label="item.dictLabel" :value="item.dictValue" v-for=" item in listByEqIdAndChanneData" :key="item.dictValue"> </el-option>
</el-select>
<img src="@/assets/images/playImg.png" alt="" />
<img src="@/assets/images/addImg.png" alt="" />
</div>
<div style="display: flex; margin-top: 20px">
<el-input
:placeholder="$t('site_management.PleaseEnterTheContent')"
></el-input>
<img src="@/assets/images/setImg.png" alt="" />
</div>
</div>
</el-col>
</el-row>
<el-table
:data="bindingMonitorPointTableData"
style="width: 100%"
@header-click="clickFun"
>
<el-table-column
prop="date"
:label="$t('site_management.ActionType')"
align="center"
>
</el-table-column>
<el-table-column
prop="name"
:label="$t('site_management.RecordingDuration')"
align="center"
>
</el-table-column>
<el-table-column
prop="address"
:label="$t('site_management.NumberOfPhotosTaken')"
align="center"
>
</el-table-column>
<el-table-column
prop="address"
:label="$t('site_management.PhotoInterval')"
align="center"
>
</el-table-column>
<el-table-column
align="center"
:render-header="(h, obj) => renderHeader(h, obj, $t('share.addTo'))"
>
<template slot-scope="scope">
<span>{{ $t("share.delete") }}</span>
</template>
</el-table-column>
</el-table>
</el-dialog> -->
<siteVideoDialog
:pointDialogDataName="pointDialogDataName"
:pointDialogShow="pointDialogShow"
:dialogProp="dialogProp"
@site_videoDialogClose="site_videoDialogClose"
@site_saveDot1="site_saveDot1"
/>
<!-- 绑定巡检设备 -->
<el-dialog
:title="$t('site_management.SelectInspectionEquipment')"
@ -614,7 +538,7 @@
fixed="left"
/>
<el-table-column
prop="date"
prop="patroldeviceName"
min-width="130px"
:label="$t('equipment.EquipmentName')"
align="center"
@ -622,7 +546,7 @@
>
</el-table-column>
<el-table-column
prop="name"
prop="patroldeviceCode"
min-width="130px"
:label="$t('equipment.EquipmentCode')"
align="center"
@ -829,6 +753,15 @@
}}</el-button>
</span>
</el-dialog>
<!-- 查看快照 -->
<el-dialog
title="查看快照"
:visible.sync="dialogChannelImg"
width="60%"
:before-close="dialogChannelImgHandleClose"
>
<img :src="dialogChannelImgSrc" style="width: 100%; height: 80vh" />
</el-dialog>
</div>
</template>
@ -844,6 +777,9 @@ import {
edit,
editItem,
postRemove,
getPresetList,
presetRemove,
eqpbookList,
// vl,
// listByEqIdAndChannelId
} from "@/api/point/site_management";
@ -852,7 +788,7 @@ export default {
name: "SiteManagement",
components: {
videoPlayer,
siteVideoDialog
siteVideoDialog,
},
data() {
return {
@ -920,28 +856,7 @@ export default {
bindingMonitorPointTableData: [],
InspectionDialogVisible: false,
queryParams: {},
InspectionTableData: [
{
date: "2016-05-02",
name: "王小虎",
address: "上海市普陀区金沙江路 1518 弄",
},
{
date: "2016-05-04",
name: "王小虎",
address: "上海市普陀区金沙江路 1517 弄",
},
{
date: "2016-05-01",
name: "王小虎",
address: "上海市普陀区金沙江路 1519 弄",
},
{
date: "2016-05-03",
name: "王小虎",
address: "上海市普陀区金沙江路 1516 弄",
},
],
InspectionTableData: [],
upload: {
//
open: false,
@ -983,9 +898,17 @@ export default {
// label: "name",
// },
// listByEqIdAndChanneData: [],
pointDialogDataName:{},
pointDialogShow:false,
dialogProp:{}
pointDialogDataName: "",
pointDialogShow: false,
dialogProp: {},
presetList: [],
changeCurrentRowData: {},
dialogChannelImg: false,
dialogChannelImgSrc: "",
eqpbookListQuery: {
pageNum: 1,
pageSize: 10,
},
};
},
mounted() {
@ -1039,11 +962,26 @@ export default {
},
changeCurrentRow(row) {
this.dialogProp=row;
this.dialogProp = row;
this.currentRowId = row.id; // ID
this.RightBtnShow=false
this.RightBtnShow = false;
this.rowStyle(row);
this.changeCurrentRowData = {
patrolpointId: row.patrolpointId,
};
this.getPresetListFn();
},
getPresetListFn() {
getPresetList(this.changeCurrentRowData).then((res) => {
if (res.code == 200) {
this.presetList = res.data;
if (res.data.length != 0) {
this.RightBtnShow = true;
}
}
});
},
//
rowStyle(row) {
if (this.name === row.name) {
@ -1081,7 +1019,6 @@ export default {
this.bindingMonitorPointDialogVisible = false;
},
bindingMonitorBtn(type) {
if (type == 0) {
//
// this.bindingMonitorPointTitle = this.$t(
@ -1095,7 +1032,6 @@ export default {
this.pointDialogDataName = this.$t(
"site_management.BindVisibleLightMonitoringPoints"
);
} else {
// this.bindingMonitorPointTitle = this.$t(
// "site_management.BindThermalImagingMonitoringPoints"
@ -1104,42 +1040,23 @@ export default {
"site_management.BindThermalImagingMonitoringPoints"
);
}
this.pointDialogShow=true;
this.pointDialogShow = true;
// this.bindingMonitorPointDialogVisible = true;
},
// clickFun() {},
// renderHeader(h, { column, $index }, type) {
// let that = this;
// return h("div", [
// //
// h("span", column.label),
// //
// h(
// "el-button",
// {
// props: {
// type: "text",
// size: "small",
// },
// style: "margin-left: 5px;",
// on: {
// click: function () {
// that.clickButton(type);
// },
// },
// },
// this.$t("share.addTo")
// ),
// ]);
// },
// clickButton(type) {
// console.log("" + type + "");
// },
site_videoDialogClose() {
this.pointDialogShow = false;
},
InspectionHandleClose() {
this.InspectionDialogVisible = false;
},
InspectionBtn() {
this.InspectionDialogVisible = true;
eqpbookList(this.eqpbookListQuery).then((res) => {
console.log(res,1111)
if(res.code==200){
this.InspectionTableData=res.rows
}
});
},
InspectionChangeCurrentRow(row) {
this.currentRowId = row.id; // ID
@ -1218,17 +1135,61 @@ export default {
},
//
handleMonitor(e){
handleMonitor(e) {
if (e.eqpbookId) {
// console.log(e,'')
listByEqIdAndChannelId({channelCode:e.channelCode,patroldeviceCode:e.patroldeviceCode}).then(res=>{
console.log(e,'摄像头列表')
if(res.code==200){
this.listByEqIdAndChanneData=res.data;
listByEqIdAndChannelId({
channelCode: e.channelCode,
patroldeviceCode: e.patroldeviceCode,
}).then((res) => {
console.log(e, "摄像头列表");
if (res.code == 200) {
this.listByEqIdAndChanneData = res.data;
}
})
});
}
}
},
//
presetDotEdit(row) {
this.$confirm("确定解绑预置点吗?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
presetRemove(row.presetPosId).then((res) => {
if (res.code == 200) {
this.getPresetListFn();
this.$message({
type: "success",
message: "解绑成功!",
});
} else {
this.$message({
type: "error",
message: res.msg,
});
}
});
})
.catch(() => {
this.$message({
type: "info",
message: "取消解绑",
});
});
},
site_saveDot1() {
this.getPresetListFn();
},
//
presetDotImg(channelImg) {
this.dialogChannelImg = true;
this.dialogChannelImgSrc = channelImg;
},
dialogChannelImgHandleClose() {
this.dialogChannelImg = false;
},
},
};
</script>


Loading…
Cancel
Save