role1.0
fanluyan 1 year ago
parent f18923ebf1
commit b3a60b2240

@ -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;

@ -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;

@ -54,10 +54,7 @@
}}</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200">
<template
slot-scope="scope"
v-if="scope.row.roleName !== '超级管理员'"
>
<template slot-scope="scope" v-if="scope.row.role !== 0">
<el-button
@click.native.stop="handleResive(scope.row)"
type="text"

@ -3,12 +3,12 @@ const { defineConfig } = require("@vue/cli-service");
// const webpack = require("webpack");
module.exports = defineConfig({
//打包清除console
chainWebpack(config) {
config.optimization.minimizer("terser").tap((args) => {
args[0].terserOptions.compress.drop_console = true;
return args;
});
},
// chainWebpack(config) {
// config.optimization.minimizer("terser").tap((args) => {
// args[0].terserOptions.compress.drop_console = true;
// return args;
// });
// },
productionSourceMap: false, // 生产环境是否要生成 sourceMap
publicPath: process.env.PUBLIC_PATH ? process.env.PUBLIC_PATH : "./", // 部署应用包时的基本 URL
//assetsPublicPath: process.env.NODE_ENV === "production" ? "" : "/",

Loading…
Cancel
Save