添加撤销操作功能
This commit is contained in:
parent
3ad4f9c04e
commit
df715f924d
|
|
@ -15,6 +15,14 @@ export const delayVideoService = (data) => {
|
|||
return request.post('/video/delay', params, { headers : {'token': data.token }});
|
||||
}
|
||||
|
||||
export const quashVideoService = (data) => {
|
||||
const params = new URLSearchParams();
|
||||
for (let key in data) {
|
||||
params.append(key, data[key])
|
||||
}
|
||||
return request.post('/video/quash_option', params, { headers : {'token': data.token }});
|
||||
}
|
||||
|
||||
export const getVideoListService = (data) => {
|
||||
const params = new URLSearchParams();
|
||||
let hour = data['hour'];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
import axios from "axios";
|
||||
import { inject } from "vue";
|
||||
import { getVideoListService } from "@/api/video.js";
|
||||
import { getVideoListService, quashVideoService } from "@/api/video.js";
|
||||
import { delayVideoService } from "@/api/video.js";
|
||||
import router from "@/router/index.js";
|
||||
|
||||
|
|
@ -63,6 +63,16 @@ export default {
|
|||
handleMenuSelect(val) {
|
||||
router.push(val);
|
||||
},
|
||||
async quashOption() {
|
||||
// 撤销操作
|
||||
let result=await quashVideoService(this.tokenData);
|
||||
if (result.code == 0) {
|
||||
alert(result.message);
|
||||
this.getVideoList();
|
||||
} else {
|
||||
alert("操作失败");
|
||||
}
|
||||
},
|
||||
onSubmit() {
|
||||
getVideoList({ token: token });
|
||||
},
|
||||
|
|
@ -282,6 +292,11 @@ export default {
|
|||
>设备信息</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="quashOption()"
|
||||
>撤销操作</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>
|
||||
所有文件大小: {{ parseFloat(this.file_sum_size/1024/1024).toFixed(2) }} GB
|
||||
</el-form-item> -->
|
||||
|
|
|
|||
Loading…
Reference in New Issue