From b3a60b2240682f1879c196c264dce7fb800e2a82 Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Thu, 14 Mar 2024 17:12:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/request.js | 1 + src/views/photographicDevice/index.vue | 99 +++++++++++------------- src/views/system/user/userManagement.vue | 5 +- vue.config.js | 12 +-- 4 files changed, 55 insertions(+), 62 deletions(-) diff --git a/src/utils/request.js b/src/utils/request.js index 84c54de..22584aa 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -13,6 +13,7 @@ const service = axios.create({ service.interceptors.request.use((config) => { if (localStorage.getItem("token")) { + console.log("aaaaaaaaaaaaaa", localStorage.getItem("token")); config.headers.Authorization = localStorage.getItem("token"); } return config; diff --git a/src/views/photographicDevice/index.vue b/src/views/photographicDevice/index.vue index 911e25c..1a3d1f8 100644 --- a/src/views/photographicDevice/index.vue +++ b/src/views/photographicDevice/index.vue @@ -261,16 +261,15 @@ type="text" class="deleteText" @click.native.stop="handleDelete(scope.row)" - v-if="scope.row.status == 1" - >关闭删除 - 打开 + > --> @@ -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; diff --git a/src/views/system/user/userManagement.vue b/src/views/system/user/userManagement.vue index 782c990..1f7e6fa 100644 --- a/src/views/system/user/userManagement.vue +++ b/src/views/system/user/userManagement.vue @@ -54,10 +54,7 @@ }} -