|
|
|
@ -261,16 +261,15 @@
|
|
|
|
|
type="text"
|
|
|
|
|
class="deleteText"
|
|
|
|
|
@click.native.stop="handleDelete(scope.row)"
|
|
|
|
|
v-if="scope.row.status == 1"
|
|
|
|
|
>关闭</el-button
|
|
|
|
|
>删除</el-button
|
|
|
|
|
>
|
|
|
|
|
<el-button
|
|
|
|
|
<!-- <el-button
|
|
|
|
|
type="text"
|
|
|
|
|
class="deleteText"
|
|
|
|
|
@click.native.stop="handleOpen(scope.row)"
|
|
|
|
|
v-if="scope.row.status == 0"
|
|
|
|
|
>打开</el-button
|
|
|
|
|
>
|
|
|
|
|
> -->
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column fixed="right" label="操作" width="180" v-else>
|
|
|
|
@ -591,65 +590,24 @@ export default {
|
|
|
|
|
//删除数据
|
|
|
|
|
handleDelete(data) {
|
|
|
|
|
console.log(data);
|
|
|
|
|
this.deleteArr.push({
|
|
|
|
|
termid: data.id,
|
|
|
|
|
});
|
|
|
|
|
this.deleteArr.push(data.id);
|
|
|
|
|
console.log(this.deleteArr);
|
|
|
|
|
this.$confirm("确定要关闭该装置?", "提示", {
|
|
|
|
|
this.$confirm("确定要删除该装置?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "warning",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
// 行设置向后台请求删除数据
|
|
|
|
|
deleteTerminalJoggle({ list: this.deleteArr, type: 0 }).then(
|
|
|
|
|
(res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.deleteArr = [];
|
|
|
|
|
this.terminalList(); //刷新
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
this.$message({
|
|
|
|
|
duration: 1500,
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "关闭成功!",
|
|
|
|
|
showClose: true,
|
|
|
|
|
deleteTerminalJoggle({ list: this.deleteArr }).then((res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.deleteArr = [];
|
|
|
|
|
this.terminalList(); //刷新
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
// this.$message({
|
|
|
|
|
// duration: 1500,
|
|
|
|
|
// type: "info",
|
|
|
|
|
// message: "已取消删除",
|
|
|
|
|
// showClose: true,
|
|
|
|
|
// });
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
//打开该装置
|
|
|
|
|
handleOpen(data) {
|
|
|
|
|
console.log(data);
|
|
|
|
|
this.deleteArr.push({
|
|
|
|
|
termid: data.id,
|
|
|
|
|
});
|
|
|
|
|
console.log(this.deleteArr);
|
|
|
|
|
this.$confirm("确定要打开该装置?", "提示", {
|
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
|
type: "success",
|
|
|
|
|
})
|
|
|
|
|
.then(() => {
|
|
|
|
|
// 行设置向后台请求删除数据
|
|
|
|
|
deleteTerminalJoggle({ list: this.deleteArr, type: 1 }).then(
|
|
|
|
|
(res) => {
|
|
|
|
|
console.log(res);
|
|
|
|
|
this.deleteArr = [];
|
|
|
|
|
this.terminalList(); //刷新
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
this.$message({
|
|
|
|
|
duration: 1500,
|
|
|
|
|
type: "success",
|
|
|
|
|
message: "打开成功!",
|
|
|
|
|
message: "关闭成功!",
|
|
|
|
|
showClose: true,
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
@ -662,6 +620,43 @@ export default {
|
|
|
|
|
// });
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// //打开该装置
|
|
|
|
|
// handleOpen(data) {
|
|
|
|
|
// console.log(data);
|
|
|
|
|
// this.deleteArr.push({
|
|
|
|
|
// termid: data.id,
|
|
|
|
|
// });
|
|
|
|
|
// console.log(this.deleteArr);
|
|
|
|
|
// this.$confirm("确定要打开该装置?", "提示", {
|
|
|
|
|
// confirmButtonText: "确定",
|
|
|
|
|
// cancelButtonText: "取消",
|
|
|
|
|
// type: "success",
|
|
|
|
|
// })
|
|
|
|
|
// .then(() => {
|
|
|
|
|
// // 行设置向后台请求删除数据
|
|
|
|
|
// deleteTerminalJoggle({ list: this.deleteArr, type: 1 }).then(
|
|
|
|
|
// (res) => {
|
|
|
|
|
// console.log(res);
|
|
|
|
|
// this.deleteArr = [];
|
|
|
|
|
// this.terminalList(); //刷新
|
|
|
|
|
// }
|
|
|
|
|
// );
|
|
|
|
|
// this.$message({
|
|
|
|
|
// duration: 1500,
|
|
|
|
|
// type: "success",
|
|
|
|
|
// message: "打开成功!",
|
|
|
|
|
// showClose: true,
|
|
|
|
|
// });
|
|
|
|
|
// })
|
|
|
|
|
// .catch(() => {
|
|
|
|
|
// // this.$message({
|
|
|
|
|
// // duration: 1500,
|
|
|
|
|
// // type: "info",
|
|
|
|
|
// // message: "已取消删除",
|
|
|
|
|
// // showClose: true,
|
|
|
|
|
// // });
|
|
|
|
|
// });
|
|
|
|
|
// },
|
|
|
|
|
//点击分页
|
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
|
this.page = val;
|
|
|
|
|