Commit 58c76b7a by Tianqing Liu

feat: 抓拍记录支持删除功能

1 parent 726b6926
......@@ -125,6 +125,18 @@
class="downBtn downBtn1">
特征
</span>
<a-popconfirm
title="确认删除?"
ok-text="是"
cancel-text="否"
@confirm="handleDeleteFileConfirm(item)"
>
<span
style="margin-right: 10px"
class="downBtn downBtn1"
@click="handleDeleteFile(item, $event)"
>删除</span>
</a-popconfirm>
</div>
<el-image :src="item.picture_url"
:fit="'fill'"
......@@ -468,7 +480,7 @@ export default {
}
default:
{
break
}
}
......@@ -498,6 +510,27 @@ export default {
const downloadFile = function(url) {
window.open(url)
}
// 删除抓拍记录
const handleDeleteFile = (data, event) => {
console.log('handleDeleteFile', data, event)
event.stopPropagation()
}
const handleDeleteFileConfirm = (data) => {
console.log('handleDeleteFileConfirm', data)
snapshotRecordApi.delRecord(data).then(
(r) => {
console.log(r)
if(r.msg_code==200){
ElMessage({
message: `删除成功`,
type: 'success'
})
clickSearch()
}
}
)
}
const downloadTrajectoryFile = function(url){
window.open(url)
}
......@@ -606,6 +639,8 @@ export default {
confirmSearch,
formatDirection,
downloadFile,
handleDeleteFile,
handleDeleteFileConfirm,
downloadTrajectoryFile,
handleClick,
comparativeFun,
......
......@@ -77,6 +77,7 @@ class SnapshotRecordApi {
}
)
}
// 删除抓拍记录
delRecord(data) {
return axiosInstance.request(
{
......@@ -85,7 +86,6 @@ class SnapshotRecordApi {
}
)
}
}
const snapshotRecordApi = new SnapshotRecordApi()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!