Commit b0e7fe17 authored by 胡占生's avatar 胡占生 🇨🇳

fix: 视频管理左侧树增加区别icon,日志管理增加登录日志,算法管理 算法场景增加多选操作。

parent 550aaa18
......@@ -41,7 +41,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="算法场景" prop="applicationScenarios">
<el-select v-model="form.applicationScenarios" placeholder="请选择算法场景" clearable >
<el-select v-model="form.applicationScenarios" multiple placeholder="请选择算法场景" clearable >
<el-option
v-for="disc in algorithm_scen"
:key="disc.value"
......@@ -154,7 +154,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="算法场景" prop="applicationScenarios">
<el-select v-model="form.applicationScenarios" placeholder="请选择算法场景" clearable >
<el-select v-model="form.applicationScenarios" multiple placeholder="请选择算法场景" clearable >
<el-option
v-for="disc in algorithm_scen"
:key="disc.value"
......@@ -598,6 +598,7 @@ function handleUpdate(row) {
getBoundaryList()
detailAlg(id).then(response => {
form.value = response.data;
form.value.applicationScenarios=form.value.applicationScenarios&&form.value.applicationScenarios.split(',')
open.value = true;
isAdd.value = false;
title.value = "修改算法";
......@@ -608,6 +609,7 @@ function handleUpdate(row) {
function submitForm() {
proxy.$refs["algRef"].validate(valid => {
if (valid) {
form.value.applicationScenarios=form.value.applicationScenarios.join()
if (form.value.id != undefined) {
addCaseFile()
updateAlg(form.value).then(response => {
......@@ -662,10 +664,10 @@ function handleSceneAdd() {
/** 删除按钮操作 */
function handleSceneDelete(row) {
const id = row.id || ids.value;
proxy.$modal.confirm('是否确认删除定时任务编号为"' + id + '"的数据项?').then(function () {
proxy.$modal.confirm('是否确认删除场景名称为"' + row.sceneName + '"的数据项?').then(function () {
return deleteScene(id);
}).then(() => {
getList();
getSceneList();
proxy.$modal.msgSuccess("删除成功");
}).catch(() => {});
}
......@@ -737,7 +739,7 @@ function handleBoundaryAdd() {
/** 删除按钮操作 */
function handleBoundaryDelete(row) {
const id = row.id || ids.value;
proxy.$modal.confirm('是否确认删除定时任务编号为"' + id + '"的数据项?').then(function () {
proxy.$modal.confirm('是否确认删除该算法边界?').then(function () {
return deleteBoundary(id);
}).then(() => {
getBoundaryList();
......
......@@ -82,7 +82,7 @@
@pagination="getList"
/>
</el-card>
<algForm ref="algFormRef" @getList1="getList"/>
<algForm ref="algFormRef" @getList="getList"/>
</div>
</template>
......
......@@ -32,8 +32,8 @@
<div class="form-title" style="display: flex;justify-content: flex-start;align-items: center;">
<span>应用场景</span>
</div>
<div style="background-color: #E6F3FF; min-height: 500px;">
<div v-if="applicationList.length==0" class="text-style" style="text-align: center;line-height: 500px;font-size: 26px;">
<div style="background-color: #E6F3FF; min-height: 270px;">
<div v-if="applicationList.length==0" class="text-style" style="text-align: center;line-height: 270px;font-size: 26px;">
暂无数据
</div>
<div class="alg-list">
......@@ -315,6 +315,7 @@ getDetials()
border-radius: 5px;
padding-left: 15px;
margin-top: 10px;
color: #fff;
}
// .form-title::before{
// content:"";
......
......@@ -89,7 +89,7 @@
<el-card v-for="item in algList" :key="item.name" class="alg-item" shadow="hover" @click="handDetails(item)">
<template v-slot:header>
<div class="cleartitle">
<span>{{item.algorithmName}}</span>
<span class="ellipsis">{{item.algorithmName}}</span>
<el-tag
:type=" item.algorithmStatus=='0'?'success':'danger'"
effect="dark"
......@@ -99,15 +99,19 @@
</div>
</template>
<template v-slot:default >
<div style="width: 100%;max-height: 200px;overflow: hidden;">
<div style="width: 100%;height: 200px;overflow: hidden;">
<img
:src="'http://192.168.3.82' +item.cardImg"
style="width: 100%;"
style="width: 100%;height: 100%;"
/>
</div>
<p style="color: #999999;font-size: 12px;">
<!-- <p class="ellipsis" style="color: #999999;font-size: 12px;height: 80px;">
{{item.cardCopywriting}}
</p>
</p> -->
<div class="more-ellipsis" style=" color: #999999; font-size: 12px;" :title="item.cardCopywriting"
>
{{ item.cardCopywriting }}
</div>
<div style="display: flex;justify-content: flex-end;position: absolute;right: 15px;bottom: 10px;" >
<el-button link type="primary" icon="Bottom" @click.stop="handleUpdate(item)" >下载</el-button>
<el-button link type="primary" icon="Edit" @click.stop="handleEnable(item)" >{{item.algorithmStatus=='0'?'禁用':'启用' }}</el-button>
......@@ -232,6 +236,20 @@
</script>
<style scoped lang="scss">
.more-ellipsis {
text-overflow: ellipsis;
display: -webkit-box;
overflow-wrap: break-word;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
margin: 5px 0;
}
.ellipsis {
overflow: hidden; /* 隐藏超出的内容 */
white-space: nowrap; /* 不换行 */
text-overflow: ellipsis; /* 显示省略号 */
}
.search-input{
display: flex;
width: 400px;
......
......@@ -83,13 +83,12 @@
</el-row>
<el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="设备名称" width="100" align="center" prop="deviceName" />
<el-table-column label="设备名称" width="200" align="center" prop="deviceName" :show-overflow-tooltip="true" />
<el-table-column label="设备编码" align="center" prop="deviceNo" :show-overflow-tooltip="true" />
<el-table-column label="设备视频流地址" align="center" prop="videoUrl" :show-overflow-tooltip="true" />
<el-table-column label="创建人" align="center" prop="createBy" :show-overflow-tooltip="true" />
<el-table-column label="创建时间" align="center" prop="createTime" :show-overflow-tooltip="true" />
<el-table-column label="设备是否有效" align="center" prop="isEffective" :show-overflow-tooltip="true" >
<el-table-column label="设备是否有效" width="150" align="center" prop="isEffective" :show-overflow-tooltip="true" >
<template #default="scope">
<el-tag
:type="scope.row.isEffective === '0'?'success' : 'danger'"
......@@ -99,11 +98,11 @@
</el-tag>
</template>
</el-table-column>
<el-table-column label="状态" align="center" prop="isOpen" :show-overflow-tooltip="true" >
<el-table-column label="状态" width="150" align="center" prop="isOpen" :show-overflow-tooltip="true" >
<template #default="scope">
<el-tag
:type="scope.row.isOpen === '0'?'success' : 'danger'"
effect="dark"
effect="plain"
>
{{scope.row.isOpen === '0'? '运行中' : '已禁用'}}
</el-tag>
......@@ -157,6 +156,7 @@
<el-form-item label="视频流类型" prop="videoUrlType">
<el-select v-model="form.videoUrlType" placeholder="请选择视频流类型" clearable >
<el-option :label="'RTSP类型'" :value="'rtsp'" />
<el-option :label="'RTMP类型'" :value="'rtmp'" />
</el-select>
</el-form-item>
</el-col>
......
......@@ -121,6 +121,64 @@
</el-table>
</div>
</el-tab-pane>
<el-tab-pane label="登录日志" name="登录日志">
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="登录地址" prop="ipaddr">
<el-input
v-model="queryParams.ipaddr"
placeholder="请输入登录地址"
clearable
style="width: 240px;"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="用户名称" prop="userName">
<el-input
v-model="queryParams.userName"
placeholder="请输入用户名称"
clearable
style="width: 240px;"
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item label="登录时间" style="width: 308px">
<el-date-picker
v-model="dateRange"
value-format="YYYY-MM-DD HH:mm:ss"
type="daterange"
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 1, 1, 23, 59, 59)]"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-table ref="logininforRef" v-loading="loading" :data="logininforList" @selection-change="handleSelectionChange" >
<el-table-column label="访问编号" align="center" prop="infoId" />
<el-table-column label="用户名称" align="center" prop="userName" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
<el-table-column label="地址" align="center" prop="ipaddr" :show-overflow-tooltip="true" />
<el-table-column label="登录地点" align="center" prop="loginLocation" :show-overflow-tooltip="true" />
<el-table-column label="操作系统" align="center" prop="os" :show-overflow-tooltip="true" />
<el-table-column label="浏览器" align="center" prop="browser" :show-overflow-tooltip="true" />
<el-table-column label="登录状态" align="center" prop="status">
<template #default="scope">
<dict-tag :options="sys_common_status" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="描述" align="center" prop="msg" :show-overflow-tooltip="true" />
<el-table-column label="访问时间" align="center" prop="loginTime" sortable="custom" :sort-orders="['descending', 'ascending']" width="180">
<template #default="scope">
<span>{{ parseTime(scope.row.loginTime) }}</span>
</template>
</el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
v-model:limit="queryParams.pageSize" @pagination="getAllList" />
......@@ -190,7 +248,8 @@
<script setup name="Job">
import {listAlgLog,listCameraLog} from "@/api/logControl/index";
import { list, } from "@/api/monitor/operlog";
import { list as OpList } from "@/api/monitor/operlog";
import { list as LoList} from "@/api/monitor/logininfor";
import { get } from "@vueuse/core";
const router = useRouter();
const { proxy } = getCurrentInstance();
......@@ -205,6 +264,7 @@ const activeName = ref("摄像头日志");
const AlgLogList = ref([]);
const CameraLogList = ref([]);
const OperateLogList = ref([]);
const logininforList = ref([]);
const open = ref(false);
const loading = ref(true);
const showSearch = ref(true);
......@@ -250,6 +310,7 @@ function getAllList(){
if(activeName.value=='摄像头日志') getCameraLogList()
if(activeName.value=='算法日志') getAlgLogList()
if(activeName.value=='操作日志') getOperateLogList()
if(activeName.value=='登录日志') getLogininforList()
}
/** 查询算法日志列表 */
......@@ -278,7 +339,7 @@ function getCameraLogList() {
/** 查询操作日志列表 */
function getOperateLogList() {
loading.value = true;
list(proxy.addDateRange(queryParams.value, dateRange.value)).then(
OpList(proxy.addDateRange(queryParams.value, dateRange.value)).then(
(response) => {
OperateLogList.value = response.rows;
total.value = response.total;
......@@ -287,6 +348,18 @@ function getOperateLogList() {
);
}
/** 查询登录日志列表 */
function getLogininforList() {
loading.value = true;
LoList(proxy.addDateRange(queryParams.value, dateRange.value)).then(
(response) => {
logininforList.value = response.rows;
total.value = response.total;
loading.value = false;
}
);
}
/** 任务组名字典翻译 */
function jobGroupFormat(row, column) {
return proxy.selectDictLabel(sys_job_group.value, row.jobGroup);
......
......@@ -24,7 +24,16 @@
highlight-current
default-expand-all
@node-click="handleNodeClick"
/>
>
<template #default="{ node, data }">
<span class="custom-tree-node">
<el-icon v-if="handjudge(data)"><MapLocation /></el-icon>
<el-icon v-else><VideoCamera /></el-icon>
&nbsp;
<span>{{ node.label }}</span>
</span>
</template>
</el-tree>
</div>
</el-card>
</el-col>
......@@ -103,9 +112,9 @@ import '@/utils/jsmpeg.min'
import { listAiRegionManage,videoTreeListManage,idDevice } from "@/api/videoControl/videoPreview";
import { listAlarm } from "@/api/alarmControl/index.js";
import { onMounted, reactive, ref, } from "vue";
import { el } from "element-plus/es/locales.mjs";
const { proxy } = getCurrentInstance();
const globalScreenHeight = inject('globalScreenHeight');
const algFormRef = ref(null);
const nowText = ref("视频预览");
const deptTreeRef = ref(null);
const deptName = ref("");
......@@ -190,10 +199,16 @@ function handleNodeClick(row) {
queryParams.value.locationId = null;
}
getWaringData()
}
function handAdd(row) {
algFormRef.value.handleAdd();
function handjudge(row) {
const treeType = row.id.split("-")[0];
if(treeType=='区域'){
return true
}else{
return false
}
}
function handlvideoPath(id) {
......
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