|
|
@@ -11,7 +11,7 @@ |
|
|
|
<el-button icon="CirclePlus" @click="append('add', {})" type="primary">添加分组</el-button> |
|
|
|
</div> |
|
|
|
<div class="treeContent"> |
|
|
|
<el-input v-model="filterText" style="width: 240px" placeholder="请输入关键字" /> |
|
|
|
<el-input clearable v-model="filterText" style="width: 100%" placeholder="请输入关键字" /> |
|
|
|
<el-tree |
|
|
|
style="max-width: 600px" |
|
|
|
ref="treeRef" |
|
|
@@ -60,11 +60,25 @@ |
|
|
|
<!-- 表格 菜单类型 按钮 --> |
|
|
|
<!-- 操作 --> |
|
|
|
<template #operation="scope"> |
|
|
|
<s-button link :opt="FormOptEnum.EDIT" @click="onOpen(FormOptEnum.EDIT, scope.row)">编辑</s-button> |
|
|
|
<s-button link :opt="FormOptEnum.VIEW" @click="onDetail(scope.row)"> 查看 </s-button> |
|
|
|
<s-button link :opt="FormOptEnum.DELETE" @click="onDelete([scope.row.id], `确定删除该摄像头吗?`)" /> |
|
|
|
<!-- <el-button link type="primary" :icon="Avatar" /> --> |
|
|
|
<s-button link :opt="FormOptEnum.VIEW" @click="pushPerson(FormOptEnum.VideoPushPerson, scope.row)"> 推送人 </s-button> |
|
|
|
<el-space> |
|
|
|
<s-button link :opt="FormOptEnum.EDIT" @click="onOpen(FormOptEnum.EDIT, scope.row)">编辑</s-button> |
|
|
|
<s-button link :opt="FormOptEnum.VIEW" @click="onDetail(scope.row)"> 查看 </s-button> |
|
|
|
<!-- <s-button link :opt="FormOptEnum.DELETE" @click="onDelete([scope.row.id], `确定删除该摄像头吗?`)" /> |
|
|
|
<s-button link :opt="FormOptEnum.VIEW" @click="pushPerson(FormOptEnum.VideoPushPerson, scope.row)"> 推送人 </s-button> --> |
|
|
|
<el-dropdown @command="handleCommand"> |
|
|
|
<el-link type="primary" :underline="false" :icon="ArrowDown"> 更多 </el-link> |
|
|
|
<template #dropdown> |
|
|
|
<el-dropdown-menu> |
|
|
|
<el-dropdown-item :command="command(scope.row, cmdEnum.Delete)"> |
|
|
|
{{ cmdEnum.Delete }} |
|
|
|
</el-dropdown-item> |
|
|
|
<el-dropdown-item :command="command(scope.row, cmdEnum.pushPerson)"> |
|
|
|
{{ cmdEnum.pushPerson }} |
|
|
|
</el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
|
</template> |
|
|
|
</el-dropdown> |
|
|
|
</el-space> |
|
|
|
</template> |
|
|
|
</ProTable> |
|
|
|
<!-- 添加分组弹框 --> |
|
|
@@ -114,11 +128,12 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script setup lang="tsx" name="sysSpa"> |
|
|
|
<script setup lang="tsx" name="live"> |
|
|
|
import VideoPlay from "@/components/VideoPlay/videoplay.vue"; |
|
|
|
import { ElMessage, ElMessageBox, ElTree } from "element-plus"; |
|
|
|
import { ArrowDown,More } from "@element-plus/icons-vue"; |
|
|
|
import type Node from "element-plus/es/components/tree/src/model/node"; |
|
|
|
import { monitorLIVEApi, monitorLiveButtonCode } from "@/api"; |
|
|
|
import { monitorLIVEApi, monitorLiveButtonCode,SysOrg,SysUserPersonnel } from "@/api"; |
|
|
|
import { sysCamera } from "@/api/interface"; |
|
|
|
import { useHandleData } from "@/hooks/useHandleData"; |
|
|
|
import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface"; |
|
|
@@ -147,6 +162,50 @@ enum FormOptEnum { |
|
|
|
// 分组 |
|
|
|
GROUP = "分组" |
|
|
|
} |
|
|
|
/** 更多下拉菜单命令枚举 */ |
|
|
|
enum cmdEnum { |
|
|
|
Delete = "删除", |
|
|
|
pushPerson = "推送人" |
|
|
|
} |
|
|
|
/** 下拉菜单参数接口 */ |
|
|
|
interface Command { |
|
|
|
row: SysUserPersonnel.SysUserPerInfo; |
|
|
|
command: cmdEnum; |
|
|
|
} |
|
|
|
|
|
|
|
/**配置command的参数 */ |
|
|
|
function command(row: SysUserPersonnel.SysUserPerInfo, command: cmdEnum): Command { |
|
|
|
return { |
|
|
|
row: row, |
|
|
|
command: command |
|
|
|
}; |
|
|
|
} |
|
|
|
function handleCommand(command: Command) { |
|
|
|
switch (command.command) { |
|
|
|
case cmdEnum.Delete: |
|
|
|
ElMessageBox.confirm(`确定要删除此数据吗?`, "提示", { |
|
|
|
confirmButtonText: "确定", |
|
|
|
cancelButtonText: "取消", |
|
|
|
type: "warning" |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
onDelete([command.row.id]) |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}) |
|
|
|
break |
|
|
|
case cmdEnum.pushPerson: |
|
|
|
pushPerson(FormOptEnum.VideoPushPerson, command.row) |
|
|
|
// userManagePersonnelApi.personUnBindDfie({ |
|
|
|
// personId:command.row.personId, |
|
|
|
// personSetId: command.row.personSets[0].personSetId |
|
|
|
// }).then(res=>{ |
|
|
|
// ElMessage.success('底库解绑成功'); |
|
|
|
// RefreshTable() |
|
|
|
// }) |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
// 分组字段配置 |
|
|
|
const defaultProps = { |
|
|
|
children: "children", |
|
|
@@ -299,6 +358,7 @@ function omMove(opt: FormOptEnum, record: {} | SysOrg.SysOrgInfo = {}) { |
|
|
|
* @param ids id数组 |
|
|
|
*/ |
|
|
|
async function onDelete(ids: string[], msg: string) { |
|
|
|
console.log(1) |
|
|
|
return; |
|
|
|
// 二次确认 => 请求api => 刷新表格 |
|
|
|
await useHandleData(monitorLIVEApi.delete, { ids }, msg); |
|
|
@@ -417,7 +477,7 @@ function getvideo2() { |
|
|
|
source: detailData.videoUrl + "&subaudio=no&jitterbuffer=6000", |
|
|
|
// "rtsFallbackSource": "降级地址,如HLS", |
|
|
|
width: "100%", |
|
|
|
height: "600px", |
|
|
|
height: "500px", |
|
|
|
autoplay: true, |
|
|
|
isLive: true, |
|
|
|
playsinline: true, |
|
|
|