feat 接口联调

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Ironsp
2026-05-25 08:34:17 +08:00
parent 0341cb07dc
commit 466230c2c0
4 changed files with 165 additions and 26 deletions

View File

@@ -9,8 +9,8 @@
<el-option label="绑定的设备" :value="0" />
</el-select>
</el-form-item>
<el-form-item label="报警编号" prop="deviceId">
<el-input v-model="queryParams.deviceId" placeholder="请输入设备编号" clearable @keyup.enter="handleQuery" />
<el-form-item label="报警编号" prop="alarmCode">
<el-input v-model="queryParams.alarmCode" placeholder="请输入报警编号" clearable @keyup.enter="handleQuery" />
</el-form-item>
<el-form-item label="报警时间" prop="queryTime">
<el-date-picker
@@ -56,13 +56,13 @@
<el-table-column label="录像编号" align="center" prop="code" width="90" />
<el-table-column label="文件名称" align="center" prop="videoName" min-width="170" />
<el-table-column label="所属设备" align="center" prop="deviceName" min-width="120" show-overflow-tooltip />
<el-table-column label="报警编号" align="center" prop="alarmId" min-width="120" show-overflow-tooltip />
<el-table-column label="报警编号" align="center" prop="alarmCode" min-width="120" show-overflow-tooltip />
<el-table-column label="录像开始时间" align="center" prop="startTime" min-width="120" show-overflow-tooltip />
<el-table-column label="录像结束时间" align="center" prop="endTime" min-width="120" show-overflow-tooltip />
<el-table-column label="录像时长" align="center" prop="duration" min-width="120" show-overflow-tooltip />
<el-table-column label="录像时长" align="center" prop="durationFormat" min-width="120" show-overflow-tooltip />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
<template #default="scope">
<el-button type="primary" @click="handleUpdate(scope.row)">播放</el-button>
<el-button type="primary" @click="handlePlay(scope.row)">播放</el-button>
<el-button type="primary" @click="handleUpload(scope.row)">下载至本地</el-button>
</template>
</el-table-column>
@@ -100,7 +100,7 @@ const ids = ref<Array<string | number>>([]);
const single = ref(true);
const multiple = ref(true);
const total = ref(0);
const monitorVideoUrl = 'http://192.168.0.214:8088/5a0db047943df198aff98b650ac9e001.mp4';
const monitorVideoUrl = ref();
const queryFormRef = ref<ElFormInstance>();
const demoFormRef = ref<ElFormInstance>();
@@ -187,7 +187,7 @@ const handleAdd = () => {
};
/** 修改按钮操作 */
const handleUpdate = async (row?: any) => {
const handlePlay = async (row?: any) => {
// reset();
// const _id = row?.id || ids.value[0];
// const res = await getDemo(_id);
@@ -199,9 +199,15 @@ const handleUpdate = async (row?: any) => {
proxy?.$modal.msgError('视频地址不存在');
return;
}
monitorVideoUrl.value = row.videoUrl;
dialog.visible = true;
};
const handleUpload = async (row?: any) => {
if (!row || !row.zipUrl) {
proxy?.$modal.msgError('下载地址不存在');
return;
}
proxy?.$download.zip(row.zipUrl, row.zipUrl);
console.log('点击下载');
};