flx:提交ai预警播报 批量移动执法记录仪
This commit is contained in:
parent
625c5888e8
commit
e771e3bfde
@ -45,6 +45,8 @@ export const getPoliceCameraItemQueryByIdApi = data => get('xmgl/policeCameraIte
|
|||||||
export const getPoliceCameraItemFilePageApi = data => get('xmgl/policeCameraItemFile/page', data);
|
export const getPoliceCameraItemFilePageApi = data => get('xmgl/policeCameraItemFile/page', data);
|
||||||
// 批量删除执法记录仪文件信息
|
// 批量删除执法记录仪文件信息
|
||||||
export const deleteBatchPoliceCameraItemFileApi = data => post('xmgl/policeCameraItemFile/deleteBatch', data);
|
export const deleteBatchPoliceCameraItemFileApi = data => post('xmgl/policeCameraItemFile/deleteBatch', data);
|
||||||
|
// 批量移动执法记录仪设备
|
||||||
|
export const batchMovePoliceCameraItemApi = data => post('xmgl/policeCameraItem/batchMove', data);
|
||||||
|
|
||||||
// 查询单位部门班组tree列表
|
// 查询单位部门班组tree列表
|
||||||
export const getEnterpriseDepartmentTeamTree = data => post('xmgl/enterpriseInfo/getEnterpriseDepartmentTeamTree', data);
|
export const getEnterpriseDepartmentTeamTree = data => post('xmgl/enterpriseInfo/getEnterpriseDepartmentTeamTree', data);
|
||||||
|
|||||||
@ -217,7 +217,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
selectNoticeRemindSound() {
|
selectNoticeRemindSound() {
|
||||||
if(!this.$store.state.projectSn) return;
|
if (!this.$store.state.projectSn) return;
|
||||||
selectNoticeRemindSoundApi({
|
selectNoticeRemindSoundApi({
|
||||||
projectSn: this.$store.state.projectSn,
|
projectSn: this.$store.state.projectSn,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
@ -288,14 +288,14 @@ export default {
|
|||||||
this.messsageCenterDialog = true;
|
this.messsageCenterDialog = true;
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
playAudio(playNum){
|
playAudio(playNum) {
|
||||||
if(playNum <= 0) return;
|
if (playNum <= 0) return;
|
||||||
const audio = this.$refs[`audioRef`];
|
const audio = this.$refs[`audioRef`];
|
||||||
console.log(audio);
|
console.log(audio);
|
||||||
audio.play();
|
audio.play();
|
||||||
playNum = playNum - 1;
|
playNum = playNum - 1;
|
||||||
audio.onended = () => {
|
audio.onended = () => {
|
||||||
this.playAudio(playNum);
|
this.playAudio(playNum);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mqttMSG() {
|
mqttMSG() {
|
||||||
@ -372,29 +372,39 @@ export default {
|
|||||||
// this.$emit('sendMsg')
|
// this.$emit('sendMsg')
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
const payload = JSON.parse(message.payload);
|
|
||||||
this.getData();
|
this.getData();
|
||||||
if (message.type == 7) {
|
console.log("message", message.hasOwnProperty('payload'), message.payload != undefined, message.payload);
|
||||||
const find = this.noticeRemindList.find(
|
if(message.hasOwnProperty('payload')) {
|
||||||
(item) => item.type == message.type
|
console.log("message.payload", message.payload);
|
||||||
);
|
const payload = JSON.parse(message.payload);
|
||||||
if (find) {
|
if (payload) {
|
||||||
this.fileUrl = find.fileUrl;
|
this.fileUrl = payload.messagePromptToneConfig;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.playAudio(find.playNum);
|
this.playAudio(payload.playbackFrequency);
|
||||||
})
|
});
|
||||||
}
|
|
||||||
} else if (message.type == 8) {
|
|
||||||
const find = this.noticeRemindList.find(
|
|
||||||
(item) => item.type == message.type && item.riskLevel == payload.level
|
|
||||||
);
|
|
||||||
if (find) {
|
|
||||||
this.fileUrl = find.fileUrl;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.playAudio(find.playNum);
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// if (message.type == 7) {
|
||||||
|
// const find = this.noticeRemindList.find(
|
||||||
|
// (item) => item.type == message.type
|
||||||
|
// );
|
||||||
|
// if (find) {
|
||||||
|
// this.fileUrl = find.fileUrl;
|
||||||
|
// this.$nextTick(() => {
|
||||||
|
// this.playAudio(find.playNum);
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// } else if (message.type == 8) {
|
||||||
|
// const find = this.noticeRemindList.find(
|
||||||
|
// (item) => item.type == message.type && item.riskLevel == payload.level
|
||||||
|
// );
|
||||||
|
// if (find) {
|
||||||
|
// this.fileUrl = find.fileUrl;
|
||||||
|
// this.$nextTick(() => {
|
||||||
|
// this.playAudio(find.playNum);
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// }
|
||||||
// message
|
// message
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.$emit("sendMsg", message);
|
this.$emit("sendMsg", message);
|
||||||
|
|||||||
@ -56,6 +56,14 @@
|
|||||||
? 'info'
|
? 'info'
|
||||||
: 'danger'
|
: 'danger'
|
||||||
" size="medium" class="delete_btn" plain @click="deleteAttendanceBatch">删除</el-button>
|
" size="medium" class="delete_btn" plain @click="deleteAttendanceBatch">删除</el-button>
|
||||||
|
<el-button
|
||||||
|
:disabled="selectionList.length == 0"
|
||||||
|
:type="selectionList.length == 0 ? 'info' : 'primary'"
|
||||||
|
@click="moveGroupClick"
|
||||||
|
plain
|
||||||
|
size="medium"
|
||||||
|
>批量移动
|
||||||
|
</el-button>
|
||||||
<el-button type="primary" @click="addVideoBtn" size="medium" :disabled="!currentGroupInfo">{{
|
<el-button type="primary" @click="addVideoBtn" size="medium" :disabled="!currentGroupInfo">{{
|
||||||
$t("message.videoManage.dialog_newVideo.operation.add") }}
|
$t("message.videoManage.dialog_newVideo.operation.add") }}
|
||||||
<!-- {{$t('message.videoManage.add')}}{{$t('message.videoManage.video')}} -->
|
<!-- {{$t('message.videoManage.add')}}{{$t('message.videoManage.video')}} -->
|
||||||
@ -554,6 +562,58 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!-- 批量移动 -->
|
||||||
|
<el-dialog
|
||||||
|
:modal-append-to-body="false"
|
||||||
|
title="批量移动"
|
||||||
|
:visible.sync="moveGroupDialog"
|
||||||
|
width="667px"
|
||||||
|
>
|
||||||
|
<div class="dialog_content">
|
||||||
|
<el-form
|
||||||
|
class="dialogFormBox"
|
||||||
|
ref="moveGroupDialog"
|
||||||
|
label-width="100px"
|
||||||
|
size="medium"
|
||||||
|
:model="currentDetail"
|
||||||
|
:rules="formCurrentRules"
|
||||||
|
>
|
||||||
|
<!-- 所属分组 -->
|
||||||
|
<el-form-item :label="$t('message.videoManage.group')" prop="groupId">
|
||||||
|
<el-select
|
||||||
|
v-model="currentDetail.groupId"
|
||||||
|
placeholder="请选择"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
ref="searchSelect"
|
||||||
|
>
|
||||||
|
<el-option :label="item.groupName" :value="item.id" :key="item.id" v-for="item in videoTreeData"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<!--取消-->
|
||||||
|
<el-button
|
||||||
|
class="zdy-btn"
|
||||||
|
@click="moveGroupDialog = false"
|
||||||
|
size="medium"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<img src="../../../assets/images/cancel.png" alt="" />
|
||||||
|
<span>{{ $t("message.videoManage.btn_cancel") }}</span>
|
||||||
|
</div>
|
||||||
|
</el-button>
|
||||||
|
<!--确定-->
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-circle-check"
|
||||||
|
@click="setMoveGroup"
|
||||||
|
size="medium"
|
||||||
|
>{{ $t("message.videoManage.btn_determine") }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!--高德地图-->
|
<!--高德地图-->
|
||||||
<gd-map v-if="showMap" :addProjectForm="addProjectForm" @closeMap="closeMap" @save="getLngLat"></gd-map>
|
<gd-map v-if="showMap" :addProjectForm="addProjectForm" @closeMap="closeMap" @save="getLngLat"></gd-map>
|
||||||
@ -605,6 +665,7 @@ import {
|
|||||||
editProjectPoliceCameraConfigApi,
|
editProjectPoliceCameraConfigApi,
|
||||||
savePoliceCameraVideoConfigApi,
|
savePoliceCameraVideoConfigApi,
|
||||||
getPoliceCameraVideoConfigListApi,
|
getPoliceCameraVideoConfigListApi,
|
||||||
|
batchMovePoliceCameraItemApi,
|
||||||
} from "@/assets/js/api/bodyWornCamera";
|
} from "@/assets/js/api/bodyWornCamera";
|
||||||
import {
|
import {
|
||||||
getProjectConfigListApi,
|
getProjectConfigListApi,
|
||||||
@ -940,6 +1001,19 @@ export default {
|
|||||||
workTicketBindCamera: 0,
|
workTicketBindCamera: 0,
|
||||||
fileList: [],
|
fileList: [],
|
||||||
selectionList: [],
|
selectionList: [],
|
||||||
|
moveGroupDialog: false,
|
||||||
|
currentDetail: {
|
||||||
|
groupId: "",
|
||||||
|
},
|
||||||
|
formCurrentRules: {
|
||||||
|
groupId: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t("message.videoManage.required"),
|
||||||
|
trigger: "change",
|
||||||
|
}, // 必填
|
||||||
|
],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@ -953,6 +1027,38 @@ export default {
|
|||||||
},
|
},
|
||||||
components: { cameraList, gdMap },
|
components: { cameraList, gdMap },
|
||||||
methods: {
|
methods: {
|
||||||
|
moveGroupClick() {
|
||||||
|
this.currentDetail.groupId = "";
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.moveGroupDialog.clearValidate();
|
||||||
|
});
|
||||||
|
this.moveGroupDialog = true;
|
||||||
|
},
|
||||||
|
setMoveGroup() {
|
||||||
|
this.$refs.moveGroupDialog.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.selectionList.length === 0)
|
||||||
|
return this.$message.warning("请勾选需要移动的数据!");
|
||||||
|
const itemIds = this.selectionList.map((item) => item.itemId).join(',');
|
||||||
|
const params = {
|
||||||
|
itemIds,
|
||||||
|
groupId: this.currentDetail.groupId,
|
||||||
|
projectSn: this.projectSn,
|
||||||
|
};
|
||||||
|
batchMovePoliceCameraItemApi(params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(res.message);
|
||||||
|
this.moveGroupDialog = false;
|
||||||
|
this.selectionList = [];
|
||||||
|
this.getVideoList();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.log("error submit!!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 导出模版
|
// 导出模版
|
||||||
exportData() {
|
exportData() {
|
||||||
const requestData = {
|
const requestData = {
|
||||||
|
|||||||
@ -631,6 +631,7 @@
|
|||||||
<el-radio-group
|
<el-radio-group
|
||||||
class="radio-wrap"
|
class="radio-wrap"
|
||||||
v-model="currentVideoTypeDetail.playType"
|
v-model="currentVideoTypeDetail.playType"
|
||||||
|
@change="playbackFrequencyChange"
|
||||||
>
|
>
|
||||||
<el-radio :label="1"> 播放一次 </el-radio>
|
<el-radio :label="1"> 播放一次 </el-radio>
|
||||||
<el-radio :label="2"> 循环播放(次数) </el-radio>
|
<el-radio :label="2"> 循环播放(次数) </el-radio>
|
||||||
@ -931,6 +932,11 @@ export default {
|
|||||||
},
|
},
|
||||||
components: { gdMap },
|
components: { gdMap },
|
||||||
methods: {
|
methods: {
|
||||||
|
playbackFrequencyChange() {
|
||||||
|
if(this.currentVideoTypeDetail.playType == 1) {
|
||||||
|
this.currentVideoTypeDetail.playbackFrequency = 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
onDeactivated(row) {
|
onDeactivated(row) {
|
||||||
editEnableMessageDevRuleApi({
|
editEnableMessageDevRuleApi({
|
||||||
...row,
|
...row,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user