Commit 58c76b7a by Tianqing Liu

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

1 parent 726b6926
...@@ -125,6 +125,18 @@ ...@@ -125,6 +125,18 @@
class="downBtn downBtn1"> class="downBtn downBtn1">
特征 特征
</span> </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> </div>
<el-image :src="item.picture_url" <el-image :src="item.picture_url"
:fit="'fill'" :fit="'fill'"
...@@ -468,7 +480,7 @@ export default { ...@@ -468,7 +480,7 @@ export default {
} }
default: default:
{ {
break break
} }
} }
...@@ -498,6 +510,27 @@ export default { ...@@ -498,6 +510,27 @@ export default {
const downloadFile = function(url) { const downloadFile = function(url) {
window.open(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){ const downloadTrajectoryFile = function(url){
window.open(url) window.open(url)
} }
...@@ -606,6 +639,8 @@ export default { ...@@ -606,6 +639,8 @@ export default {
confirmSearch, confirmSearch,
formatDirection, formatDirection,
downloadFile, downloadFile,
handleDeleteFile,
handleDeleteFileConfirm,
downloadTrajectoryFile, downloadTrajectoryFile,
handleClick, handleClick,
comparativeFun, comparativeFun,
......
...@@ -77,6 +77,7 @@ class SnapshotRecordApi { ...@@ -77,6 +77,7 @@ class SnapshotRecordApi {
} }
) )
} }
// 删除抓拍记录
delRecord(data) { delRecord(data) {
return axiosInstance.request( return axiosInstance.request(
{ {
...@@ -85,7 +86,6 @@ class SnapshotRecordApi { ...@@ -85,7 +86,6 @@ class SnapshotRecordApi {
} }
) )
} }
} }
const snapshotRecordApi = new 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!