人员定位接口变更;诊间设置接口变量

main
zhangqun 2 years ago
parent 4303c2bb68
commit 159bbcaa6d
  1. 2
      public/index.html
  2. 14
      src/api/wirelessintrusion/wirelessintrusion.js
  3. 2
      src/lang/zh.js
  4. 252
      src/views/alarmcenter/peopleposition/list copy.vue
  5. 124
      src/views/alarmcenter/peopleposition/list.vue
  6. 4
      src/views/wirelessintrusion/deployment/list.vue
  7. 2
      src/views/wirelessintrusion/warn/record.vue
  8. 11
      vocalldemo/index.html
  9. 3
      vue.config.js

@ -25,7 +25,7 @@
<!-- <script src="<%= BASE_URL %>cdn/thirdlib/Ice.min.js" charset="utf-8"></script> -->
<script src="<%= BASE_URL %>h5plyer/h5player.min.js" charset="utf-8"></script>
<link rel="icon" href="<%= BASE_URL %>favicon.png">
<title>Saber企业平台</title>
<title>无线入侵系统</title>
<style>
html,
body,

@ -147,6 +147,18 @@ export const alarmInfoUpdate = (data) => {
data: data
})
}
//人员列表
export const selectPatientPage = (token, params) => {
return request({
url: baseUrl + '/api/safeCare/patient/selectPatientPage',
method: 'get',
headers: {
Authorization: token
},
params: params,
authorization: false
})
}
//定位设备列表
export const terminalList = (token, params) => {
return request({
@ -159,7 +171,7 @@ export const terminalList = (token, params) => {
authorization: false
})
}
//定位设备列表
//定位设备列表-坐标转换
export const coordinateToWGS84 = (params) => {
return request({
url: '/api/appData/coordinateToWGS84',

@ -1,5 +1,5 @@
export default {
title: 'Saber企业管理平台',
title: '无线入侵系统',
logoutTip: '退出系统, 是否继续?',
submitText: '确定',
cancelText: '取消',

@ -0,0 +1,252 @@
<template>
<basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" :page.sync="page"
:permission="permissionList" @search-change="searchChange" @search-reset="searchReset"
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
<template #menu="{ row, index }">
<el-button type="text" icon="el-icon-view" size="small" @click="rowView(row, index)">详情
</el-button>
<el-button type="text" icon="el-icon-map-location" :disabled="row.x == null" size="small" @click="rowMap(row, index)">地图定位
</el-button>
</template>
</avue-crud>
<!-- 地图定位 -->
<el-dialog v-if="dialogVisible" :visible.sync="dialogVisible" modal="false" append-to-body fullscreen>
<MapView :name="sn" :x="x" :y="y"></MapView>
</el-dialog>
</basic-container>
</template>
<script>
import { bizLogin, terminalList } from "@/api/wirelessintrusion/wirelessintrusion";
import { mapGetters } from "vuex";
import { dateFormat } from "../../../util/date";
import MapView from "../../map/index.vue";
export default {
components: {
MapView
},
data() {
return {
query: {},
loading: true,
page: {
size: 10,
current: 1,
total: 0
},
option: {
height: 'auto',
calcHeight: 30,
tip: false,
searchShow: true,
searchMenuSpan: 6,
border: true,
index: true,
selection: false,
viewBtn: true,
delBtn: false,
dialogClickModal: false,
menuWidth: 180,
column: [
{
label: "设备名称",
prop: "name",
},
{
label:"sn编号",
prop: "sn",
search: true,
hide: true
},
{
label: "建筑 id",
prop: "buildId",
},
{
label: "楼层",
prop: "floorNo",
},
{
label: "x坐标",
prop: "x",
},
{
label: "y坐标",
prop: "y",
},
{
label: "工作状态",
type: "select",
dicData: [
{value:'work', label:"工作"},{value:'sleep', label:"休眠"}
],
prop: "workStatus",
},
{
label: "通信状态",
type: "select",
dicData: [
{value:0, label:"在线"},{value:1, label:"离线"}
],
prop: "communicateStatus",
},
{
label: "最后一次通信时间",
labelWidth: 150,
prop: "lastCommunicateTime",
span: 24,
formatter: (data, value) => {
return dateFormat(new Date(data.lastCommunicateTime))
},
hide: true
},
{
label: "最后一次配置时间",
labelWidth: 150,
prop: "lastConfigTime",
span: 24,
formatter: (data, value) => {
return dateFormat(new Date(data.lastConfigTime))
},
hide: true
},
{
label: "最后一次定位时间",
labelWidth: 150,
prop: "lastLocateTime",
span: 24,
formatter: (data, value) => {
return dateFormat(new Date(data.lastLocateTime))
},
hide:true
},
{
label: "创建时间",
prop: "createTime",
formatter: (data, value) => {
return dateFormat(new Date(data.createTime))
}
},
{
label: "更新时间",
prop: "updateTime",
formatter: (data, value) => {
return dateFormat(new Date(data.updateTime))
},
hide:true
}
]
},
data: [],
submitLoading: false,
buildingId: 202861,
//
dialogVisible: false,
sn: '',
x: 0,
y: 0,
floorNo: 1
};
},
computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
addBtn: false,
viewBtn: false,
delBtn: true,
editBtn: false
};
},
},
methods: {
//
rowView(row, index) {
this.$refs.crud.rowView(row, index);
},
//
rowMap(row, index) {
if(row.x && row.y) {
this.sn = row.sn;
this.x = row.x;
this.y = row.y;
this.floorNo = row.floorNo;
console.log(this.sn,this.x,this.y)
this.dialogVisible = true;
}
},
searchReset() {
this.query = {};
this.onLoad(this.page);
},
searchChange(params, done) {
this.query = params;
this.page.current = 1;
this.onLoad(this.page, params);
done();
},
currentChange(current) {
this.page.current = current;
},
sizeChange(size) {
this.page.size = size;
},
refreshChange() {
this.onLoad(this.page, this.query);
},
onLoad(page, params = {}) {
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);
this.loading = true;
terminalList(res.data.data.token, Object.assign(params, this.query, { page: page.currentPage, size: page.pageSize, buildingIds: this.buildingId })).then(res2 => {
this.loading = false;
if (res2.data.code == 401) {
window.sessionStorage.removeItem('bizToken');
this.onLoad(this.page);
}
else {
const data = res2.data.data;
this.page.total = data.totalElements;
this.data = data.content;
}
}, err => {
this.loading = false;
});
})
}
else {
this.loading = true;
terminalList(token, Object.assign(params, this.query, { page: page.currentPage, size: page.pageSize, buildingIds: this.buildingId })).then(res2 => {
this.loading = false;
if (res2.data.code == 401) {
window.sessionStorage.removeItem('bizToken');
this.onLoad(this.page);
}
else {
const data = res2.data.data;
this.page.total = data.totalElements;
this.data = data.content;
}
}, err => {
this.loading = false;
});
}
},
}
};
</script>
<style lang="scss" scoped>
.el-table {
width: 100% !important;
border: 1px solid #D6D8DF;
}
.el-table th.el-table__cell {
background: #F7F8FA;
}
</style>

