|
@@ -24,9 +24,23 @@
|
|
</ul>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<!-- <el-button type="primary" class="addUser" v-if="isAdmin" @click="addUser">新增用户</el-button> -->
|
|
<!-- <el-button type="primary" class="addUser" v-if="isAdmin" @click="addUser">新增用户</el-button> -->
|
|
- <div class="downlodTables" @click="downlodTable" v-if="actives != 2">
|
|
|
|
|
|
+ <div class="downlodTables" @click="downlodTables" v-if="actives != 4">
|
|
导入
|
|
导入
|
|
</div>
|
|
</div>
|
|
|
|
+ <!-- <el-upload
|
|
|
|
+ v-if="actives != 2"
|
|
|
|
+ class="upload-demo"
|
|
|
|
+ :action="url"
|
|
|
|
+ :on-preview="handlePreview"
|
|
|
|
+ :on-remove="handleRemove"
|
|
|
|
+ :before-remove="beforeRemove"
|
|
|
|
+ multiple
|
|
|
|
+ :limit="3"
|
|
|
|
+ :on-exceed="handleExceed"
|
|
|
|
+ :file-list="fileList"
|
|
|
|
+ >
|
|
|
|
+ <div class="downlodTables" v-if="actives != 2">导入</div>
|
|
|
|
+ </el-upload> -->
|
|
<div class="downlodTable" @click="downlodTable" v-if="actives != 2">
|
|
<div class="downlodTable" @click="downlodTable" v-if="actives != 2">
|
|
导出
|
|
导出
|
|
</div>
|
|
</div>
|
|
@@ -280,6 +294,10 @@ import {
|
|
labelConfiguration,
|
|
labelConfiguration,
|
|
alarmConfiguration,
|
|
alarmConfiguration,
|
|
alarmConfigurationele,
|
|
alarmConfigurationele,
|
|
|
|
+ ImportAlarm,
|
|
|
|
+ Importnetwork,
|
|
|
|
+ Importorder,
|
|
|
|
+ Importlabel,
|
|
} from "@/api/request.js";
|
|
} from "@/api/request.js";
|
|
import FileSaver from "file-saver";
|
|
import FileSaver from "file-saver";
|
|
import XLSX from "xlsx";
|
|
import XLSX from "xlsx";
|
|
@@ -313,6 +331,16 @@ export default {
|
|
}
|
|
}
|
|
};
|
|
};
|
|
return {
|
|
return {
|
|
|
|
+ fileList: [
|
|
|
|
+ {
|
|
|
|
+ name: "food.jpeg",
|
|
|
|
+ url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name: "food2.jpeg",
|
|
|
|
+ url: "https://fuss10.elemecdn.com/3/63/4e7f3a15429bfda99bce42a18cdd1jpeg.jpeg?imageMogr2/thumbnail/360x360/format/webp/quality/100",
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
currentPage3: 1,
|
|
currentPage3: 1,
|
|
totalPages: 0,
|
|
totalPages: 0,
|
|
dialogVisiblenetwork: false, //新增网络配置
|
|
dialogVisiblenetwork: false, //新增网络配置
|
|
@@ -321,6 +349,7 @@ export default {
|
|
dialogVisibledlabe: false, //新增标签
|
|
dialogVisibledlabe: false, //新增标签
|
|
listdata: {},
|
|
listdata: {},
|
|
alarList: {},
|
|
alarList: {},
|
|
|
|
+ url: "",
|
|
pageSize: 1,
|
|
pageSize: 1,
|
|
deleContent: {
|
|
deleContent: {
|
|
name: "删除告警信息",
|
|
name: "删除告警信息",
|
|
@@ -468,6 +497,45 @@ export default {
|
|
},
|
|
},
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ downlodTables() {
|
|
|
|
+ this.$confirm("是否需要导入xlsx文档, 是否继续?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.ImportUp();
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "导入成功!",
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: "info",
|
|
|
|
+ message: "已取消导入",
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ ImportUp() {
|
|
|
|
+ if (this.actives == 0) {
|
|
|
|
+ Importnetwork().then((res) => {
|
|
|
|
+ this.network();
|
|
|
|
+ });
|
|
|
|
+ } else if (this.actives == 1) {
|
|
|
|
+ Importorder().then((res) => {
|
|
|
|
+ this.orderConfig();
|
|
|
|
+ });
|
|
|
|
+ } else if (this.actives == 2) {
|
|
|
|
+ Importlabel().then((res) => {
|
|
|
|
+ this.labelConfig();
|
|
|
|
+ });
|
|
|
|
+ } else if (this.actives == 3) {
|
|
|
|
+ ImportAlarm().then((res) => {
|
|
|
|
+ this.giveAn();
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
downlodTable() {
|
|
downlodTable() {
|
|
this.$confirm("是否需要导出xlsx文档, 是否继续?", "提示", {
|
|
this.$confirm("是否需要导出xlsx文档, 是否继续?", "提示", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
@@ -831,6 +899,12 @@ export default {
|
|
line-height: 30px;
|
|
line-height: 30px;
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
+/deep/ .upload-demo {
|
|
|
|
+ height: 0;
|
|
|
|
+}
|
|
|
|
+/deep/ .el-upload-list {
|
|
|
|
+ display: none;
|
|
|
|
+}
|
|
.downlodTables {
|
|
.downlodTables {
|
|
width: 50px;
|
|
width: 50px;
|
|
height: 30px;
|
|
height: 30px;
|
|
@@ -840,7 +914,7 @@ export default {
|
|
float: right;
|
|
float: right;
|
|
position: absolute;
|
|
position: absolute;
|
|
top: 30px;
|
|
top: 30px;
|
|
- right: 220px;
|
|
|
|
|
|
+ right: 211px;
|
|
color: #ddd;
|
|
color: #ddd;
|
|
text-align: center;
|
|
text-align: center;
|
|
line-height: 30px;
|
|
line-height: 30px;
|