|
@@ -1,51 +1,96 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <el-col :span="1.5" style="padding-top: 32px">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ @click="handleAdd"
|
|
|
+ v-hasPermi="['monitoring:brigadecamera:add']"
|
|
|
+ >新增</el-button
|
|
|
+ >
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
<div class="box">
|
|
|
<ul>
|
|
|
<li class="oneUl" v-for="(item, i) in cabinetList" :key="i">
|
|
|
<div
|
|
|
- style="
|
|
|
- width: 265px;
|
|
|
- height: 230px;
|
|
|
- cursor: pointer;
|
|
|
- text-align: center;
|
|
|
- "
|
|
|
+ style="width: 265px; cursor: pointer; text-align: center"
|
|
|
+ @click="opens(item.cameraaddress)"
|
|
|
>
|
|
|
- <div class="title">摄像头</div>
|
|
|
- <div style="margin-top: 34%">
|
|
|
- <el-button size="btcks" @click="opens">查看</el-button>
|
|
|
- </div>
|
|
|
+ <div class="title">{{ item.cameraname }}</div>
|
|
|
+ </div>
|
|
|
+ <div style="margin-top: 8px; margin-left: -14px;">
|
|
|
+ <el-button
|
|
|
+ size="btcks"
|
|
|
+ @click.prevent="handleUpdate(item)"
|
|
|
+ v-hasPermi="['monitoring:brigadecamera:edit']"
|
|
|
+ >修改</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 添加或修改摄像头管理对话框 -->
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
+ <el-form
|
|
|
+ ref="form"
|
|
|
+ :model="form"
|
|
|
+ :rules="rules"
|
|
|
+ label-width="80px"
|
|
|
+ inline
|
|
|
+ style="padding-left: 54px"
|
|
|
+ >
|
|
|
+ <el-form-item label="名称" prop="cameraname">
|
|
|
+ <el-input v-model="form.cameraname" placeholder="请输入名称" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="单位名称" prop="unitname">
|
|
|
+ <el-input v-model="form.unitname" placeholder="请输入单位名称" />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="摄像头地址" prop="cameraaddress">
|
|
|
+ <el-input
|
|
|
+ v-model="form.cameraaddress"
|
|
|
+ placeholder="请输入摄像头地址"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="创建时间" prop="cretetime">
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
+ v-model="form.cretetime"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="请选择创建时间"
|
|
|
+ >
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer" style="margin-right: 108px">
|
|
|
+ <el-button size="btcksti" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button @click="cancel" size="btn">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import axios from "axios";
|
|
|
import {
|
|
|
- getCabinet,
|
|
|
- delCabinet,
|
|
|
- addCabinet,
|
|
|
- updateCabinet,
|
|
|
- exportCabinet,
|
|
|
- xianPhone,
|
|
|
- xianPhoneGeZi,
|
|
|
- xianPhoneOppe,
|
|
|
- getToken,
|
|
|
-} from "@/api/phone/cabinet";
|
|
|
-import { from } from "../../../../public/assets/libs/moment/src/lib/moment/from";
|
|
|
-import Cookies from "js-cookie";
|
|
|
+ listBrigadecamera,
|
|
|
+ getBrigadecamera,
|
|
|
+ delBrigadecamera,
|
|
|
+ addBrigadecamera,
|
|
|
+ updateBrigadecamera,
|
|
|
+} from "@/api/monitoring/brigadecamera";
|
|
|
|
|
|
export default {
|
|
|
- name: "Cabinet",
|
|
|
+ name: "Brigadecamera",
|
|
|
data() {
|
|
|
return {
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
- // 导出遮罩层
|
|
|
- exportLoading: false,
|
|
|
// 选中数组
|
|
|
ids: [],
|
|
|
// 非单个禁用
|
|
@@ -56,50 +101,47 @@ export default {
|
|
|
showSearch: true,
|
|
|
// 总条数
|
|
|
total: 0,
|
|
|
- // 手机柜表格数据
|
|
|
- cabinetList: [
|
|
|
- { number: 1, ip: 2, gridCount: "你好" },
|
|
|
- { number: 1, ip: 2, gridCount: "你好" },
|
|
|
- { number: 1, ip: 2, gridCount: "你好" },
|
|
|
- { number: 1, ip: 2, gridCount: "你好" },
|
|
|
- { number: 1, ip: 2, gridCount: "你好" },
|
|
|
- { number: 1, ip: 2, gridCount: "你好" },
|
|
|
- { number: 1, ip: 2, gridCount: "你好" },
|
|
|
- { number: 1, ip: 2, gridCount: "你好" },
|
|
|
- { number: 1, ip: 2, gridCount: "你好" },
|
|
|
- { number: 1, ip: 2, gridCount: "你好" },
|
|
|
- ],
|
|
|
- // 手机柜格子列表
|
|
|
- gridList: [],
|
|
|
+ // 摄像头管理表格数据
|
|
|
+ brigadecameraList: [],
|
|
|
// 弹出层标题
|
|
|
title: "",
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
- pageNo: 1,
|
|
|
+ pageNum: 1,
|
|
|
pageSize: 10,
|
|
|
- number: null,
|
|
|
- address: null,
|
|
|
- gridNumber: null,
|
|
|
- storageQuantity: null,
|
|
|
- exceptionsNumber: null,
|
|
|
- unitId: null,
|
|
|
- unitName: null,
|
|
|
+ cameraname: null,
|
|
|
+ unitname: null,
|
|
|
+ cameraaddress: null,
|
|
|
+ cretetime: null,
|
|
|
},
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ // 表单校验
|
|
|
+ rules: {},
|
|
|
+ // 手机柜表格数据
|
|
|
+ cabinetList: [],
|
|
|
+ // 手机柜格子列表
|
|
|
+ gridList: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- // this.getList();
|
|
|
+ this.getList();
|
|
|
},
|
|
|
methods: {
|
|
|
- opens() {
|
|
|
- console.log(1);
|
|
|
+ opens(url) {
|
|
|
+ window.open(url)
|
|
|
+ console.log(url);
|
|
|
},
|
|
|
- /** 查询摄像头列表 */
|
|
|
+ /** 查询摄像头管理列表 */
|
|
|
getList() {
|
|
|
- xianPhone().then((res) => {
|
|
|
- this.cabinetList = res.data.infos;
|
|
|
+ this.loading = true;
|
|
|
+ listBrigadecamera(this.queryParams).then((response) => {
|
|
|
+ console.log(response.rows);
|
|
|
+ this.cabinetList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
});
|
|
|
},
|
|
|
// 取消按钮
|
|
@@ -111,13 +153,10 @@ export default {
|
|
|
reset() {
|
|
|
this.form = {
|
|
|
id: null,
|
|
|
- number: null,
|
|
|
- address: null,
|
|
|
- gridNumber: null,
|
|
|
- storageQuantity: null,
|
|
|
- exceptionsNumber: null,
|
|
|
- unitId: null,
|
|
|
- unitName: null,
|
|
|
+ cameraname: null,
|
|
|
+ unitname: null,
|
|
|
+ cameraaddress: null,
|
|
|
+ cretetime: null,
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
@@ -131,10 +170,97 @@ export default {
|
|
|
this.resetForm("queryForm");
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
+ // 多选框选中数据
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.ids = selection.map((item) => item.id);
|
|
|
+ this.single = selection.length !== 1;
|
|
|
+ this.multiple = !selection.length;
|
|
|
+ },
|
|
|
+ /** 新增按钮操作 */
|
|
|
+ handleAdd() {
|
|
|
+ this.reset();
|
|
|
+ this.open = true;
|
|
|
+ this.title = "添加摄像头管理";
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleUpdate(row) {
|
|
|
+ this.reset();
|
|
|
+ const id = row.id || this.ids;
|
|
|
+ getBrigadecamera(id).then((response) => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改摄像头管理";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitForm() {
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.form.id != null) {
|
|
|
+ updateBrigadecamera(this.form).then((response) => {
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ addBrigadecamera(this.form).then((response) => {
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 删除按钮操作 */
|
|
|
+ handleDelete(row) {
|
|
|
+ const ids = row.id || this.ids;
|
|
|
+ this.$modal
|
|
|
+ .confirm("是否确认删除摄像头管理编号的数据项?")
|
|
|
+ .then(function () {
|
|
|
+ return delBrigadecamera(ids);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("删除成功");
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
+/* 调整表单间距 */
|
|
|
+::v-deep .el-date-editor.el-input,
|
|
|
+.el-date-editor.el-input__inner {
|
|
|
+ width: 200px;
|
|
|
+}
|
|
|
+::v-deep .el-dialog {
|
|
|
+ width: 500px !important;
|
|
|
+ background-color: #004d86;
|
|
|
+ margin: auto;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .el-dialog__header {
|
|
|
+ border-bottom: 1px solid #718a9d;
|
|
|
+ margin: auto;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .el-dialog__title {
|
|
|
+ color: #fff;
|
|
|
+ font: 18px;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .el-dialog__headerbtn .el-dialog__close {
|
|
|
+ color: #fff;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .el-form-item__label {
|
|
|
+ font: 16px;
|
|
|
+ color: #fff;
|
|
|
+ width: 100px !important;
|
|
|
+}
|
|
|
+
|
|
|
* {
|
|
|
padding: 0;
|
|
|
}
|
|
@@ -146,24 +272,25 @@ ul {
|
|
|
flex-flow: wrap; */
|
|
|
display: flex;
|
|
|
flex-flow: wrap;
|
|
|
- margin-left: 2%;
|
|
|
+ margin-left: 3%;
|
|
|
padding-left: -1%;
|
|
|
padding-top: 28px;
|
|
|
}
|
|
|
.oneUl {
|
|
|
flex: 1;
|
|
|
/* display: inline-block; */
|
|
|
- background: url("../../../assets/images/柜子2.png") no-repeat;
|
|
|
+ background: url("../../../assets/images/jiankong.png") no-repeat;
|
|
|
/* width: 306px; */
|
|
|
- height: 285px;
|
|
|
+ height: 219px;
|
|
|
padding: 22px;
|
|
|
min-width: 308px;
|
|
|
- margin-bottom: 40px;
|
|
|
}
|
|
|
.title {
|
|
|
color: #fff;
|
|
|
height: 16px;
|
|
|
display: inline-table;
|
|
|
+ margin-right: 35%;
|
|
|
+ margin-top: 15%;
|
|
|
}
|
|
|
.table {
|
|
|
margin-top: 18px;
|
|
@@ -176,25 +303,12 @@ ul {
|
|
|
margin-bottom: 20px;
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
+/* 表单背景 */
|
|
|
::v-deep .el-input__inner {
|
|
|
+ background-color: transparent !important;
|
|
|
color: #fff;
|
|
|
- /* width: 200px; */
|
|
|
- height: 36px;
|
|
|
-}
|
|
|
-.red {
|
|
|
- background: url("../../../assets/images/抽屉-红色1.png") no-repeat !important;
|
|
|
-}
|
|
|
-.greed {
|
|
|
- background: url("../../../assets/images/抽屉-绿色1.png") no-repeat !important;
|
|
|
-}
|
|
|
-.yellow {
|
|
|
- background: url("../../../assets/images/抽屉-黄色1.png") no-repeat !important;
|
|
|
-}
|
|
|
-.grey {
|
|
|
- background: url("../../../assets/images/柜子-灰.png") no-repeat !important;
|
|
|
-}
|
|
|
-.orging {
|
|
|
- background: url("../../../assets/images/柜子-灰.png") no-repeat;
|
|
|
+ /* border: 1px solid white !important; */
|
|
|
+ border-color: #fff !important;
|
|
|
}
|
|
|
|
|
|
.box1 {
|
|
@@ -207,19 +321,8 @@ ul {
|
|
|
margin-right: 22px;
|
|
|
margin-bottom: 43px;
|
|
|
min-width: 175px;
|
|
|
-
|
|
|
- /* margin-bottom: 43px;
|
|
|
- flex: 1;
|
|
|
- max-width: 173px;
|
|
|
- margin-right: 2%; */
|
|
|
}
|
|
|
.twoUl {
|
|
|
- /* display: inline-block;
|
|
|
- padding-left: 0px;
|
|
|
- margin-left: 10px;
|
|
|
- margin-top: 0px;
|
|
|
- margin-bottom: 38px;
|
|
|
- margin-right: 14px; */
|
|
|
padding-left: 12px;
|
|
|
display: flex;
|
|
|
flex-flow: wrap;
|
|
@@ -232,13 +335,8 @@ ul {
|
|
|
color: #fff;
|
|
|
}
|
|
|
::v-deep .el-button--mini {
|
|
|
- margin-left: 25px !important;
|
|
|
+ margin-left: 53px !important;
|
|
|
margin-top: 6px !important;
|
|
|
- background: #1263aa;
|
|
|
- border-color: #1263aa;
|
|
|
- color: #ffffff;
|
|
|
- width: 82px;
|
|
|
- height: 30px;
|
|
|
}
|
|
|
.shuJu {
|
|
|
height: 16px;
|
|
@@ -249,116 +347,6 @@ ul {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
|
|
|
-.box4::before {
|
|
|
- display: inline-block;
|
|
|
- content: "";
|
|
|
- width: 8px;
|
|
|
- height: 8px;
|
|
|
- /* border-radius: 50%; */
|
|
|
- background-color: #67c23a;
|
|
|
- margin-left: 26px;
|
|
|
-}
|
|
|
-.box5::before {
|
|
|
- display: inline-block;
|
|
|
- content: "";
|
|
|
- width: 8px;
|
|
|
- height: 8px;
|
|
|
- /* border-radius: 50%; */
|
|
|
- background-color: #ff4949;
|
|
|
- margin-left: 26px;
|
|
|
-}
|
|
|
-.box6::before {
|
|
|
- display: inline-block;
|
|
|
- content: "";
|
|
|
- width: 8px;
|
|
|
- height: 8px;
|
|
|
- /* border-radius: 50%; */
|
|
|
- background-color: #ffba00;
|
|
|
- margin-left: 26px;
|
|
|
-}
|
|
|
-.box7::before {
|
|
|
- display: inline-block;
|
|
|
- content: "";
|
|
|
- width: 8px;
|
|
|
- height: 8px;
|
|
|
- /* border-radius: 50%; */
|
|
|
- background-color: #98a7bc;
|
|
|
- margin-left: 26px;
|
|
|
-}
|
|
|
-::v-deep .el-dialog {
|
|
|
- background-color: #004d86;
|
|
|
- margin: auto;
|
|
|
-}
|
|
|
-::v-deep .el-dialog__header {
|
|
|
- border-bottom: 1px solid #718a9d;
|
|
|
- margin: auto;
|
|
|
-}
|
|
|
-::v-deep .el-dialog__title {
|
|
|
- color: #fff;
|
|
|
- font: 18px;
|
|
|
-}
|
|
|
-.box2 form .el-form-item {
|
|
|
- color: #fff;
|
|
|
- margin-right: 20px;
|
|
|
-}
|
|
|
-
|
|
|
-/* 鼠标经过颜色 */
|
|
|
-::v-deep .el-table__body tr:hover > td {
|
|
|
- background-color: transparent !important;
|
|
|
-}
|
|
|
-::v-deep .box1 form {
|
|
|
- margin-left: -14px;
|
|
|
-}
|
|
|
-::v-deep .box1 form .el-form-item {
|
|
|
- margin-top: 17px;
|
|
|
-}
|
|
|
-::v-deep .el-form-item {
|
|
|
- margin-bottom: 29px;
|
|
|
-}
|
|
|
-.jiben {
|
|
|
- width: 100%;
|
|
|
- height: 32px;
|
|
|
- background-image: url(/static/img/小标题底.b7c6f45a.png);
|
|
|
- margin-bottom: 18px;
|
|
|
- color: #fff;
|
|
|
- padding-left: 16px;
|
|
|
- line-height: 32px;
|
|
|
- background-size: contain;
|
|
|
-}
|
|
|
-::v-deep .el-table tr:nth-child(odd) {
|
|
|
- background: #004d86;
|
|
|
-}
|
|
|
-::v-deep .el-dialog__body {
|
|
|
- padding: 30px 0px 30px 40px;
|
|
|
-}
|
|
|
-::v-deep .el-form-item__label {
|
|
|
- padding: 0 0 0 0;
|
|
|
-}
|
|
|
-/* 重置按钮 */
|
|
|
-.el-button--btp.is-active,
|
|
|
-.el-button--btp:active {
|
|
|
- background: #3da1f8;
|
|
|
- border-color: #3da1f8;
|
|
|
- color: #ffffff;
|
|
|
-}
|
|
|
-
|
|
|
-.el-button--btp:focus,
|
|
|
-.el-button--btp:hover {
|
|
|
- background: #3da1f8;
|
|
|
- border-color: #3da1f8;
|
|
|
- color: #ffffff;
|
|
|
-}
|
|
|
-
|
|
|
-.el-button--btp {
|
|
|
- color: #ffffff;
|
|
|
- width: 76px;
|
|
|
- height: 36px;
|
|
|
- background-color: #1d96ff;
|
|
|
- border-radius: 4px;
|
|
|
- font-size: 14px;
|
|
|
- text-align: center;
|
|
|
- margin-top: 1px;
|
|
|
-}
|
|
|
::v-deep .el-dialog {
|
|
|
border-radius: 8px;
|
|
|
}
|
|
@@ -403,8 +391,8 @@ ul {
|
|
|
}
|
|
|
::v-deep .el-button--btcks {
|
|
|
color: #ffffff;
|
|
|
- width: 76px;
|
|
|
- height: 36px;
|
|
|
+ width: 48px;
|
|
|
+ height: 28px;
|
|
|
background-color: #1d96ff;
|
|
|
border-radius: 4px;
|
|
|
font-size: 14px;
|
|
@@ -424,4 +412,27 @@ ul {
|
|
|
border-color: #1d96ff;
|
|
|
color: #ffffff;
|
|
|
}
|
|
|
+::v-deep .el-button--btcksti {
|
|
|
+ color: #ffffff;
|
|
|
+ width: 76px;
|
|
|
+ height: 36px;
|
|
|
+ background-color: #1d96ff;
|
|
|
+ border-radius: 4px;
|
|
|
+ font-size: 14px;
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 1px;
|
|
|
+}
|
|
|
+::v-deep .el-button--btcksti:focus,
|
|
|
+.el-button--btcksti:hover {
|
|
|
+ background: #1d96ff;
|
|
|
+ border-color: #1d96ff;
|
|
|
+ color: #ffffff;
|
|
|
+}
|
|
|
+
|
|
|
+::v-deep .el-button--btcksti.is-active,
|
|
|
+.el-button--btcksti:active {
|
|
|
+ background: #1d96ff;
|
|
|
+ border-color: #1d96ff;
|
|
|
+ color: #ffffff;
|
|
|
+}
|
|
|
</style>
|