@ -6,7 +6,8 @@
<template #menu="{ row, index }">
<el-button type="text" icon="el-icon-view" size="small" @click="rowView(row, index)">详情
</el-button>
<el-button type="text" icon="el-icon-map-location" :disabled="row.x == null" size="small" @click="rowMap(row, index)">地图定位
<el-button type="text" icon="el-icon-map-location" :disabled="row.x == null" size="small"
@click="rowMap(row, index)">地图定位
</el-button>
</template>
</avue-crud>
@ -18,7 +19,7 @@
</template>
<script>
import { bizLogin, terminalList } from "@/api/wirelessintrusion/wirelessintrusion";
import { bizLogin, terminalList, selectPatientPage } from "@/api/wirelessintrusion/wirelessintrusion";
import { mapGetters } from "vuex";
import { dateFormat } from "../../../util/date";
import MapView from "../../map/index.vue";
@ -55,40 +56,27 @@ export default {
prop: "name",
},
{
label:"sn编号",
label: "sn编号",
prop: "sn",
search: true,
hide: true
},
{
label: "建筑 id",
prop: "buildId",
},
{
label: "楼层",
prop: "floorNo",
},
{
label: "x坐标",
prop: "x",
label: "姓名",
prop: "patientName",
},
{
label: "y坐标",
prop: "y",
label: "性别",
prop: "sex",
},
{
label: "工作状态",
type: "select",
dicData: [
{value:'work', label:"工作"},{value:'sleep', label:"休眠"}
],
prop: "workStatus",
label: "科室",
prop: "departmentName",
},
{
label: "通信状态",
type: "select",
label: "状态",
type: "status",
dicData: [
{value:0, label:"在线"},{value:1, label:"离线"}
{ value: 0, label: "在线" }, { value: 1, label: "离线" }
],
prop: "communicateStatus",
},
@ -113,30 +101,22 @@ export default {
hide: true
},
{
label: "最后一次定位时间",
label: "入场时间",
labelWidth: 150,
prop: "lastLocateTime",
prop: "admissionTime",
span: 24,
formatter: (data, value) => {
return dateFormat(new Date(data.lastLocateTime))
},
hide:true
hide: true
},
{
label: "创建时间",
prop: "createTime",
label: "出科室时间",
prop: "outDepartmentTime",
formatter: (data, value) => {
return dateFormat(new Date(data.createTime))
}
},
{
label: "更新时间",
prop: "updateTime",
formatter: (data, value) => {
return dateFormat(new Date(data.updateTime))
},
hide:true
}
]
},
data: [],
@ -168,14 +148,60 @@ export default {
},
//
rowMap(row, index) {
if(row.x && row.y) {
this.sn = row.sn;
this.x = row.x;
this.y = row.y;
this.floorNo = row.floorNo;
console.log(this.sn,this.x,this.y)
this.dialogVisible = true;
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);
terminalList(res.data.data.token, Object.assign(params, this.query, { page: page.currentPage, size: page.pageSize, buildingIds: this.buildingId, sn: row.sn })).then(res2 => {
if (res2.data.code == 401) {
window.sessionStorage.removeItem('bizToken');
this.rowMap(row, index)
}
else if (res2.data.code == 0) {
const data = res2.data.data.content;
if (data.length > 0 && data[0].x && data[0].y) {
this.sn = row.sn;
this.x = data[0].x;
this.y = data[0].y;
this.floorNo = data[0].floorNo;
console.log(this.sn, this.x, this.y)
this.dialogVisible = true;
}else{
this.$message.warning("未查询到该人员定位信息");
}
}
});
})
}
else {
terminalList(token, Object.assign(params, this.query, { page: page.currentPage, size: page.pageSize, buildingIds: this.buildingId, sn: row.sn })).then(res2 => {
if (res2.data.code == 401) {
window.sessionStorage.removeItem('bizToken');
this.rowMap(row, index);
}
else if (res2.data.code == 0) {
const data = res2.data.data.content;
if (data.length > 0 && data[0].x && data[0].y) {
this.sn = row.sn;
this.x = data[0].x;
this.y = data[0].y;
this.floorNo = data[0].floorNo;
console.log(this.sn, this.x, this.y)
this.dialogVisible = true;
}else{
this.$message.warning("未查询到该人员定位信息");
}
}
});
}
// if(row.x && row.y) {
// this.sn = row.sn;
// this.x = row.x;
// this.y = row.y;
// this.floorNo = row.floorNo;
// console.log(this.sn,this.x,this.y)
// this.dialogVisible = true;
// }
},
searchReset() {
this.query = {};
@ -202,13 +228,13 @@ export default {
bizLogin({ appKey: 'Arf7bd4f26', appSecret: 'kb207044c8' }).then(res => {
window.sessionStorage.setItem('bizToken', res.data.data.token);
this.loading = true;
terminalList(res.data.data.token, Object.assign(params, this.query, { page: page.currentPage, size: page.pageSize, buildingIds: this.buildingId })).then(res2 => {
selectPatientPage(res.data.data.token, Object.assign(params, this.query, { page: page.currentPage, size: page.pageSize, buildingIds: this.buildingId })).then(res2 => {
this.loading = false;
if (res2.data.code == 401) {
window.sessionStorage.removeItem('bizToken');
this.onLoad(this.page);
}
else {
else if (res2.data.code == 0) {
const data = res2.data.data;
this.page.total = data.totalElements;
this.data = data.content;
@ -220,13 +246,13 @@ export default {
}
else {
this.loading = true;
terminalList(token, Object.assign(params, this.query, { page: page.currentPage, size: page.pageSize, buildingIds: this.buildingId })).then(res2 => {
selectPatientPage(token, Object.assign(params, this.query, { page: page.currentPage, size: page.pageSize, buildingIds: this.buildingId })).then(res2 => {
this.loading = false;
if (res2.data.code == 401) {
window.sessionStorage.removeItem('bizToken');
this.onLoad(this.page);
}
else {
else if (res2.data.code == 0) {
const data = res2.data.data;
this.page.total = data.totalElements;
this.data = data.content;

@ -286,14 +286,16 @@ export default {
return;
}
if (this.multipleSelection.length > 0) {
let ids = [], deviceId = [];
let ids = [], deviceId = [], hostSerialNumber = [];
this.multipleSelection.forEach(ele => {
let tags = JSON.parse(ele.tags)
ids.push(ele.id);
deviceId.push(tags.sectorNo);
hostSerialNumber.push(tags.hostNumber);
});
this.addForm.ids = ids.join(",");
this.addForm.deviceId = deviceId.join(",");
this.addForm.hostSerialNumber = hostSerialNumber.join(",");
}
this.submitLoading = true;
if (this.addForm.id > 0) {

@ -205,7 +205,7 @@ export default {
if (row.systemNum < 0) {
return;
}
warnSysClear({ id: row.id, systemNum: row.systemNum }).then(res => {
warnSysClear({ id: row.id, systemNum: row.systemNum, hostSerialNumber: row.hostSerialNumber }).then(res => {
this.onLoad(this.page);
this.$message({
type: "success",

@ -252,6 +252,9 @@
</div>
</div>
<script>
// const baseUrl = "http://152.136.119.150:81";//外网测试环境
const baseUrl = "http://192.168.1.102:81";//本地测试环境
const iotBaseUrl = "http://182.139.182.190:60032";//物联网平台外网测试环境
if (!('speechSynthesis' in window)) {
throw alert("对不起,您的浏览器不支持")
}
@ -360,7 +363,7 @@
function getDeviceList() {
if (token != undefined && token) {
$.ajax({
url: "http://182.139.182.190:60032/prod-api/api/bizDevice/list?pid=98&params[type]=1", type: "get", headers: { Authorization: token }, dataType: "json", success: function (res) {
url: iotBaseUrl + "/prod-api/api/bizDevice/list?pid=98&params[type]=1", type: "get", headers: { Authorization: token }, dataType: "json", success: function (res) {
if (res.code == 200) {
deviceList = res.rows;
deviceList.forEach(function (v) {
@ -385,7 +388,7 @@
});
} else {
$.ajax({
url: "http://182.139.182.190:60032/prod-api/api/Login", type: "post", contentType: "application/json;charset=UTF-8", dataType: "json", data: JSON.stringify({
url: iotBaseUrl + "/prod-api/api/Login", type: "post", contentType: "application/json;charset=UTF-8", dataType: "json", data: JSON.stringify({
"appKey": 'Arf7bd4f26', "appSecret": 'kb207044c8'
}), success: function (res) {
if (res.code === 0) {
@ -424,7 +427,7 @@
formdata.append('latidute', tags.lat);
formdata.append('content', txt);
$.ajax({
url: "http://152.136.119.150:81/appData/putFile", type: "post", contentType: false, processData: false, dataType: 'json', data: formdata, success: function (res) {
url: baseUrl + "/appData/putFile", type: "post", contentType: false, processData: false, dataType: 'json', data: formdata, success: function (res) {
if (res.code === 200) {
console.log('上报成功');
reportIot(txt);
@ -450,7 +453,7 @@
    "platformCode": "DIANXIN",
}
$.ajax({
url: "http://152.136.119.150:81/appData/escalation", type: "post", contentType: "application/json;charset=UTF-8", dataType: "json", data: JSON.stringify(data), success: function (res) {
url: baseUrl + "/appData/escalation", type: "post", contentType: "application/json;charset=UTF-8", dataType: "json", data: JSON.stringify(data), success: function (res) {
let _data = JSON.parse(res.data);
if (_data.resultCode == 0) {
console.log('上报成功2');

@ -40,7 +40,8 @@ module.exports = {
"/api": {
//本地服务接口地址
// target: 'http://192.168.1.34:8008',
target: 'http://192.168.3.32:81',
// target: 'http://192.168.3.32:81',
target: 'http://192.168.1.102:81',
ws: true,
pathRewrite: {
"^/api": "/",

Loading…
Cancel
Save