Merge remote-tracking branch 'origin/master'

master
schry 2 years ago
commit 879c2f1c93

@ -133,3 +133,18 @@ export function getTraceHistoryTaskList(query) {
params: 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)" @click.native="handleView(scope.row,scope.index)"
>详情 >详情
</el-button> </el-button>
<el-button type="text" @click.native="deleteView(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -289,7 +290,7 @@
<script> <script>
import {isBlank} from "@/utils/strUtil"; import {isBlank} from "@/utils/strUtil";
import {getTraceHistoryTaskList} from "@/api/udi/udiTrace"; import {deleteTaskList, getTraceHistoryTaskList} from "@/api/udi/udiTrace";
const formJson = { const formJson = {
id: "", id: "",
passWord: "", passWord: "",
@ -420,7 +421,40 @@ export default {
return '任务状态有误!!'; 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){ handleView(row){
this.taskList.forEach(obj => { 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="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="createTime" width="180"show-overflow-tooltip></el-table-column>
<!-- <el-table-column label="更新时间" prop="updateTime" width="180"></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"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
@click.native="handleView(scope.row,scope.index)" @click.native="handleView(scope.row,scope.index)"
>详情 >详情
</el-button> </el-button>
<el-button type="text" @click.native="deleteView(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -276,7 +277,8 @@
<script> <script>
import {isBlank} from "@/utils/strUtil"; 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 = { const formJson = {
id: "", id: "",
@ -408,7 +410,40 @@ export default {
return '任务状态有误!!'; 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) { handleView(row) {
this.taskList.forEach(obj => { this.taskList.forEach(obj => {

Loading…
Cancel
Save