|
|
|
@ -80,17 +80,24 @@ |
|
|
|
@click="editPresetDot1" |
|
|
|
title="编辑预置点名称" |
|
|
|
/> |
|
|
|
<img src="@/assets/images/addImg.png" alt="" /> |
|
|
|
<img src="@/assets/images/addImg.png" alt="" @click="popoverOpen" /> |
|
|
|
<el-popover |
|
|
|
placement="top" |
|
|
|
width="300" |
|
|
|
v-model="popovervisible" |
|
|
|
trigger="click" |
|
|
|
> |
|
|
|
<el-input placeholder="请输入内容" v-model="newpresetName"/> |
|
|
|
<el-input placeholder="请输入内容" v-model="newpresetName" /> |
|
|
|
<div class="popover-footer"> |
|
|
|
<el-button size="mini" type="primary" @click="popovervisibleShow">取消</el-button> |
|
|
|
<el-button size="mini" type="primary" @click="setPresetDot1">确定</el-button> |
|
|
|
<el-button |
|
|
|
size="mini" |
|
|
|
type="primary" |
|
|
|
@click="popovervisibleShow" |
|
|
|
>取消</el-button |
|
|
|
> |
|
|
|
<el-button size="mini" type="primary" @click="setPresetDot1" |
|
|
|
>确定</el-button |
|
|
|
> |
|
|
|
</div> |
|
|
|
</el-popover> |
|
|
|
</div> |
|
|
|
@ -103,6 +110,7 @@ |
|
|
|
src="@/assets/images/setImg.png" |
|
|
|
alt="" |
|
|
|
title="编辑预置点名称" |
|
|
|
@click="editPresetDot2" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -113,39 +121,72 @@ |
|
|
|
style="width: 100%" |
|
|
|
@header-click="clickFun" |
|
|
|
> |
|
|
|
<el-table-column |
|
|
|
prop="date" |
|
|
|
:label="$t('site_management.ActionType')" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
<el-table-column :label="$t('site_management.ActionType')" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.actionType"> |
|
|
|
<el-option label="拍照" value="1" /> |
|
|
|
<el-option label="录像" value="2" /> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="name" |
|
|
|
:label="$t('site_management.RecordingDuration')" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input |
|
|
|
v-model="scope.row.videoTime" |
|
|
|
v-if="scope.row.actionType == 2" |
|
|
|
class="centered-input" |
|
|
|
></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="address" |
|
|
|
:label="$t('site_management.NumberOfPhotosTaken')" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input |
|
|
|
v-model="scope.row.photoCount" |
|
|
|
v-if="scope.row.actionType == 1" |
|
|
|
class="centered-input" |
|
|
|
></el-input> |
|
|
|
<!-- <span v-if="scope.row.actionType == 1">1</span> --> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
prop="address" |
|
|
|
:label="$t('site_management.PhotoInterval')" |
|
|
|
align="center" |
|
|
|
> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input |
|
|
|
v-model="scope.row.photoSeper" |
|
|
|
v-if="scope.row.actionType == 1" |
|
|
|
class="centered-input" |
|
|
|
></el-input> |
|
|
|
</template> |
|
|
|
</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> |
|
|
|
<el-button |
|
|
|
type="text" |
|
|
|
size="small" |
|
|
|
@click="removeAction(scope.$index)" |
|
|
|
>移除</el-button |
|
|
|
> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<template #footer> |
|
|
|
<div class="add-btn add-bth1 card-page"> |
|
|
|
<el-button type="primary" @click="saveDot1">确定</el-button> |
|
|
|
|
|
|
|
<el-button @click="bindingMonitorPointClose">取消</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-dialog> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
@ -157,15 +198,16 @@ import { |
|
|
|
PZT, |
|
|
|
fi, |
|
|
|
goto, |
|
|
|
presetDotDistribute |
|
|
|
issue, |
|
|
|
bindingPreset, |
|
|
|
} from "@/api/point/site_management"; |
|
|
|
export default { |
|
|
|
components: { videoPlayer }, |
|
|
|
props: ["pointDialogDataName", "pointDialogShow"], |
|
|
|
props: ["pointDialogDataName", "pointDialogShow", "dialogProp"], |
|
|
|
data() { |
|
|
|
return { |
|
|
|
bindingMonitorPointTitle: "绑定可见光检测点", |
|
|
|
bindingMonitorPointDialogVisible: true, |
|
|
|
pointDialogShow: false, |
|
|
|
dialogPointTree: [], |
|
|
|
defaultPropsMonitor: { |
|
|
|
children: "children", |
|
|
|
@ -176,17 +218,39 @@ export default { |
|
|
|
presetDotNum: "", |
|
|
|
PZTData: {}, |
|
|
|
presetName: "", |
|
|
|
popovervisible: true, |
|
|
|
newpresetName:'' |
|
|
|
popovervisible: false, |
|
|
|
newpresetName: "", |
|
|
|
presetData: { |
|
|
|
presetPosCode: "", |
|
|
|
channelId: "", |
|
|
|
eqpbookId: "", |
|
|
|
patrolpointId: "", |
|
|
|
stdparolPointId: "", |
|
|
|
deviceId: "", |
|
|
|
presetPosName: "", |
|
|
|
stopTime: "", |
|
|
|
channelImg: "", |
|
|
|
description: "", |
|
|
|
presetActionList: [], |
|
|
|
presetParamList: [], |
|
|
|
presetPointList: [], |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
bindingMonitorPointClose() { |
|
|
|
this.bindingMonitorPointDialogVisible = false; |
|
|
|
this.pointDialogShow = false; |
|
|
|
}, |
|
|
|
// 绑定可见光监测点点击树事件 |
|
|
|
handleMonitor(e) { |
|
|
|
console.log(e, 111, this.dialogProp); |
|
|
|
if (e.eqpbookId) { |
|
|
|
this.presetData.patrolpointId = this.dialogProp.patrolpointId; |
|
|
|
this.presetData.stdparolPointId = this.dialogProp.stdparolPointId; |
|
|
|
this.presetData.deviceId = this.dialogProp.deviceId; |
|
|
|
this.presetData.eqpbookId = e.eqpbookId; |
|
|
|
this.presetData.channelId = e.channelId; |
|
|
|
|
|
|
|
this.PZTData = e; |
|
|
|
listByEqIdAndChannelId({ |
|
|
|
channelCode: e.channelCode, |
|
|
|
@ -232,7 +296,13 @@ export default { |
|
|
|
]); |
|
|
|
}, |
|
|
|
clickButton(type) { |
|
|
|
console.log("我点击了" + type + "的列"); |
|
|
|
// console.log("我点击了" + type + "的列"); |
|
|
|
this.bindingMonitorPointTableData.push({ |
|
|
|
actionType: "", |
|
|
|
videoTime: "", |
|
|
|
photoCount: "1", |
|
|
|
photoSeper: "", |
|
|
|
}); |
|
|
|
}, |
|
|
|
clickFun() {}, |
|
|
|
|
|
|
|
@ -296,6 +366,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
presetDotBtn(value) { |
|
|
|
this.presetData.presetPosCode = value; |
|
|
|
this.listByEqIdAndChanneData.forEach((item) => { |
|
|
|
if (item.dictValue == this.presetDotNum) { |
|
|
|
this.presetName = item.dictLabel; |
|
|
|
@ -321,13 +392,77 @@ export default { |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
popovervisibleShow(){ |
|
|
|
this.popovervisible=false; |
|
|
|
this.newpresetName=""; |
|
|
|
popovervisibleShow() { |
|
|
|
this.popovervisible = false; |
|
|
|
this.newpresetName = ""; |
|
|
|
}, |
|
|
|
setPresetDot1() { |
|
|
|
let data = { |
|
|
|
presetCode: this.presetDotNum, |
|
|
|
name: this.presetName, |
|
|
|
channelCode: this.PZTData.channelCode, |
|
|
|
patroldeviceCode: this.PZTData.patroldeviceCode, |
|
|
|
}; |
|
|
|
issue(data).then((res) => { |
|
|
|
if (res.code == 200) { |
|
|
|
this.$message({ |
|
|
|
message: res.msg, |
|
|
|
type: "success", |
|
|
|
}); |
|
|
|
this.popovervisible = false; |
|
|
|
} else { |
|
|
|
this.$message.error(res.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
popoverOpen() { |
|
|
|
this.popovervisible = true; |
|
|
|
}, |
|
|
|
// 设置预设点名称 |
|
|
|
editPresetDot2() { |
|
|
|
let data = { |
|
|
|
presetCode: this.presetDotNum, |
|
|
|
name: this.newpresetName, |
|
|
|
channelCode: this.PZTData.channelCode, |
|
|
|
patroldeviceCode: this.PZTData.patroldeviceCode, |
|
|
|
}; |
|
|
|
}, |
|
|
|
// 表格按钮移除 |
|
|
|
removeAction() { |
|
|
|
this.bindingMonitorPointTableData.splice(index, 1); |
|
|
|
}, |
|
|
|
setPresetDot1(){ |
|
|
|
// 保存 |
|
|
|
saveDot1() { |
|
|
|
this.presetData.presetPosName = this.presetName; |
|
|
|
this.presetData.presetActionList = this.bindingMonitorPointTableData; |
|
|
|
|
|
|
|
} |
|
|
|
bindingPreset(this.presetData).then((res) => { |
|
|
|
console.log(res, 11111); |
|
|
|
if (res.code == 200) { |
|
|
|
this.$message({ |
|
|
|
message: res.msg, |
|
|
|
type: "success", |
|
|
|
}); |
|
|
|
this.presetData = { |
|
|
|
presetPosCode: "", |
|
|
|
channelId: "", |
|
|
|
eqpbookId: "", |
|
|
|
patrolpointId: "", |
|
|
|
stdparolPointId: "", |
|
|
|
deviceId: "", |
|
|
|
presetPosName: "", |
|
|
|
stopTime: "", |
|
|
|
channelImg: "", |
|
|
|
description: "", |
|
|
|
presetActionList: [], |
|
|
|
presetParamList: [], |
|
|
|
}; |
|
|
|
this.pointDialogShow=false; |
|
|
|
} else { |
|
|
|
this.$message.error(res.msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.init(); |
|
|
|
@ -446,7 +581,7 @@ export default { |
|
|
|
cursor: pointer; |
|
|
|
} |
|
|
|
} |
|
|
|
.popover-footer{ |
|
|
|
.popover-footer { |
|
|
|
width: 100%; |
|
|
|
margin-top: 20px; |
|
|
|
display: flex; |
|
|
|
|