Commit 64b3652e authored by 胡占生's avatar 胡占生 🇨🇳

fix: 日志管理接口对接联调,优化项目结构,解决项目bug

parent b7f2ce3b
/**
* 查询算法日志信息列表
* @param {string} algorrithmName
* @param {string} cameraNo
* @param {string} costTime
* @param {string} createBy
* @param {string} createTime
* @param {string} jsonResult
* @param {string} operId
* @param {string} operParam
* @param {string} operTime
* @param {string} params
* @param {string} remark
* @param {string} searchValue
* @param {string} status
* @param {string} updateBy
* @param {string} updateTime
* @returns
*/
import request from '@/utils/request'
// 查询摄像头日志列表
export function listCameraLog(query) {
return request({
url: '/test/cameraLog/list',
method: 'get',
params: query
})
}
// 查询算法日志列表
export function listAlgLog(query) {
return request({
url: '/test/algorithmLog/list',
method: 'get',
params: query
})
}
// 查询算法日志列表x详情
export function detailAlgLog(id) {
return request({
url: `/test/algorithmLog/${id}`,
method: 'get',
})
}
// 修改算法日志状态
export function updateStatusAlgLog(query) {
return request({
url: `/test/algorithmLog/updateStatus`,
method: 'get',
params: query
})
}
// 新增算法日志列表
export function addAlgLog(data) {
return request({
url: '/test/algorithmLog',
method: 'post',
data: data
})
}
// 修改算法日志列表
export function updateAlgLog(data) {
return request({
url: '/test/algorithmLog',
method: 'put',
data: data
})
}
// 删除算法日志列表
export function deleteAlgLog(ids) {
return request({
url: `/test/algorithmLog/${ids}`,
method: 'delete'
})
}
// 导出算法日志列表
export function exportAlgLog(data) {
return request({
url: `/test/algorithmLog/export`,
method: 'post',
data: data
})
}
......@@ -18,7 +18,7 @@
预警等级
</div>
</template>
{{form.alarmLevelId}}
{{form.alarmLevelName}}
</el-descriptions-item>
<el-descriptions-item>
<template #label>
......
......@@ -74,7 +74,7 @@
<div style="width: 100%;overflow: hidden;">
<ImagePreview style="width: 100%;" :src="item.alarmImg"/>
</div>
<h2>{{ item.alarmType }}</h2>
<h2 :style="{color:item.alarmLevelColor}">{{ item.alarmType }}</h2>
<p style="color: #999999;font-size: 12px;">
{{ parseTime(item.alarmTime) }}
</p>
......
......@@ -78,10 +78,6 @@
:isShowTip="false"
@update:modelObj="getImgObj"
/>
<div v-else style="position: absolute;bottom: 5px;left: 26%;" class="text-style">
请开启算法
</div>
<!-- <ImageUpload :limit='1' :fileSize="5" :isShowTip="false" @update:modelObj="getImgObj"/> -->
</div>
</el-card>
<el-card >
......@@ -116,7 +112,7 @@
<div style="display: flex;justify-content: space-between;margin: 10px 0;">
<!-- <el-button type="primary" plain>重置区域</el-button> -->
<div></div>
<el-button type="primary" plain @click="downVideo">下载识别视频</el-button>
<!-- <el-button type="primary" plain @click="downVideo">下载识别视频</el-button> -->
<!-- <el-button v-if="getFileType(outFilePath)=='1'" type="primary" plain @click="downVideo">下载识别视频</el-button> -->
</div>
</el-card>
......@@ -136,7 +132,7 @@
</div>
<el-divider />
<div class="img-box gird-layout">
<div class="img-item" v-for="item in effectiveList" :key="item.id">
<div class="img-item" v-for="item in invalidImgList" :key="item.id">
<ImagePreview style="height: 100%;" :src="item.caseFile"/>
</div>
</div>
......@@ -155,10 +151,10 @@
</div>
<el-divider />
<div class="img-box gird-layout" >
<div class="img-item" v-for="item in invalidList" :key="item.id">
<ImagePreview style="height: 100%;" :src="item.caseFile"/>
<div class="img-item" v-for="item in invalidImgList" :key="item.id" >
<ImagePreview style="height: 100%;" :src="item.caseFile"/>
</div>
</div>
</div>
<img class="top-tip" src="@/assets/images/close.png" alt="">
</div>
......@@ -191,6 +187,8 @@ const backVideo = ref({})
const applicationList = ref([])
const effectiveList = ref([])
const invalidList = ref([])
const invalidImgList = ref([])
const effectiveImgList = ref([])
const imgVideoData = ref([])
const nowText=ref('算法详情')
const baseUrl = 'http://192.168.3.82'
......@@ -228,6 +226,8 @@ function getDetials(){
listBoundary({ algorithmId: roleId}).then(res=>{
effectiveList.value = res.rows.filter(item => item.caseType === '0')
invalidList.value = res.rows.filter(item => item.caseType === '1')
invalidImgList.value = res.rows.filter(item => item.caseType === '1'&&item.caseFile)
effectiveImgList.value = res.rows.filter(item => item.caseType === '0'&&item.caseFile)
})
}
/** 查询案例文件列表 */
......
This diff is collapsed.
......@@ -54,7 +54,7 @@
>
<template v-slot:default>
<!-- <img src="@/assets/images/picStream.png" style="width: 100%" /> -->
<canvas id="video" style="width: 100%" ></canvas>
<canvas id="video" :style="{width: '100%', maxHeight: (globalScreenHeight-120)+'px'}" ></canvas>
</template>
</el-card>
</div>
......@@ -84,7 +84,7 @@
<el-form-item label="预警区域:">{{ form.title }}</el-form-item> -->
<el-form-item label="预警类型:">{{ item.alarmType }}</el-form-item>
<el-form-item label="预警时间:">{{ parseTime(item.alarmTime) }}</el-form-item>
<el-form-item label="预警等级:"><el-tag :type="'danger'" effect="dark">{{ item.alarmLevelId+'预警'}} </el-tag></el-form-item>
<el-form-item label="预警等级:"><el-tag :color="item.alarmLevelColor" type="info" effect="dark">{{ item.alarmLevelName+'预警'}} </el-tag></el-form-item>
</el-form>
</template>
</el-card>
......@@ -135,67 +135,67 @@ const data = reactive({
});
const { queryParams, form, rules } = toRefs(data);
/** 通过条件过滤节点 */
onMounted(() => {
// player.value.play()//播放
getTreeData()
getWaringData()
getVideos()
})
onDeactivated(() => {
player.value.destroy();
player.value = null;
})
watch(deptName, (val) => {
deptTreeRef.value.filter(val)
})
const filterNode = (value, data) => {
if (!value) return true;
return data.label.indexOf(value) !== -1;
};
function getTreeData() {
videoTreeListManage().then((res) => {
console.log("🚀 ~ videoTreeListManage ~ res:", res)
deptOptions.value=res.data
})
}
function getWaringData() {
listAlarm().then((res) => {
listAlarm(queryParams.value).then((res) => {
algorithmList.value=res.rows
})
}
getTreeData()
getWaringData()
function getVideos(str){
let canvas = document.getElementById('video')
let url = str?str:'rtsp://192.168.20.211:554/av0_0'
if (player.value) {
player.value.destroy();
player.value = null;
}
player.value = new JSMpeg.Player("ws://192.168.4.232:9999/rtsp?url="+btoa(url), {canvas: canvas})
player.value.play()
}
// // 当需要重新加载视频流时,可以调用以下函数
// function reloadVideoStream(str) {
// let canvas = document.getElementById('video')
// var ctx = canvas.getContext('2d');
// ctx.clearRect(0, 0, canvas.width, canvas.height);
// // 更新视频流URL
// player.value = new JSMpeg.Player("ws://192.168.4.232:9999/rtsp?url="+btoa(str), {canvas: canvas})
// // 开始解码新的视频流
// player.value.play();
// }
onMounted(() => {
// player.value.play()//播放
getVideos()
})
watch(deptName, (val) => {
deptTreeRef.value.filter(val)
})
}
function handleNodeClick(row) {
const treeType = row.id.split("-")[0];
const treeID = row.id.split("-")[1];
if(treeType=='点位'){
handlvideoPath(treeID)
queryParams.value.locationId = treeID;
queryParams.value.regionId = null;
}else{
queryParams.value.regionId = treeID;
queryParams.value.locationId = null;
}
}
getWaringData()
}
function handAdd(row) {
algFormRef.value.handleAdd();
}
function handleSetSize(row) {
}
function handleUpdate(row) {
}
function handlvideoPath(id) {
idDevice(id).then((res) => {
getVideos(res.data.videoUrl)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment