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 deleteBatchPoliceCameraItemFileApi = data => post('xmgl/policeCameraItemFile/deleteBatch', data);
|
||||
// 批量移动执法记录仪设备
|
||||
export const batchMovePoliceCameraItemApi = data => post('xmgl/policeCameraItem/batchMove', data);
|
||||
|
||||
// 查询单位部门班组tree列表
|
||||
export const getEnterpriseDepartmentTeamTree = data => post('xmgl/enterpriseInfo/getEnterpriseDepartmentTeamTree', data);
|
||||
|
||||
@ -217,7 +217,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
selectNoticeRemindSound() {
|
||||
if(!this.$store.state.projectSn) return;
|
||||
if (!this.$store.state.projectSn) return;
|
||||
selectNoticeRemindSoundApi({
|
||||
projectSn: this.$store.state.projectSn,
|
||||
}).then((res) => {
|
||||
@ -288,8 +288,8 @@ export default {
|
||||
this.messsageCenterDialog = true;
|
||||
this.getData();
|
||||
},
|
||||
playAudio(playNum){
|
||||
if(playNum <= 0) return;
|
||||
playAudio(playNum) {
|
||||
if (playNum <= 0) return;
|
||||
const audio = this.$refs[`audioRef`];
|
||||
console.log(audio);
|
||||
audio.play();
|
||||
@ -372,29 +372,39 @@ export default {
|
||||
// this.$emit('sendMsg')
|
||||
// }
|
||||
// }
|
||||
const payload = JSON.parse(message.payload);
|
||||
this.getData();
|
||||
if (message.type == 7) {
|
||||
const find = this.noticeRemindList.find(
|
||||
(item) => item.type == message.type
|
||||
);
|
||||
if (find) {
|
||||
this.fileUrl = find.fileUrl;
|
||||
console.log("message", message.hasOwnProperty('payload'), message.payload != undefined, message.payload);
|
||||
if(message.hasOwnProperty('payload')) {
|
||||
console.log("message.payload", message.payload);
|
||||
const payload = JSON.parse(message.payload);
|
||||
if (payload) {
|
||||
this.fileUrl = payload.messagePromptToneConfig;
|
||||
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);
|
||||
})
|
||||
this.playAudio(payload.playbackFrequency);
|
||||
});
|
||||
}
|
||||
}
|
||||
// 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
|
||||
setTimeout(() => {
|
||||
this.$emit("sendMsg", message);
|
||||
|
||||
@ -56,6 +56,14 @@
|
||||
? 'info'
|
||||
: 'danger'
|
||||
" 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">{{
|
||||
$t("message.videoManage.dialog_newVideo.operation.add") }}
|
||||
<!-- {{$t('message.videoManage.add')}}{{$t('message.videoManage.video')}} -->
|
||||
@ -554,6 +562,58 @@
|
||||
</div>
|
||||
</el-form>
|
||||
</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>
|
||||
<!--高德地图-->
|
||||
<gd-map v-if="showMap" :addProjectForm="addProjectForm" @closeMap="closeMap" @save="getLngLat"></gd-map>
|
||||
@ -605,6 +665,7 @@ import {
|
||||
editProjectPoliceCameraConfigApi,
|
||||
savePoliceCameraVideoConfigApi,
|
||||
getPoliceCameraVideoConfigListApi,
|
||||
batchMovePoliceCameraItemApi,
|
||||
} from "@/assets/js/api/bodyWornCamera";
|
||||
import {
|
||||
getProjectConfigListApi,
|
||||
@ -940,6 +1001,19 @@ export default {
|
||||
workTicketBindCamera: 0,
|
||||
fileList: [],
|
||||
selectionList: [],
|
||||
moveGroupDialog: false,
|
||||
currentDetail: {
|
||||
groupId: "",
|
||||
},
|
||||
formCurrentRules: {
|
||||
groupId: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("message.videoManage.required"),
|
||||
trigger: "change",
|
||||
}, // 必填
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
@ -953,6 +1027,38 @@ export default {
|
||||
},
|
||||
components: { cameraList, gdMap },
|
||||
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() {
|
||||
const requestData = {
|
||||
|
||||
@ -631,6 +631,7 @@
|
||||
<el-radio-group
|
||||
class="radio-wrap"
|
||||
v-model="currentVideoTypeDetail.playType"
|
||||
@change="playbackFrequencyChange"
|
||||
>
|
||||
<el-radio :label="1"> 播放一次 </el-radio>
|
||||
<el-radio :label="2"> 循环播放(次数) </el-radio>
|
||||
@ -931,6 +932,11 @@ export default {
|
||||
},
|
||||
components: { gdMap },
|
||||
methods: {
|
||||
playbackFrequencyChange() {
|
||||
if(this.currentVideoTypeDetail.playType == 1) {
|
||||
this.currentVideoTypeDetail.playbackFrequency = 1;
|
||||
}
|
||||
},
|
||||
onDeactivated(row) {
|
||||
editEnableMessageDevRuleApi({
|
||||
...row,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user