feat:新增外链删除

This commit is contained in:
songwc
2022-11-01 18:22:05 +08:00
parent 57509c7e8c
commit 6a643fe6ee

View File

@@ -539,6 +539,7 @@ import AddVote from "../../components/drawers/AddVote.vue";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import * as api from "../../api/indexTaskadd"; import * as api from "../../api/indexTaskadd";
import * as apilive from "../../api/indexLiveBroadcast"; import * as apilive from "../../api/indexLiveBroadcast";
import * as apiExternal from "../../api/indexExternalChain";
import * as apieval from "../../api/indexEval"; import * as apieval from "../../api/indexEval";
const drawercolumns = [ const drawercolumns = [
{ {
@@ -671,6 +672,7 @@ export default {
haspub: false, haspub: false,
checked1: false, checked1: false,
checkedd: false, checkedd: false,
id: "ssss",
}, },
{ {
key: 2, key: 2,
@@ -855,6 +857,7 @@ export default {
isactive: -1, isactive: -1,
isActive: false, isActive: false,
deleteLiveID: null, //删除直播id deleteLiveID: null, //删除直播id
deleteExternalID: null, //删除外链id
}); });
const selectProjectName = (value, index) => { const selectProjectName = (value, index) => {
console.log("value", value, index); console.log("value", value, index);
@@ -963,7 +966,7 @@ export default {
// width: 100, // width: 100,
align: "center", align: "center",
scopedSlots: { customRender: "action" }, scopedSlots: { customRender: "action" },
customRender: () => { customRender: (text) => {
return ( return (
<div class="opa"> <div class="opa">
<div class="opacation"> <div class="opacation">
@@ -979,7 +982,13 @@ export default {
style="color:#4EA6FF;cursor:pointer" style="color:#4EA6FF;cursor:pointer"
onClick={() => { onClick={() => {
showDelete(); showDelete();
{/* deleteEvalText(); */} {
/* state.deleteLiveID = text.record.id; */
}
{
/* deleteEvalText(); */
}
console.log(text.record.id);
}} }}
> >
删除 删除
@@ -1026,11 +1035,26 @@ export default {
console.log(err); console.log(err);
}); });
}; };
//删除外链
const deleteExternalChain = () => {
let obj = {
linkId: state.deleteExternalID,
};
apiExternal
.deleteLink(obj)
.then((res) => {
console.log(res);
})
.catch((err) => {
console.log(err);
});
};
//删除评估测试 //删除评估测试
const deleteEvalText = () => { const deleteEvalText = () => {
let obj = { let obj = {
evaluationId:state.deleteLiveID, evaluationId: state.deleteLiveID,
}; };
apieval apieval
.deleteEvaluationById(obj) .deleteEvaluationById(obj)
@@ -1173,6 +1197,7 @@ export default {
getTask, getTask,
deleteLiveBroadcast, deleteLiveBroadcast,
deleteEvalText, deleteEvalText,
deleteExternalChain,
}; };
}, },
}; };