无线入侵定时任务接口联调完成,设备增加分类过滤

main
xuechunyuan 3 years ago
parent 477f14ac57
commit 326f2538ad
  1. 42
      src/api/alarm/alarm.js
  2. 32
      src/api/wirelessintrusion/wirelessintrusion.js
  3. BIN
      src/assets/image/position_icon.png
  4. 10
      src/router/page/index.js
  5. 83
      src/views/map/index.vue
  6. 879
      src/views/wirelessintrusion/deployment/list.vue
  7. 64
      src/views/wirelessintrusion/device/list.vue
  8. 603
      src/views/wirelessintrusion/warn/record.vue

@ -0,0 +1,42 @@
import request from '@/router/axios';
export const getList = (current, size, params) => {
return request({
url: '/alarmInformation/list',
method: 'get',
params: {
...params,
current,
size,
}
})
}
export const getDetail = (code) => {
return request({
url: '/api/blade-system/region/detail',
method: 'get',
params: {
code
}
})
}
export const remove = (id) => {
return request({
url: '/api/blade-system/region/remove',
method: 'post',
params: {
id,
}
})
}
export const submit = (row) => {
return request({
url: '/api/blade-system/region/submit',
method: 'post',
data: row
})
}

@ -57,3 +57,35 @@ export const bizDeviceDetail = (token, id) => {
}) })
} }
//定时任务列表
export const cornJobList = (params) => {
return request({
url: '/api/cornJob/list',
method: 'get',
params: params
})
}
//定时任务新增
export const cornJobSave = (data) => {
return request({
url: '/api/cornJob/save',
method: 'post',
data: data
})
}
//定时任务编辑
export const cornJobUpdate = (data) => {
return request({
url: '/api/cornJob/update',
method: 'post',
data: data
})
}
//定时任务编辑
export const cornJobRemove = (data) => {
return request({
url: '/api/cornJob/remove',
method: 'post',
params: data
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

@ -20,6 +20,16 @@ export default [{
isTab: false, isTab: false,
isAuth: false isAuth: false
} }
},{
path: '/map',
name: '齐鲁医院地图',
component: () =>
import( /* webpackChunkName: "page" */ '@/views/map/index'),
meta: {
keepAlive: true,
isTab: false,
isAuth: false
}
}, },
{ {
path: '/lock', path: '/lock',

@ -1,33 +1,70 @@
<template> <template>
<div> <div>
<div id='mapContainer' style="widht:1000px;height:1000px;background:red;"></div> <div id='mapContainer' style="widht:1000px;height:1000px;"></div>
</div> </div>
</template> </template>
<script> <script>
import Img from "@/assets/image/position_icon.png";
export default {
name: "map",
data() {
return {
};
},
destroyed() {
window.map.destroy();
window.map = null;
},
mounted() {
window.map = new jsmapbase.JSMap({
container: 'mapContainer',
mapServerURL: 'data/map'
});
window.map.openMapById('0001');
window.map.on("loadComplete", e => {
var floorControl = new jsmapbase.JSFloorControl({
position: jsmapbase.JSControlPosition.LEFT_TOP,//
showBtnCount: 3,// TODO
allLayers: false, //
needAllLayerBtn: true, // /
offset: {
x: 20,
y: 10
}//x,y
});
window.map.addControl(floorControl);
console.log('点位标注')
//
var imagerMarker = new jsmapbase.JSImageMarker({
id: 'iamgeMareker1',//id
image: Img,//
position: new jsmapbase.JSPoint(120.61988850529002, 31.37531834395683, 0),//
width: 55,//-
height: 55,//-
floorId: 1,//id
offset: jsmapbase.JSControlPosition.RIGHT_BOTTOM,//
depthTest: false,//
show: true, //
properties: {
name: 'test'
},//
callback: (node) => {
console.log(node);
}//
});
window.map.addMarker(imagerMarker);
});
},
methods: {
export default { },
name: "map", };
data() {
return {
};
},
mounted() {
window.map = new jsmapbase.JSMap({
container:'mapContainer',
mapServerURL:'data/map'
});
window.map.openMapById('0001');
},
methods: {
},
};
</script> </script>
<style> <style>
.el-font-size { .el-font-size {
font-size: 14px; font-size: 14px;
} }
</style> </style>

@ -1,470 +1,555 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud :option="option" <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" v-model="form"
:table-loading="loading" :permission="permissionList" :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
:data="data" @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
:page.sync="page" @refresh-change="refreshChange" @on-load="onLoad" :selecttable="selectable1">
ref="crud"
v-model="form"
:permission="permissionList"
:before-open="beforeOpen"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template slot="menuLeft"> <template slot="menuLeft">
<el-button <el-button type="primary" icon="el-icon-plus" size="small" @click="handleAdd">
size="small"
@click="handleAddPre">
<i class="add_item"></i>
一键布防
</el-button> </el-button>
<el-button <el-button type="danger" icon="el-icon-delete" size="small" plain @click="handleDelete">
type="primary"
size="small"
@click="handleCancel">
<i class="cancel_item"></i>
一键撤防
</el-button>
<el-button
type="primary"
size="small"
@click="handleAdd">
新增
</el-button> </el-button>
</template> </template>
<template slot-scope="{row}" <template slot-scope="{row}" slot="status">
slot="status">
<el-tag type="danger" v-show="row.status == 0">关闭</el-tag> <el-tag type="danger" v-show="row.status == 0">关闭</el-tag>
<el-tag type="success" v-show="row.status == 1">开启</el-tag> <el-tag type="success" v-show="row.status == 1">开启</el-tag>
</template> </template>
<template #menu="{size:row,index}"> <template #menu="{ size, row, index }">
<el-button size="small" @click="handleDetail(row,index)">详情</el-button> <el-button type="text" icon="el-icon-view" size="small" @click="handleDetail(row, index)">详情</el-button>
<el-button size="small" @click="handleEdit(row,index)">编辑</el-button> <el-button type="text" icon="el-icon-edit" size="small" @click="handleEdit(row, index)">编辑</el-button>
<el-button size="small" @click="handleDelete(row,index)">删除</el-button> <el-button type="text" icon="el-icon-delete" size="small" @click="handleDeleteRow(row, index)">删除</el-button>
</template> </template>
</avue-crud> </avue-crud>
<el-dialog <el-dialog title="布/撤防设置" :visible.sync="dialogVisible" v-if="dialogVisible" :append-to-body="true" :close-on-click-modal="false"
title="布防设置" :close-on-press-escape="false" custom-class="dia_box" width="950px">
:visible.sync="dialogVisible" <el-form :model="addForm" ref="addform" :rules="addRules" label-width="100px">
:append-to-body="true" <el-row :gutter="20">
:close-on-click-modal="false" <el-col :span="12">
:close-on-press-escape="false" <el-form-item label="任务标题:" prop="taskTitle">
custom-class="dia_box" <el-input v-model="addForm.taskTitle" placeholder="请输入任务标题" :disabled="isDetail ? true : false"
> maxlength="30" clearable>
<el-form v-model="addForm"> </el-input>
<el-form-item label="布防时间:" prop="preTime"> </el-form-item>
<el-time-picker <el-form-item label="任务时间:" prop="executeTime">
v-model="addForm.preTime" <el-time-picker v-model="addForm.executeTime" placeholder="请选择任务时间" :disabled="isDetail ? true : false"
placeholder="请选择布防时间" value-format="HH:mm:ss" style="width:100%;">
:readonly="isDetail ? true : false" </el-time-picker>
value-format="HH:mm:ss"> </el-form-item>
</el-time-picker> </el-col>
</el-form-item> <el-col :span="12">
<el-form-item label="任务类型:" prop="type">
<el-radio-group v-model="addForm.type" :disabled="isDetail ? true : false">
<el-radio :label="1">布防</el-radio>
<el-radio :label="2">撤防</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否启用:" prop="status">
<el-switch v-model="addForm.status" active-value="1" inactive-value="0" :disabled="isDetail ? true : false">
</el-switch>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="选择设备:"> <el-form-item label="选择设备:">
<el-table <el-table class="table_box" ref="multipleTable" row-key="id" :data="tableData" tooltip-effect="dark"
class="table_box" style="width: 100%" @selection-change="handleSelectionChange" size="small">
ref="multipleTable" <el-table-column type="selection" width="55" align="center" reserve-selection :selectable="selectable">
:data="tableData" </el-table-column>
tooltip-effect="dark" <el-table-column prop="name" label="设备名称">
style="width: 100%" <template slot-scope="scope">
@selection-change="handleSelectionChange"> {{ scope.row.name }}/{{ scope.row.remark }}
<el-table-column </template>
type="selection"
width="55"
align="center"
:reserve-selection="true"
:selectable="selectable"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="productName" label="设备所属产品">
prop="deviceName"
label="设备名称">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="nodeLabel" label="节点类型">
prop="deviceNo"
label="设备编号">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="gateway" label="网关信息">
prop="deviceType"
label="设备大类">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="statusLabel" label="设备状态">
prop="deviceArea"
label="所在区域">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="createTime" label="创建时间" width="160px">
prop="position"
label="安装位置">
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="page_box"> <div class="page_box">
<el-pagination <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
@size-change="handleSizeChange" :current-page="diaPage.currentPage" :page-sizes="[10, 20, 30, 40]" :page-size="diaPage.pageSize" background
@current-change="handleCurrentChange" layout="total, sizes, prev, pager, next, jumper" :total="diaPage.total">
:current-page="diaPage.currentPage"
:page-sizes="[10, 20, 30, 40]"
:page-size="diaPage.pageSize"
background
layout="total, sizes, prev, pager, next, jumper"
:total="diaPage.total">
</el-pagination> </el-pagination>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="是否启用:" prop="isOpen"> <el-form-item label="任务描述:" prop="taskDescribe">
<el-switch <el-input type="textarea" v-model="addForm.taskDescribe" placeholder="请输入任务描述"
v-model="addForm.isOpen" :disabled="isDetail ? true : false" maxlength="200" show-word-limit>
active-text="禁用" </el-input>
inactive-text="启用"
:readonly="isDetail ? true : false">
</el-switch>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button> <el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submitForm">确认布防</el-button> <el-button type="primary" @click="submitForm" v-if="!isDetail"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import {mapGetters} from "vuex"; import { mapGetters } from "vuex";
import { bizLogin, bizDeviceList, bizDeviceStatus, bizNodeType, cornJobList, cornJobSave, cornJobUpdate, cornJobRemove } from "@/api/wirelessintrusion/wirelessintrusion";
export default { export default {
data() { data() {
return { return {
form: {}, form: {},
query: {}, query: {},
dialogVisible:false, dialogVisible: false,
loading: true, loading: true,
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
total: 0 total: 0
}, },
diaPage:{ diaPage: {
pageSize:10, pageSize: 10,
currentPage:1, currentPage: 1,
total:10, total: 10,
}, },
addForm:{}, addForm: {},
selectionList: [], addRules: {
option: { taskTitle: [
height: 'auto', { required: true, message: "请输入任务标题", trigger: "blur,change" },
menuWidth:300,
calcHeight: 30,
dialogWidth: 950,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
addBtn:false,
viewBtn: false,
editBtn:false,
delBtn:false,
selection: true,
excelBtn: true,
dialogClickModal: false,
column: [
{
label: "布防时间",
prop: "time",
span: 12,
// search: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: "关联设备",
prop: "device",
type: 'textarea',
span: 12,
overHidden: true,
},
{
label: "布防状态",
type: "select",
prop: "brandCode",
span: 12,
hide: true,
search: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
{
label: "是否启用",
prop: "status",
span: 24,
width: 80,
align: "center",
slot: true,
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
]
},
tableData:[],
data: [
{time:'09:00:00',device:'空调1、空调2、消防1、消防2、消防3、消防4、消防5...',status:'0'},
{time:'09:00:00',device:'空调1、空调2、消防1、消防2、消防3、消防4、消防5...',status:'1'},
], ],
multipleSelection:[], executeTime: [
selectedArr:[], { required: true, message: "请选择任务时间", trigger: "change" },
isDetail:false ],
},
selectionList: [],
option: {
height: 'auto',
menuWidth: 200,
calcHeight: 30,
dialogWidth: 950,
tip: false,
searchShow: true,
searchMenuSpan: 6,
searchLabelWidth: 100,
border: true,
addBtn: false,
viewBtn: false,
editBtn: false,
delBtn: false,
selection: true,
excelBtn: false,
dialogClickModal: false,
column: [
{
label: "任务标题",
prop: "taskTitle",
minWidth: 200,
overHidden: true,
},
{
label: "布/撤防时间",
prop: "executeTime",
addDisplay: false,
editDisplay: false,
viewDisplay: false,
},
// {
// label: "",
// prop: "deviceId",
// overHidden: true,
// },
{
label: "任务类型",
type: "select",
prop: "type",
dicData: [
{ value: 1, label: '布防' }, { value: 2, label: '撤防' }
],
search: true,
},
{
label: "是否启用",
prop: "status",
align: "center",
slot: true,
},
]
},
tableData: [],
data: [],
multipleSelection: [],
selectedArr: [],
isDetail: false
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.vaildData(this.permission.notice_add, false),
viewBtn: this.vaildData(this.permission.notice_view, false),
delBtn: this.vaildData(this.permission.notice_delete, false),
editBtn: this.vaildData(this.permission.notice_edit, false)
}; };
}, },
computed: {
...mapGetters(["permission"]), ids() {
permissionList() { let ids = [];
return { this.selectionList.forEach(ele => {
addBtn: this.vaildData(this.permission.notice_add, false), ids.push(ele.id);
viewBtn: this.vaildData(this.permission.notice_view, false), });
delBtn: this.vaildData(this.permission.notice_delete, false), return ids.join(",");
editBtn: this.vaildData(this.permission.notice_edit, false) }
}; },
}, mounted() {
this.loadDict();
ids() { },
let ids = []; methods: {
this.selectionList.forEach(ele => { //
ids.push(ele.id); loadDict() {
}); let token = window.sessionStorage.getItem('bizToken');
return ids.join(","); if (token == 'undefined' || !token) {
bizLogin({ appKey: 'Arf7bd4f26', appSecret: 'kb207044c8' }).then(res => {
window.sessionStorage.setItem('bizToken', res.data.data.token);
bizDeviceStatus(res.data.data.token).then(res => {
this.bizDeviceStatus = res.data.data;
})
bizNodeType(res.data.data.token).then(res => {
this.bizNodeType = res.data.data;
})
})
} else {
bizDeviceStatus(token).then(res => {
if (res.data.code == 401) {
window.sessionStorage.removeItem('bizToken');
this.loadDict();
}
else if (res.data.code == 200) {
this.bizDeviceStatus = res.data.data;
}
})
bizNodeType(token).then(res => {
this.bizNodeType = res.data.data;
})
} }
}, },
methods: { //
// renderLabel(node, col) {
selectable(row, index) { const dicData = this[col];
//row let idx = dicData.findIndex(item => item.dictValue == node);
let data = this.selectedArr // return idx > -1 ? dicData[idx].dictLabel : '';
//return : false },
//return : true //
return data.findIndex(item => item == row.id) === -1 selectable() {
}, return this.isDetail ? false : true;
// },
handleAdd(){ //
this.dialogVisible = true; selectable1(row, index) {
this.isDetail = false; return row.status == 1 ? false : true;
this.tableData = [ },
{id:'001',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, //
{id:'002',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, handleAdd() {
{id:'003',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, this.addForm = {
{id:'004',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, taskTitle: '',
{id:'005',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, taskDescribe: '',
{id:'006',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, type: 1,
{id:'007',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, executeTime: null,
{id:'008',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, deviceId: '',
{id:'009',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, status: '1'
{id:'010',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, }
] this.multipleSelection = [];
this.selectedArr = ['001','003','005'] this.dialogVisible = true;
}, this.isDetail = false;
// this.diaPage.currentPage = 1;
handleSelectionChange(val){ this.$nextTick(() => {
this.multipleSelection = val this.queryDeviceList(this.diaPage);
}, })
// },
submitForm(){ //
console.log(this.addForm) handleSelectionChange(val) {
}, this.multipleSelection = val.map(item => item.id);
// console.log(this.multipleSelection)
handleAddPre(){ },
if (this.selectionList.length === 0) { //
this.$message.warning("请选择至少一条数据"); submitForm() {
return; this.$refs.addform.validate((valid) => {
} if (valid) {
}, if (this.multipleSelection.length === 0) {
// this.$message({
handleCancel(){ type: "warning",
if (this.selectionList.length === 0) { message: "请选择关联设备"
this.$message.warning("请选择至少一条数据"); })
return; return;
} }
}, let ids = this.multipleSelection.join(",");
searchReset() { console.log(ids)
this.query = {}; this.submitLoading = true;
this.onLoad(this.page); if (this.addForm.id > 0) {
}, cornJobUpdate({ ...this.addForm, deviceId: ids }).then((res) => {
searchChange(params, done) { this.submitLoading = false;
this.query = params; this.dialogVisible = false;
this.page.currentPage = 1; this.onLoad(this.page);
this.onLoad(this.page, params); this.$message({
done(); type: "success",
}, message: "操作成功!"
selectionChange(list) { });
console.log(list) }, () => {
this.selectionList = list; this.submitLoading = false;
}, })
selectionClear() { } else {
this.selectionList = []; cornJobSave({ ...this.addForm, deviceId: ids }).then(res => {
this.$refs.crud.toggleSelection(); this.submitLoading = false;
}, this.dialogVisible = false;
// this.onLoad(this.page);
handleDetail(row){ this.$message({
this.dialogVisible = true; type: "success",
this.isDetail = true; message: "操作成功!"
this.tableData = [ });
{id:'001',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, }, () => {
{id:'002',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, this.submitLoading = false;
]; })
this.addForm = { }
preTime:'09:00:00',
isOpen:Boolean(1)
} }
}, })
// },
handleEdit(){ searchReset() {
this.dialogVisible = true; this.query = {};
this.isDetail = false; this.onLoad(this.page);
this.tableData = [ },
{id:'001',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, searchChange(params, done) {
{id:'002',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, this.query = params;
{id:'003',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, this.page.currentPage = 1;
{id:'004',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, this.onLoad(this.page, params);
{id:'005',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, done();
{id:'006',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, },
{id:'007',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, selectionChange(list) {
{id:'008',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, console.log(list)
{id:'009',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, this.selectionList = list;
{id:'010',deviceName:'空调',deviceNo:"A101",deviceType:'空调设备',deviceArea:'1号楼一层北',position:'120.51,36.12'}, },
] selectionClear() {
this.selectedArr = ['001','003','005'] this.selectionList = [];
let selectArr = ['002','004'] this.$refs.crud.toggleSelection();
let map = new Map(); },
for (let item of this.tableData) { //
if (!map.has(item.id)) { handleDetail(row) {
map.set(item.id, item); row.status = row.status + '';
}; this.addForm = row;
}; this.dialogVisible = true;
this.multipleSelection = [...map.values()].filter(item => selectArr.includes(item.id)); this.isDetail = true;
this.$nextTick(() =>{ this.$nextTick(() => {
this.multipleSelection.forEach((row) => { this.queryDeviceList(this.diaPage);
this.$refs.multipleTable.toggleRowSelection(row, true) // })
}) },
//
handleEdit(row, index) {
row.status = row.status + '';
this.addForm = row;
this.dialogVisible = true;
this.isDetail = false;
this.$nextTick(() => {
this.queryDeviceList(this.diaPage);
})
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return cornJobRemove({ ids: this.ids.join(",") });
}) })
.then(() => {
}, this.onLoad(this.page);
handleDelete() { this.selectionClear();
this.$confirm("确定将选择数据删除?", { this.$message({
confirmButtonText: "确定", type: "success",
cancelButtonText: "取消", message: "操作成功!"
type: "warning" });
});
},
handleDeleteRow(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return cornJobRemove({ ids: row.id });
}) })
.then(() => { .then(() => {
this.onLoad(this.page);
}) this.$message({
.then(() => { type: "success",
// this.onLoad(this.page); message: "操作成功!"
// this.$message({
// type: "success",
// message: "!"
// });
// this.$refs.crud.toggleSelection();
}); });
}, });
currentChange(currentPage) { },
this.page.currentPage = currentPage; currentChange(currentPage) {
}, this.page.currentPage = currentPage;
sizeChange(pageSize) { },
this.page.pageSize = pageSize; sizeChange(pageSize) {
}, this.page.pageSize = pageSize;
refreshChange() { },
this.onLoad(this.page, this.query); refreshChange() {
}, this.onLoad(this.page, this.query);
onLoad(page, params = {}) { },
// const {releaseTimeRange} = this.query; onLoad(page, params = {}) {
// let values = { let values = {
// ...params, ...params,
// ...this.query ...this.query
// }; };
// if (releaseTimeRange) { this.loading = true;
// values = { cornJobList({ current: page.currentPage, size: page.pageSize, ...values }).then(res => {
// ...values, const data = res.data.data;
// releaseTime_datege: releaseTimeRange[0], this.page.total = data.total;
// releaseTime_datelt: releaseTimeRange[1], this.data = data.records;
// }; this.loading = false;
// values.releaseTimeRange = null; this.selectionClear();
// } }, err => {
// this.loading = true;
// getList(page.currentPage, page.pageSize, values).then(res => {
// const data = res.data.data;
// this.page.total = data.total;
// this.data = data.records;
// this.loading = false;
// this.selectionClear();
// });
this.data = [
{time:'09:00:00',device:'空调1、空调2、消防1、消防2、消防3、消防4、消防5...',status:0},
{time:'09:00:00',device:'空调1、空调2、消防1、消防2、消防3、消防4、消防5...',status:1},
];
this.loading = false; this.loading = false;
this.page.total = this.data.length; this.selectionClear();
});
},
//
queryDeviceList(page, params = {}) {
let values = {
...params,
pid: 100
};
let token = window.sessionStorage.getItem('bizToken');
if (token == 'undefined' || !token) {
bizLogin({ appKey: 'Arf7bd4f26', appSecret: 'kb207044c8' }).then(res => {
window.sessionStorage.setItem('bizToken', res.data.data.token);
bizDeviceList(res.data.data.token, { ...values, pageSize: page.pageSize, pageNum: page.currentPage }).then(res2 => {
const data = res2.data;
this.diaPage.total = data.total;
data.rows.map(item => {
item.node = item.bizProduct.node;
item.nodeLabel = this.renderLabel(item.node, 'bizNodeType');
item.statusLabel = this.renderLabel(item.status, 'bizDeviceStatus')
item.productName = item.bizProduct.name;
})
this.tableData = data.records;
this.$refs.multipleTable.clearSelection();
this.multipleSelection = this.addForm.deviceId ? this.addForm.deviceId.split(",") : [];
if (this.multipleSelection.length > 0) { //
this.$nextTick(() => {
this.tableData.forEach(row => { //
this.multipleSelection.forEach(item => { //
if (row.id === parseInt(item)) {
this.$refs.multipleTable.toggleRowSelection(row, true); //
}
});
})
})
}
});
})
} else {
bizDeviceList(token, { ...values, pageSize: page.pageSize, pageNum: page.currentPage, pid: 100 }).then(res2 => {
if (res2.data.code == 401) {
window.sessionStorage.removeItem('bizToken');
this.queryDeviceList();
}
else if (res2.data.code == 200) {
const data = res2.data;
this.diaPage.total = data.total;
data.rows.map(item => {
item.node = item.bizProduct.node;
item.nodeLabel = this.renderLabel(item.node, 'bizNodeType');
item.statusLabel = this.renderLabel(item.status, 'bizDeviceStatus')
item.productName = item.bizProduct.name;
})
this.tableData = data.rows;
this.$refs.multipleTable.clearSelection();
this.multipleSelection = this.addForm.deviceId ? this.addForm.deviceId.split(",") : [];
if (this.multipleSelection.length > 0) { //
this.$nextTick(() => {
this.tableData.forEach(row => { //
this.multipleSelection.forEach(item => { //
if (row.id === parseInt(item)) {
this.$refs.multipleTable.toggleRowSelection(row, true); //
}
});
})
})
}
}
}, err => {
});
} }
} }
}; }
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .cancel_item { ::v-deep .cancel_item {
background: url('~@/assets/image/cancel_iten.png') center no-repeat; // url background: url('~@/assets/image/cancel_iten.png') center no-repeat; // url
font-size: 12px; font-size: 12px;
background-size: cover; background-size: cover;
} }
::v-deep .cancel_item:before { ::v-deep .cancel_item:before {
content: "替"; content: "替";
font-size: 12px; font-size: 12px;
visibility: hidden; visibility: hidden;
} }
::v-deep .add_item { ::v-deep .add_item {
background: url('~@/assets/image/add.png') center no-repeat; // url background: url('~@/assets/image/add.png') center no-repeat; // url
font-size: 12px; font-size: 12px;
background-size: cover; background-size: cover;
} }
::v-deep .add_item:before { ::v-deep .add_item:before {
content: "替"; content: "替";
font-size: 12px; font-size: 12px;
visibility: hidden; visibility: hidden;
} }
.table_box{
th.el-table__cell{ .table_box {
th.el-table__cell {
background: #F7F8FA; background: #F7F8FA;
} }
} }
</style>
<style lang="scss">
.dia_box{
height: 700px;
overflow: auto;
.el-table{ .dia_box {
width: 90% !important; height: 700px;
border: 1px solid #D6D8DF; overflow: auto;
}
.el-table th.el-table__cell{
background: #F7F8FA;
}
.dialog-footer{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.page_box{ .el-table {
width: 90%; width: 100% !important;
margin-left: 9%; border: 1px solid #D6D8DF;
display: flex; }
align-items: center;
justify-content: center; .el-table th.el-table__cell {
margin-top: 15px; background: #F7F8FA;
}
} }
.dialog-footer {
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.page_box {
width: 90%;
margin-left: 9%;
display: flex;
align-items: center;
justify-content: center;
margin-top: 15px;
}
}
</style> </style>

@ -1,16 +1,15 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel" <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud"
v-model="form" :permission="permissionList" @row-update="rowUpdate" @row-save="rowSave" :before-open="beforeOpen" v-model="form" :before-open="beforeOpen"
@search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" @search-change="searchChange" @search-reset="searchReset"
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad"> @current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
</avue-crud> </avue-crud>
</basic-container> </basic-container>
</template> </template>
<script> <script>
import { bizLogin, bizDeviceList, bizDeviceDetail, bizDeviceStatus, bizNodeType } from "@/api/wirelessintrusion/wirelessintrusion"; import { bizLogin, bizDeviceList, bizDeviceStatus, bizNodeType } from "@/api/wirelessintrusion/wirelessintrusion";
import { mapGetters } from "vuex";
export default { export default {
data() { data() {
@ -37,6 +36,8 @@ export default {
editBtn: false, editBtn: false,
delBtn: false, delBtn: false,
addBtn: false, addBtn: false,
menu: true,
menuWidth: 100,
dialogClickModal: false, dialogClickModal: false,
column: [ column: [
{ {
@ -47,19 +48,27 @@ export default {
formatter: (val, value, label) => { formatter: (val, value, label) => {
return val.name + '/' + val.remark return val.name + '/' + val.remark
}, },
labelWidth: 120 labelWidth: 120,
viewDisplay: false,
},
{
label: "设备名称",
prop: "name",
span: 12,
search: true,
labelWidth: 120,
hide: true
}, },
{ {
label: "备注名称", label: "备注名称",
prop: "remark", prop: "remark",
span: 12, span: 12,
hide: true, hide: true,
viewDisplay: true,
labelWidth: 120 labelWidth: 120
}, },
{ {
label: "设备所属产品", label: "设备所属产品",
prop: "name", prop: "productName",
span: 12, span: 12,
labelWidth: 120 labelWidth: 120
}, },
@ -81,11 +90,11 @@ export default {
prop: "nodeLabel", prop: "nodeLabel",
labelWidth: 120, labelWidth: 120,
hide: true, hide: true,
viewDisplay: true
}, },
{ {
label: "网关信息", label: "网关信息",
prop: "gateway", prop: "gateway",
span: 12,
formatter: (val, value, label) => { formatter: (val, value, label) => {
return val.gateway || '-' return val.gateway || '-'
}, },
@ -107,18 +116,19 @@ export default {
{ {
label: "节点类型", label: "节点类型",
prop: "statusLabel", prop: "statusLabel",
span: 12,
labelWidth: 120, labelWidth: 120,
hide: true, hide: true,
viewDisplay: true
}, },
{ {
label: "创建时间时间", label: "创建时间",
prop: "createTime", prop: "createTime",
span: 12,
labelWidth: 120, labelWidth: 120,
hide: true, hide: true,
viewDisplay: true,
}, { }, {
label: "最后上线时间", label: "最后上线时间",
span: 12,
prop: "lastOnline", prop: "lastOnline",
labelWidth: 120 labelWidth: 120
}, },
@ -128,24 +138,6 @@ export default {
nodeType: [],// nodeType: [],//
}; };
}, },
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.vaildData(this.permission.notice_add, false),
viewBtn: this.vaildData(this.permission.notice_view, false),
delBtn: this.vaildData(this.permission.notice_delete, false),
editBtn: this.vaildData(this.permission.notice_edit, false)
};
},
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
mounted() { mounted() {
this.loadDict(); this.loadDict();
}, },
@ -295,7 +287,7 @@ export default {
let values = { let values = {
...params, ...params,
...this.query, ...this.query,
pid: 98 pid: 100
}; };
let token = window.sessionStorage.getItem('bizToken'); let token = window.sessionStorage.getItem('bizToken');
if (token == 'undefined' || !token) { if (token == 'undefined' || !token) {
@ -305,14 +297,19 @@ export default {
bizDeviceList(res.data.data.token, { ...values, pageSize: page.pageSize, pageNum: page.currentPage }).then(res2 => { bizDeviceList(res.data.data.token, { ...values, pageSize: page.pageSize, pageNum: page.currentPage }).then(res2 => {
const data = res2.data; const data = res2.data;
this.page.total = data.total; this.page.total = data.total;
data.rows.map(item => {
item.node = item.bizProduct.node;
item.nodeLabel = this.renderLabel(item.node,'node');
item.statusLabel = this.renderLabel(item.status,'status')
item.productName = item.bizProduct.name;
})
this.data = data.records; this.data = data.records;
this.loading = false; this.loading = false;
this.selectionClear();
}); });
}) })
} else { } else {
this.loading = true; this.loading = true;
bizDeviceList(token, { ...values, pageSize: page.pageSize, pageNum: page.currentPage }).then(res2 => { bizDeviceList(token, { ...values, pageSize: page.pageSize, pageNum: page.currentPage, pid: 100 }).then(res2 => {
this.loading = false; this.loading = false;
this.selectionClear(); this.selectionClear();
if(res2.data.code == 401){ if(res2.data.code == 401){
@ -327,6 +324,7 @@ export default {
item.node = item.bizProduct.node; item.node = item.bizProduct.node;
item.nodeLabel = this.renderLabel(item.node,'node'); item.nodeLabel = this.renderLabel(item.node,'node');
item.statusLabel = this.renderLabel(item.status,'status') item.statusLabel = this.renderLabel(item.status,'status')
item.productName = item.bizProduct.name;
}) })
this.data = data.rows; this.data = data.rows;
} }

@ -1,94 +1,33 @@
<template> <template>
<basic-container> <basic-container>
<avue-crud :option="option" <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" ref="crud" @row-del="rowDel"
:table-loading="loading" v-model="form" :before-open="beforeOpen" @search-change="searchChange" @search-reset="searchReset"
:data="data" @selection-change="selectionChange" @current-change="currentChange" @size-change="sizeChange"
:page.sync="page" @refresh-change="refreshChange" @on-load="onLoad">
ref="crud"
@row-del="rowDel"
v-model="form"
:permission="permissionList"
@row-update="rowUpdate"
@row-save="rowSave"
:before-open="beforeOpen"
@search-change="searchChange"
@search-reset="searchReset"
@selection-change="selectionChange"
@current-change="currentChange"
@size-change="sizeChange"
@refresh-change="refreshChange"
@on-load="onLoad">
<template slot="menuLeft"> <template slot="menuLeft">
<el-button type="danger" <el-button type="danger" size="small" icon="el-icon-turn-off" plain>消警
size="small"
icon="el-icon-turn-off"
plain>消警
</el-button> </el-button>
<el-button type="danger" <el-button type="danger" size="small" icon="el-icon-turn-off" plain>撤防
size="small"
icon="el-icon-turn-off"
plain>撤防
</el-button> </el-button>
<el-button type="danger" <el-button type="danger" size="small" icon="el-icon-turn-off" plain>旁路恢复
size="small"
icon="el-icon-turn-off"
plain>旁路恢复
</el-button> </el-button>
<el-button type="warning" <el-button @click="handleExport" type="warning" size="small" icon="el-icon-download" plain>导出
size="small"
icon="el-icon-download"
plain>导出
</el-button> </el-button>
<!-- <el-button type="danger"
size="small"
icon="el-icon-delete"
plain
v-if="permission.notice_delete"
@click="handleDelete">
</el-button> -->
</template> </template>
<template slot-scope="{row}" <template slot-scope="{ row, index }" slot="menu">
slot="alarmInfo"> <el-button @click="tip(row, index)" type="text" icon="el-icon-brush" size="small"
<!-- <el-tag type="danger"> -->
{{row.alarmInfo}}
<!-- </el-tag> -->
</template>
<template #menu="{row,index}">
<el-button @click="tip(row,index)"
type="primart" plain
size="small" >详情</el-button>
<el-button
@click="tip(row,index)"
type="primart" plain
size="small"
:disabled="row.cancelTime == ''"> :disabled="row.cancelTime == ''">
消警 消警
</el-button> </el-button>
<!-- <el-button @click="tip(row,index)" <el-button @click="linkVideo(row, index)" type="text" icon="el-icon-video-camera-solid" size="small"
type="primart" plain
size="small">撤防</el-button> -->
<!-- <el-button @click="tip(row,index)"
type="primart" plain
size="small">旁路恢复</el-button> -->
<el-button
@click="linkVideo(row,index)"
type="primart"
plain
size="small"
:disabled="row.cancelTime == ''"> :disabled="row.cancelTime == ''">
视频联动 视频联动
</el-button> </el-button>
</template> </template>
</avue-crud> </avue-crud>
<!-- 视频联动弹窗 --> <!-- 视频联动弹窗 -->
<el-dialog <el-dialog title="视频联动" :visible.sync="dialogVisible" :append-to-body="true" :close-on-click-modal="false"
title="视频联动" :close-on-press-escape="false" custom-class="video_dia" width="950px">
:visible.sync="dialogVisible"
:append-to-body="true"
:close-on-click-modal="false"
:close-on-press-escape="false"
custom-class="video_dia"
width="65%">
<div class="video_box"> <div class="video_box">
<!-- <div class="video_item" v-for="item in videoData" :key="item.id"> <!-- <div class="video_item" v-for="item in videoData" :key="item.id">
@ -107,296 +46,266 @@
</template> </template>
<script> <script>
import {getList, remove, update, add, getNotice} from "@/api/desk/notice"; import { getList } from "@/api/alarm/alarm";
import {mapGetters} from "vuex"; import {exportBlob} from "@/api/common";
import { downloadXls } from "@/util/util";
import {dateNow} from "@/util/date";
import {getToken} from "@/util/auth";
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import func from "@/util/func";
export default { export default {
data() { data() {
return { return {
form: {}, form: {},
query: {}, query: {},
loading: true, loading: true,
dialogVisible:false, dialogVisible: false,
page: { page: {
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
total: 0 total: 0
},
selectionList: [],
option: {
height: 'auto',
calcHeight: 30,
dialogWidth: 950,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
// index: true,
menuWidth: 320,
viewBtn: false,
addBtn: false,
editBtn: false,
delBtn: false,
selection: true,
dialogClickModal: false,
column: [
{
label: "设备名称",
prop: "title",
span: 24,
row: true,
search: true,
},
{
label: "设备编号",
prop: "deviceNo",
span: 24,
row: true,
},
{
label: "设备大类",
prop: "deviceType",
span: 24,
row: true,
},
{
label: "品牌编号",
prop: "brandNo",
span: 24,
row: true,
},
// {
// label: "",
// type: "select",
// dicUrl: "/api/blade-system/dict/dictionary?code=notice",
// props: {
// label: "dictValue",
// value: "dictKey"
// },
// dataType: "number",
// slot: true,
// prop: "category",
// search: true,
// },
{
label: "所属区域",
prop: "floor",
// slot: true,
},
{
label: "安装位置",
prop: "address",
// slot: true,
},
{
label: "报警信息",
prop: "alarmInfo",
slot: true,
overHidden:true
},
{
label: "报警时间",
prop: "alarmTime",
type: "date",
},
{
label: "消报时间",
prop: "cancelTime",
type: "date",
},
]
},
data: [],
videoData:[]
};
},
computed: {
...mapGetters(["permission"]),
permissionList() {
return {
addBtn: this.vaildData(this.permission.notice_add, false),
viewBtn: this.vaildData(this.permission.notice_view, false),
delBtn: this.vaildData(this.permission.notice_delete, false),
editBtn: this.vaildData(this.permission.notice_edit, false)
};
}, },
ids() { selectionList: [],
let ids = []; option: {
this.selectionList.forEach(ele => { height: 'auto',
ids.push(ele.id); calcHeight: 30,
}); tip: false,
return ids.join(","); border: true,
} searchShow: true,
}, searchMenuSpan: 6,
methods: { menuWidth: 240,
rowSave(row, done, loading) { viewBtn: true,
add(row).then(() => { addBtn: false,
this.onLoad(this.page); editBtn: false,
this.$message({ delBtn: false,
type: "success", selection: true,
message: "操作成功!" dialogClickModal: false,
}); column: [
done(); {
}, error => { label: "设备名称",
window.console.log(error); prop: "title",
loading(); },
}); {
label: "设备编号",
prop: "deviceId",
row: true,
},
{
label: "设备类型",
type: 'select',
prop: "deviceType",
dataType: "number",
dictData: [],
search: true
},
// {
// label: "",
// type: "select",
// dicUrl: "/api/blade-system/dict/dictionary?code=notice",
// props: {
// label: "dictValue",
// value: "dictKey"
// },
// dataType: "number",
// slot: true,
// prop: "category",
// search: true,
// },
{
label: "楼号",
prop: "buildId",
},
{
label: "楼层",
prop: "floorNo",
},
{
label: "经纬度",
prop: "longidute",
formatter: (data) => {
return (data.longidute ? data.longidute + ',' : '') + data.latidute;
}
},
{
label: "报警信息",
prop: "content",
overHidden: true,
width: '200'
},
{
label: "上报时间",
prop: "reportTime",
width: '150'
},
{
label: '上报日期',
prop: 'releaseTimeRange',
type: 'datetime',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
searchRange: true,
search: true,
hide: true,
viewDisplay: false,
},
]
}, },
rowUpdate(row, index, done, loading) { data: [],
update(row).then(() => { videoData: []
};
},
computed: {
ids() {
let ids = [];
this.selectionList.forEach(ele => {
ids.push(ele.id);
});
return ids.join(",");
}
},
methods: {
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.currentPage = 1;
this.onLoad(this.page, params);
done();
},
selectionChange(list) {
this.selectionList = list;
},
selectionClear() {
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page); this.onLoad(this.page);
this.$message({ this.$message({
type: "success", type: "success",
message: "操作成功!" message: "操作成功!"
}); });
done(); this.$refs.crud.toggleSelection();
}, error => {
window.console.log(error);
loading();
}); });
}, },
rowDel(row) { beforeOpen(done, type) {
this.$confirm("确定将选择数据删除?", { done();
confirmButtonText: "确定", },
cancelButtonText: "取消", currentChange(currentPage) {
type: "warning" this.page.currentPage = currentPage;
}) },
.then(() => { sizeChange(pageSize) {
return remove(row.id); this.page.pageSize = pageSize;
}) },
.then(() => { refreshChange() {
this.onLoad(this.page); this.onLoad(this.page, this.query);
this.$message({ },
type: "success", onLoad(page, params = {}) {
message: "操作成功!" const { releaseTimeRange } = this.query;
}); let values = {
}); ...params,
}, ...this.query
searchReset() { };
this.query = {}; if (releaseTimeRange) {
this.onLoad(this.page); values = {
}, ...values,
searchChange(params, done) { startTime: releaseTimeRange[0],
this.query = params; endTime: releaseTimeRange[1],
this.page.currentPage = 1; };
this.onLoad(this.page, params); values.releaseTimeRange = null;
done(); }
}, this.loading = true;
selectionChange(list) { getList(page.currentPage, page.pageSize, values).then(res => {
this.selectionList = list; const data = res.data.data;
}, this.page.total = data.total;
selectionClear() { this.data = data.records;
this.selectionList = [];
this.$refs.crud.toggleSelection();
},
handleDelete() {
if (this.selectionList.length === 0) {
this.$message.warning("请选择至少一条数据");
return;
}
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
return remove(this.ids);
})
.then(() => {
this.onLoad(this.page);
this.$message({
type: "success",
message: "操作成功!"
});
this.$refs.crud.toggleSelection();
});
},
beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getNotice(this.form.id).then(res => {
this.form = res.data.data;
});
}
done();
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
},
sizeChange(pageSize) {
this.page.pageSize = pageSize;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
// const {releaseTimeRange} = this.query;
// let values = {
// ...params,
// ...this.query
// };
// if (releaseTimeRange) {
// values = {
// ...values,
// releaseTime_datege: releaseTimeRange[0],
// releaseTime_datelt: releaseTimeRange[1],
// };
// values.releaseTimeRange = null;
// }
// this.loading = true;
// getList(page.currentPage, page.pageSize, values).then(res => {
// const data = res.data.data;
// this.page.total = data.total;
// this.data = data.records;
// this.loading = false;
// this.selectionClear();
// });
this.data = [
{title:'空调',deviceNo:'A101',deviceType:'空调设备',brandNo:'格力AT51',floor:'一号楼一层北',address:'1011室',alarmInfo:'无法制冷',alarmTime:'2023-07-14 09:55:23',cancelTime:'2023-07-15 15:23:10'},
{title:'空调',deviceNo:'A101',deviceType:'空调设备',brandNo:'格力AT51',floor:'一号楼一层北',address:'1011室',alarmInfo:'无法制冷,无法制冷无法制冷',alarmTime:'2023-07-14 09:55:23',cancelTime:''},
];
this.loading = false; this.loading = false;
this.page.total = this.data.length this.selectionClear();
}, });
// },
linkVideo(){ //
this.dialogVisible = true; linkVideo() {
this.videoData = [ this.dialogVisible = true;
{id:'001',url:'cdcdcdcd',name:'视频一'}, this.videoData = [
{id:'002',url:'cdcdcdcd',name:'视频一'}, { id: '001', url: 'cdcdcdcd', name: '视频一' },
{id:'003',url:'cdcdcdcd',name:'视频一'}, { id: '002', url: 'cdcdcdcd', name: '视频一' },
{id:'004',url:'cdcdcdcd',name:'视频一'}, { id: '003', url: 'cdcdcdcd', name: '视频一' },
{id:'005',url:'cdcdcdcd',name:'视频一'}, { id: '004', url: 'cdcdcdcd', name: '视频一' },
{id:'006',url:'cdcdcdcd',name:'视频一'}, { id: '005', url: 'cdcdcdcd', name: '视频一' },
{id:'007',url:'cdcdcdcd',name:'视频一'}, { id: '006', url: 'cdcdcdcd', name: '视频一' },
{id:'008',url:'cdcdcdcd',name:'视频一'}, { id: '007', url: 'cdcdcdcd', name: '视频一' },
] { id: '008', url: 'cdcdcdcd', name: '视频一' },
}, ]
} },
}; //
handleExport() {
let values = {
deviceType: func.toStr(this.query.deviceType)
};
if (this.query.releaseTimeRange) {
values = {
...values,
startTime: this.queryreleaseTimeRange[0],
endTime: this.queryreleaseTimeRange[1],
};
}
let params = '';
Object.keys(values).map(key => {
params = '&' + key + '=' + values[key];
})
this.$confirm("是否导出报警数据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
NProgress.start();
exportBlob(`/api/alarmInformation/export?${this.website.tokenHeader}=${getToken()}${params}`).then(res => {
downloadXls(res.data, `报警数据表${dateNow()}.xlsx`);
NProgress.done();
})
});
},
}
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>
<style lang="scss"> <style lang="scss">
.video_dia{ .video_dia {
.video_box{ .video_box {
width: 100%; width: 100%;
// display: flex; // display: flex;
// justify-content: space-between; // justify-content: space-between;
// flex-wrap: wrap; // flex-wrap: wrap;
.grid-content { .grid-content {
width: 100%; width: 100%;
height: 200px; height: 200px;
margin-bottom: 18px; margin-bottom: 18px;
background: #959595; background: #959595;
video{ video {
width: 100%; width: 100%;
height: 100%; height: 100%;
}
} }
} }
} }
}
</style> </style>

Loading…
Cancel
Save