master
1178634255 2 years ago
parent 9c9972cba9
commit 562879cfd9

@ -133,3 +133,18 @@ export function getTraceHistoryTaskList(query) {
params: query
})
}
export function deleteTaskView(query) {
return axios({
url: "udi/trace/task/delete",
method: "post",
data: query
});
}
export function deleteTaskList(query) {
return axios({
url: "udi/trace/task/deleteTaskList",
method: "post",
data: query
});
}

@ -172,6 +172,7 @@
@click.native="handleView(scope.row,scope.index)"
>详情
</el-button>
<el-button type="text" @click.native="deleteView(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -289,7 +290,7 @@
<script>
import {isBlank} from "@/utils/strUtil";
import {getTraceHistoryTaskList} from "@/api/udi/udiTrace";
import {deleteTaskList, getTraceHistoryTaskList} from "@/api/udi/udiTrace";
const formJson = {
id: "",
passWord: "",
@ -420,7 +421,40 @@ export default {
return '任务状态有误!!';
}
},
//
deleteView(rowId) {
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteTask(rowId);
})
.catch(() => {
});
},
deleteTask(data) {
this.loading = true;
let tquery = {
id: data.id + "",
};
deleteTaskList(tquery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.getTaskList();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
//
handleView(row){
this.taskList.forEach(obj => {

@ -152,13 +152,14 @@
<el-table-column label="序列号" prop="serialNo" width="120"show-overflow-tooltip></el-table-column>
<el-table-column label="创建时间" prop="createTime" width="180"show-overflow-tooltip></el-table-column>
<!-- <el-table-column label="更新时间" prop="updateTime" width="180"></el-table-column>-->
<el-table-column label="操作" width="80" fixed="right">
<el-table-column label="操作" width="100" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
@click.native="handleView(scope.row,scope.index)"
>详情
</el-button>
<el-button type="text" @click.native="deleteView(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -276,7 +277,8 @@
<script>
import {isBlank} from "@/utils/strUtil";
import {getTraceTaskList} from "@/api/udi/udiTrace";
import {getTraceTaskList,deleteTaskView} from "@/api/udi/udiTrace";
import {deleteDict} from "@/api/basic/UdiBasic";
const formJson = {
id: "",
@ -408,7 +410,40 @@ export default {
return '任务状态有误!!';
}
},
//
deleteView(rowId) {
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.deleteTask(rowId);
})
.catch(() => {
});
},
deleteTask(data) {
this.loading = true;
let tquery = {
id: data.id + "",
};
deleteTaskView(tquery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.getTaskList();
this.$message({
type: "success",
message: "删除成功!",
});
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
//
handleView(row) {
this.taskList.forEach(obj => {

Loading…
Cancel
Save