Merge branch 'ehs' of https://e.coding.net/ctcdevteam/ehs/ehs_web into ehs
This commit is contained in:
commit
32e3b828b9
|
|
@ -12,9 +12,38 @@ export default {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
bltBind: {
|
||||||
|
name: "绑定/解绑定位卡",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/third/tdevice/blt_bind/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
bltSync: {
|
||||||
|
name: "同步标签mac至平台",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/third/tdevice/blt_sync/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
blt:{
|
blt:{
|
||||||
|
list:{
|
||||||
|
name: "全部在线标签列表信息",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.post(
|
||||||
|
`${config.API_URL}/third/tdevice/blt/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
all:{
|
all:{
|
||||||
name: "全部在线标签列表信息",
|
name: "全部在线标签列表信息",
|
||||||
req: async function(data){
|
req: async function(data){
|
||||||
|
|
@ -44,5 +73,14 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
thirdLog:{
|
||||||
|
name: "第三方日志",
|
||||||
|
req: async function(data){
|
||||||
|
return await http.get(
|
||||||
|
`${config.API_URL}/third/tlog/`,
|
||||||
|
data
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -528,6 +528,14 @@ const routes = [
|
||||||
"icon": "el-icon-menu",
|
"icon": "el-icon-menu",
|
||||||
},
|
},
|
||||||
"component": "am/audio"
|
"component": "am/audio"
|
||||||
|
},{
|
||||||
|
"name": "blt",
|
||||||
|
"path": "/am/blt",
|
||||||
|
"meta": {
|
||||||
|
"title": "定位标签",
|
||||||
|
"icon": "el-icon-menu",
|
||||||
|
},
|
||||||
|
"component": "am/blt"
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
@ -672,15 +680,15 @@ const routes = [
|
||||||
},
|
},
|
||||||
"component": "ops/log_request"
|
"component": "ops/log_request"
|
||||||
},
|
},
|
||||||
/*{
|
{
|
||||||
"name": "monitor",
|
"name": "thirdLogs",
|
||||||
"path": "/ops/monitor",
|
"path": "/ops/thirdLogs",
|
||||||
"meta": {
|
"meta": {
|
||||||
"title": "服务监控",
|
"title": "第三方日志",
|
||||||
"icon": "el-icon-fold",
|
"icon": "el-icon-fold",
|
||||||
},
|
},
|
||||||
"component": "ops/monitor"
|
"component": "ops/thirdLogs"
|
||||||
},*/
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
:title="areaName+'围栏设置'"
|
:title="areaName+'围栏设置'"
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
destroy-on-close
|
destroy-on-close
|
||||||
|
:size="'80%'"
|
||||||
@closed="closeDrawer"
|
@closed="closeDrawer"
|
||||||
>
|
>
|
||||||
<el-form
|
<el-form
|
||||||
|
|
@ -106,24 +107,6 @@
|
||||||
});
|
});
|
||||||
window.map.openMapById('0000');
|
window.map.openMapById('0000');
|
||||||
window.map.on('loadComplete', e => {
|
window.map.on('loadComplete', e => {
|
||||||
console.log('Map loadComplete!');
|
|
||||||
var pointMarker = new jsmap.JSPointMarker({
|
|
||||||
color: '#00FF00', //填充颜色
|
|
||||||
size: 10, //尺寸
|
|
||||||
position: new jsmap.JSPoint(114.628074820438, 38.8157131095379, 0), //坐标
|
|
||||||
floorId: 2, //楼层id,默认为1(地面)
|
|
||||||
outlineColor: '#CD5C5C', //边线颜色
|
|
||||||
outlineWidth: 2, //边线宽
|
|
||||||
depthTest: true, //是否开启深度检测
|
|
||||||
show: true, //是否显示
|
|
||||||
allowPicking: true, //是否允许点击
|
|
||||||
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), //可见范围
|
|
||||||
nearFarScale: new jsmap.JSNearFarScale(0.0, 10.0, 500, 0.5), //比例缩放
|
|
||||||
callback: (node) => {
|
|
||||||
console.log(node);
|
|
||||||
}//回调事件
|
|
||||||
});
|
|
||||||
window.map.addMarker(pointMarker);
|
|
||||||
let drawTool2 = new jsmap.JSDrawToolControl({
|
let drawTool2 = new jsmap.JSDrawToolControl({
|
||||||
position: jsmap.JSControlPosition.RIGHT_TOP, //画图工具在容器中的相对位置,当前为右上
|
position: jsmap.JSControlPosition.RIGHT_TOP, //画图工具在容器中的相对位置,当前为右上
|
||||||
offset: {
|
offset: {
|
||||||
|
|
@ -133,9 +116,9 @@
|
||||||
drawMode: jsmap.JSDrawMode.POLYGON, //画图类型POINT:画点 POLYLINE:画线 POLYGON:画面
|
drawMode: jsmap.JSDrawMode.POLYGON, //画图类型POINT:画点 POLYLINE:画线 POLYGON:画面
|
||||||
//画图结束的回调,返回所画的面信息
|
//画图结束的回调,返回所画的面信息
|
||||||
callback: (feature) => {
|
callback: (feature) => {
|
||||||
console.log('add', feature);
|
/*console.log('add', feature);
|
||||||
console.log(feature.properties);//type:POLYGON;id:"";name:"";floorNo:"";floorId:""
|
console.log(feature.properties);//type:POLYGON;id:"";name:"";floorNo:"";floorId:""
|
||||||
console.log(feature.geometry);//feature.geometry.coordinates:[[],[]]面数组
|
console.log(feature.geometry);//feature.geometry.coordinates:[[],[]]面数组*/
|
||||||
this.coordinates.floorNo = feature.properties.floorNo;
|
this.coordinates.floorNo = feature.properties.floorNo;
|
||||||
this.coordinates.floorId = feature.properties.floorId;
|
this.coordinates.floorId = feature.properties.floorId;
|
||||||
that.points = feature.geometry.coordinates[0];
|
that.points = feature.geometry.coordinates[0];
|
||||||
|
|
@ -168,9 +151,7 @@
|
||||||
if(points.length>0){
|
if(points.length>0){
|
||||||
that.isSaveing = true;
|
that.isSaveing = true;
|
||||||
that.coordinates.color = 'rgba(255,0,0,.4)';
|
that.coordinates.color = 'rgba(255,0,0,.4)';
|
||||||
debugger;
|
|
||||||
points.forEach(item=>{
|
points.forEach(item=>{
|
||||||
debugger;
|
|
||||||
let coordinate = {x:parseFloat(item[0]),y:parseFloat(item[1])};
|
let coordinate = {x:parseFloat(item[0]),y:parseFloat(item[1])};
|
||||||
let pixel = tool.mapToScreenCoordinate(coordinate);
|
let pixel = tool.mapToScreenCoordinate(coordinate);
|
||||||
pointXY.push(pixel);
|
pointXY.push(pixel);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,87 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
<div class="right-panel-search">
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="upsearch">同步</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable ref="table" :apiObj="apiObj" row-key="id" @selection-change="selectionChange" stripe @resetQuery="resetQuery" >
|
||||||
|
<el-table-column type="selection" width="50"></el-table-column>
|
||||||
|
<el-table-column label="序号" type="index" width="50"></el-table-column>
|
||||||
|
<el-table-column label="喇叭名称" prop="name" min-width="150"></el-table-column>
|
||||||
|
<el-table-column label="音量" prop="extra" min-width="100">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.extra&&scope.row.extra.player">{{scope.row.extra.player.EnvVolume}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="设备sn" prop="sn" min-width="90"></el-table-column>
|
||||||
|
<el-table-column label="ip" prop="extra" min-width="90">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.extra">{{scope.row.extra.ip}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" prop="extra" min-width="90">
|
||||||
|
<template #default="scope">
|
||||||
|
<span v-if="scope.row.extra">{{scope.row.extra.online}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!--<el-table-column label="位置" prop="count_people" min-width="90"></el-table-column>-->
|
||||||
|
<el-table-column label="所在区域" prop="create_time" min-width="180"></el-table-column>
|
||||||
|
<el-table-column label="覆盖区域" prop="create_time" width="160"></el-table-column>
|
||||||
|
<el-table-column label="操作" fixed="right" align="center" width="160">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button-group>
|
||||||
|
<el-button text type="primary" size="small" @click="handlePosition(scope.row)">标记位置</el-button>
|
||||||
|
</el-button-group>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
<channel-view v-if="dialogSave" ref="saveDialog" :channelType="50" :channelCode="channelCode" :channelName="channelName" @closed="dialogSave=false"></channel-view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import channelView from './vchannel_view'
|
||||||
|
export default {
|
||||||
|
name: 'blt',
|
||||||
|
components: {
|
||||||
|
channelView
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
apiObj: this.$API.third.blt.list,
|
||||||
|
dialogSave: false,
|
||||||
|
limitedVisible: false,
|
||||||
|
query: {},
|
||||||
|
selection: [],
|
||||||
|
search: {
|
||||||
|
keyword: null
|
||||||
|
},
|
||||||
|
channelCode:'',
|
||||||
|
channelName:'',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handlePosition(row){
|
||||||
|
this.channelCode = row.sn;
|
||||||
|
this.channelName = row.name;
|
||||||
|
this.dialogSave = true;
|
||||||
|
},
|
||||||
|
//表格选择后回调事件
|
||||||
|
selectionChange(selection){
|
||||||
|
this.selection = selection;
|
||||||
|
},
|
||||||
|
|
||||||
|
//搜索
|
||||||
|
upsearch(){
|
||||||
|
},
|
||||||
|
|
||||||
|
resetQuery(){
|
||||||
|
this.query = {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
@ -128,24 +128,7 @@
|
||||||
});
|
});
|
||||||
window.map.openMapById('0000');
|
window.map.openMapById('0000');
|
||||||
window.map.on('loadComplete', e => {
|
window.map.on('loadComplete', e => {
|
||||||
console.log('Map loadComplete!');
|
// console.log('Map loadComplete!');
|
||||||
var pointMarker = new jsmap.JSPointMarker({
|
|
||||||
color: '#00FF00', //填充颜色
|
|
||||||
size: 10, //尺寸
|
|
||||||
position: new jsmap.JSPoint(114.628074820438, 38.8157131095379, 0), //坐标
|
|
||||||
floorId: 2, //楼层id,默认为1(地面)
|
|
||||||
outlineColor: '#CD5C5C', //边线颜色
|
|
||||||
outlineWidth: 2, //边线宽
|
|
||||||
depthTest: true, //是否开启深度检测
|
|
||||||
show: true, //是否显示
|
|
||||||
allowPicking: true, //是否允许点击
|
|
||||||
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), //可见范围
|
|
||||||
nearFarScale: new jsmap.JSNearFarScale(0.0, 10.0, 500, 0.5), //比例缩放
|
|
||||||
callback: (node) => {
|
|
||||||
console.log(node);
|
|
||||||
}//回调事件
|
|
||||||
});
|
|
||||||
window.map.addMarker(pointMarker);
|
|
||||||
var drawTool = new jsmap.JSDrawToolControl({
|
var drawTool = new jsmap.JSDrawToolControl({
|
||||||
position: jsmap.JSControlPosition.RIGHT_TOP, //画图工具在容器中的相对位置,当前为右上
|
position: jsmap.JSControlPosition.RIGHT_TOP, //画图工具在容器中的相对位置,当前为右上
|
||||||
offset: {
|
offset: {
|
||||||
|
|
@ -156,12 +139,10 @@
|
||||||
|
|
||||||
//画图结束的回调,返回所画的点的信息
|
//画图结束的回调,返回所画的点的信息
|
||||||
callback: (feature) => {
|
callback: (feature) => {
|
||||||
debugger;
|
//console.log('add', feature);
|
||||||
console.log('add', feature);
|
//console.log(feature.properties);//type:POINT;id:"";name:"";floorNo:"";floorId:""
|
||||||
console.log(feature.properties);//type:POINT;id:"";name:"";floorNo:"";floorId:""
|
//console.log(feature.geometry);//type:POINT;coordinates:[114.63028499839209,38.81195080123784,0]
|
||||||
console.log(feature.geometry);//type:POINT;coordinates:[114.63028499839209,38.81195080123784,0]
|
|
||||||
this.form.location = feature.geometry.coordinates;
|
this.form.location = feature.geometry.coordinates;
|
||||||
debugger;
|
|
||||||
},
|
},
|
||||||
//移除相应点的回调,返回相应点信息
|
//移除相应点的回调,返回相应点信息
|
||||||
removeCallback: (feature) => {
|
removeCallback: (feature) => {
|
||||||
|
|
@ -196,7 +177,7 @@
|
||||||
submit() {
|
submit() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let item = this.form.location;
|
let item = this.form.location;
|
||||||
console.log(this.form.location);
|
//console.log(this.form.location);
|
||||||
that.form.code = that.channelCode;
|
that.form.code = that.channelCode;
|
||||||
that.form.type = that.channelType;
|
that.form.type = that.channelType;
|
||||||
that.form.name = that.channelName;
|
that.form.name = that.channelName;
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,8 @@
|
||||||
<div class="item-info">
|
<div class="item-info">
|
||||||
<div title="员工" class="normal">内部员工</div>
|
<div title="员工" class="normal">内部员工</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<span class="large">{{userCount.count_employee}}</span> <span class="normal">人</span>
|
<span class="large">{{userCount.count_employee}}</span> <span
|
||||||
|
class="normal">人</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -127,7 +128,8 @@
|
||||||
<div class="item-img item-img1"></div>
|
<div class="item-img item-img1"></div>
|
||||||
<div class="item-info">
|
<div class="item-info">
|
||||||
<div title="外来人员" class="normal">访客</div>
|
<div title="外来人员" class="normal">访客</div>
|
||||||
<div class="bottom"><span class="large">{{userCount.count_visitor}}</span> <span class="normal">人</span>
|
<div class="bottom"><span class="large">{{userCount.count_visitor}}</span> <span
|
||||||
|
class="normal">人</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -136,7 +138,8 @@
|
||||||
<div class="item-info">
|
<div class="item-info">
|
||||||
<div title="承包商" class="normal">相关方</div>
|
<div title="承包商" class="normal">相关方</div>
|
||||||
<div class="bottom">
|
<div class="bottom">
|
||||||
<span class="large">{{userCount.count_remployee}}</span> <span class="normal">人</span>
|
<span class="large">{{userCount.count_remployee}}</span> <span
|
||||||
|
class="normal">人</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -488,10 +491,15 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="basic-btn-group">
|
<div class="basic-btn-group">
|
||||||
<div class="danger-btn-bg btn-item" @click="userTrack">
|
<div v-if="tracking" class="danger-btn-bg btn-item" @click="userUnTrack">
|
||||||
|
<span class="trackImg"></span>
|
||||||
|
<span>取消跟踪</span>
|
||||||
|
</div>
|
||||||
|
<div v-else class="danger-btn-bg btn-item" @click="userTrack">
|
||||||
<span class="trackImg"></span>
|
<span class="trackImg"></span>
|
||||||
<span>跟踪</span>
|
<span>跟踪</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="simple-btn-bg btn-item">
|
<div class="simple-btn-bg btn-item">
|
||||||
<span class="viewImg"></span>
|
<span class="viewImg"></span>
|
||||||
<span>轨迹</span>
|
<span>轨迹</span>
|
||||||
|
|
@ -519,7 +527,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="岗位">
|
<el-table-column label="岗位">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.my_info.employee_">{{scope.row.my_info.employee_.post_name}}</span>
|
<span
|
||||||
|
v-if="scope.row.my_info.employee_">{{scope.row.my_info.employee_.post_name}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -824,6 +833,7 @@
|
||||||
userMaskerLayer: null,
|
userMaskerLayer: null,
|
||||||
jobDomMarkerLayer: null,
|
jobDomMarkerLayer: null,
|
||||||
riskMarkerLayer: null,//风险区域
|
riskMarkerLayer: null,//风险区域
|
||||||
|
areaMarkerLayer: null,//区域展示
|
||||||
pointMarkerLayer: null,//点位图层
|
pointMarkerLayer: null,//点位图层
|
||||||
polygonMaskerLayer: null,//危险作业
|
polygonMaskerLayer: null,//危险作业
|
||||||
cameraMaskerLayer: null,//摄像头
|
cameraMaskerLayer: null,//摄像头
|
||||||
|
|
@ -831,10 +841,12 @@
|
||||||
carsMaskerLayer: null,//车辆
|
carsMaskerLayer: null,//车辆
|
||||||
manMaskerLayer: null,//人员
|
manMaskerLayer: null,//人员
|
||||||
flyManager: null,
|
flyManager: null,
|
||||||
|
eareMarker: null,
|
||||||
dropIndex: '1',
|
dropIndex: '1',
|
||||||
countIndex: '2',
|
countIndex: '2',
|
||||||
markList: [false, false, false, false, false, false, false],
|
markList: [false, false, false, false, false, false, false],
|
||||||
autoRun: false,
|
autoRun: false,
|
||||||
|
tracking: false,
|
||||||
areaDetail: false,
|
areaDetail: false,
|
||||||
screenJob: false,
|
screenJob: false,
|
||||||
screenUser: false,
|
screenUser: false,
|
||||||
|
|
@ -845,13 +857,13 @@
|
||||||
showUserSelect: false,
|
showUserSelect: false,
|
||||||
warningDetail: false,
|
warningDetail: false,
|
||||||
filterCtrlFocus: true,
|
filterCtrlFocus: true,
|
||||||
warningListTotal:0,
|
warningListTotal: 0,
|
||||||
warningData:{
|
warningData: {
|
||||||
list:[],
|
list: [],
|
||||||
total:0,
|
total: 0,
|
||||||
params:{
|
params: {
|
||||||
page:1,
|
page: 1,
|
||||||
page_size:10
|
page_size: 10
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Vchannels: [],//摄像头列表
|
Vchannels: [],//摄像头列表
|
||||||
|
|
@ -903,6 +915,7 @@
|
||||||
mark: '1',
|
mark: '1',
|
||||||
},
|
},
|
||||||
LBType: '1',
|
LBType: '1',
|
||||||
|
userMarker: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -952,6 +965,8 @@
|
||||||
this.polygonMarkerLayers();//危险作业
|
this.polygonMarkerLayers();//危险作业
|
||||||
this.speakersMaskerLayers();//喇叭
|
this.speakersMaskerLayers();//喇叭
|
||||||
this.jobDomMarkerLayers();//危险作业图片
|
this.jobDomMarkerLayers();//危险作业图片
|
||||||
|
this.areaMarkerLayers();//危险作业图片
|
||||||
|
|
||||||
let compassControl = new jsmap.JSCompassControl({
|
let compassControl = new jsmap.JSCompassControl({
|
||||||
position: jsmap.JSControlPosition.LEFT_TOP,
|
position: jsmap.JSControlPosition.LEFT_TOP,
|
||||||
offset: {
|
offset: {
|
||||||
|
|
@ -968,7 +983,6 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
window.map.addControl(zoomControl);
|
window.map.addControl(zoomControl);
|
||||||
// this.pointMaskerLayers();//点
|
|
||||||
});
|
});
|
||||||
window.map.on('mapClickNode', event => {
|
window.map.on('mapClickNode', event => {
|
||||||
let item = event;
|
let item = event;
|
||||||
|
|
@ -1050,6 +1064,10 @@
|
||||||
//人员
|
//人员
|
||||||
that.screenUserItem = item.properties.get("employee");
|
that.screenUserItem = item.properties.get("employee");
|
||||||
that.screenUser = true;
|
that.screenUser = true;
|
||||||
|
debugger;
|
||||||
|
window.map.flyToMarker(that.userMarker[that.screenUserItem.mac],{
|
||||||
|
duration:1000
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1062,13 +1080,6 @@
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/*
|
|
||||||
* <div class="v_title" style="width: 327px;height: 45px;padding: 10px 0;font-size: 16px;font-weight: 700;color: #fff;position: relative;padding-left: 8px;display: flex;justify-content: space-between">
|
|
||||||
<div>`+event.markers[0].text+`</div><div style="width: 16px;height: 16px;background: url(.//public/img/close.png) no-repeat;background-size: 100% 100%;" @click="closeVideo"></div>
|
|
||||||
</div>
|
|
||||||
<div class="v_masker" style="width: 327px;height: 183px;background: url(.//public/img/v_mask.png) no-repeat;background-size: 100% 100%;" @click="playVideo()"></div>
|
|
||||||
<div id="`+event.markers[0].id+`"></div>
|
|
||||||
* */
|
|
||||||
//左侧数据统计
|
//左侧数据统计
|
||||||
this.getManCount();//人员统计$$
|
this.getManCount();//人员统计$$
|
||||||
this.getWarnings();//报警统计$$
|
this.getWarnings();//报警统计$$
|
||||||
|
|
@ -1082,58 +1093,94 @@
|
||||||
this.getAllMen();//人员
|
this.getAllMen();//人员
|
||||||
this.getAllPost();//岗位
|
this.getAllPost();//岗位
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
/*this.getManCount();//人员统计$$
|
|
||||||
this.getWarnings();//报警统计$$
|
}, 3000)
|
||||||
this.getAreas();//区域*/
|
|
||||||
},3000)
|
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
areaRowClick(){
|
areaRowClick(data) {
|
||||||
this.areaDetail = true;
|
let that = this;
|
||||||
|
that.areaDetail = true;
|
||||||
|
// let points = data.third_info.xx_rail.detail.polygon.points[0];
|
||||||
|
window.map.flyToPosition(new jsmap.JSPoint(114.63168864138028, 38.81254802029822, 0),{duration:1000});
|
||||||
|
|
||||||
|
/*debugger;
|
||||||
|
let tool = new jsmap.JSMapCoordTool(map);
|
||||||
|
let points = data.third_info.xx_rail.detail.polygon.points;
|
||||||
|
let position = [];*/
|
||||||
|
/*for(let i=0;i<points.length;i++){
|
||||||
|
let item = tool.screenToMapCoordinate(points[i]);
|
||||||
|
// let item = new jsmap.JSPoint(points[i].x, points[i].y, 0);
|
||||||
|
position.push(item);
|
||||||
|
}*/
|
||||||
|
/*window.map.flyToPosition ({x: points[0].x, y: points[0].y, z:0},{
|
||||||
|
duration:1000,
|
||||||
|
offset:{
|
||||||
|
rotate: 45,
|
||||||
|
tilt: 60,
|
||||||
|
range: 100
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
/*that.eareMarker = new jsmap.JSPolygonMarker({
|
||||||
|
id: data.id,//id
|
||||||
|
position: [
|
||||||
|
new jsmap.JSPoint(114.63168864138028, 38.81254802029822, 0),
|
||||||
|
new jsmap.JSPoint(114.63185023632963, 38.81241816295427, 0),
|
||||||
|
new jsmap.JSPoint(114.63160294240738, 38.812229296478634,0),
|
||||||
|
new jsmap.JSPoint(114.63143965827588, 38.81235778393449, 0),
|
||||||
|
|
||||||
|
],//坐标集合
|
||||||
|
// position:position,//坐标集合
|
||||||
|
floorId: 1,//楼层id
|
||||||
|
color: 'rgba(0,0,255,.44)',//填充颜色
|
||||||
|
strokeColor: '#2bff1d',//边线颜色
|
||||||
|
depthTest: false,//是否开启深度检测
|
||||||
|
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), //可见范围
|
||||||
|
});
|
||||||
|
that.areaMarkerLayer.addMarker(that.eareMarker);*/
|
||||||
},
|
},
|
||||||
//岗位
|
//岗位
|
||||||
getAllPost(){
|
getAllPost() {
|
||||||
this.$API.system.post.list.req({page:0}).then(res=>{
|
this.$API.system.post.list.req({page: 0}).then(res => {
|
||||||
let arr = [];
|
let arr = [];
|
||||||
let children = genTree(res);
|
let children = genTree(res);
|
||||||
for(let i=0;i<4;i++){
|
for (let i = 0; i < 4; i++) {
|
||||||
let obj=new Object();
|
let obj = new Object();
|
||||||
if(i===0){
|
if (i === 0) {
|
||||||
obj.id='';
|
obj.id = '';
|
||||||
obj.name = '全部';
|
obj.name = '全部';
|
||||||
obj.label = '全部';
|
obj.label = '全部';
|
||||||
}else if(i===1){
|
} else if (i === 1) {
|
||||||
obj.id='';
|
obj.id = '';
|
||||||
obj.name = '内部员工';
|
obj.name = '内部员工';
|
||||||
obj.label = '内部员工';
|
obj.label = '内部员工';
|
||||||
obj.children = children;
|
obj.children = children;
|
||||||
}else if(i===2){
|
} else if (i === 2) {
|
||||||
obj.id='';
|
obj.id = '';
|
||||||
obj.name = '相关方';
|
obj.name = '相关方';
|
||||||
obj.label = '相关方';
|
obj.label = '相关方';
|
||||||
}else if(i===3){
|
} else if (i === 3) {
|
||||||
obj.id='';
|
obj.id = '';
|
||||||
obj.name = '访客';
|
obj.name = '访客';
|
||||||
obj.label = '访客';
|
obj.label = '访客';
|
||||||
}
|
}
|
||||||
arr.push(obj)
|
arr.push(obj)
|
||||||
}
|
}
|
||||||
this.postList =arr;
|
this.postList = arr;
|
||||||
// console.log(arr)
|
// console.log(arr)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//人员统计
|
//人员统计
|
||||||
getManCount() {
|
getManCount() {
|
||||||
let that = this;
|
let that = this;
|
||||||
if(that.countIndex==='2'){
|
if (that.countIndex === '2') {
|
||||||
that.$API.third.blt.countNow.req().then(res => {
|
that.$API.third.blt.countNow.req().then(res => {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
} else {
|
} else {
|
||||||
that.userCount = {...res};
|
that.userCount = {...res};
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
that.$API.third.blt.countBind.req().then(res => {
|
that.$API.third.blt.countBind.req().then(res => {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -1181,17 +1228,18 @@
|
||||||
},
|
},
|
||||||
//获取人员列表(全部在线标签列表信息)
|
//获取人员列表(全部在线标签列表信息)
|
||||||
getAllMen() {
|
getAllMen() {
|
||||||
this.$API.third.blt.all.req().then(res => {
|
let that = this;
|
||||||
|
that.$API.third.blt.all.req().then(res => {
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
} else {
|
} else {
|
||||||
this.userList = res.filter(item => {
|
that.userList = res.filter(item => {
|
||||||
return item.my_info.employee
|
return item.my_info.employee
|
||||||
});
|
});
|
||||||
// console.log(this.userList)
|
that.showUserMarkers(that.userList);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleCurrentChange(){
|
handleCurrentChange() {
|
||||||
this.getWarnings();
|
this.getWarnings();
|
||||||
},
|
},
|
||||||
//获取报警列表
|
//获取报警列表
|
||||||
|
|
@ -1229,7 +1277,7 @@
|
||||||
//获取人员详细信息
|
//获取人员详细信息
|
||||||
showUserDetail() {
|
showUserDetail() {
|
||||||
this.screenUserDetail = true;
|
this.screenUserDetail = true;
|
||||||
this.$API.hrm.employee.item.req(this.screenUserItem.id).then(res=>{
|
this.$API.hrm.employee.item.req(this.screenUserItem.id).then(res => {
|
||||||
// console.log(res);
|
// console.log(res);
|
||||||
this.screenUserItemDetail = res;
|
this.screenUserItemDetail = res;
|
||||||
})
|
})
|
||||||
|
|
@ -1239,12 +1287,12 @@
|
||||||
let that = this;
|
let that = this;
|
||||||
this.showUserSelect = false;
|
this.showUserSelect = false;
|
||||||
this.screenUser = true;
|
this.screenUser = true;
|
||||||
that.screenUserItem.name=this.userList[0].my_info.employee_.name;
|
that.screenUserItem.name = this.userList[0].my_info.employee_.name;
|
||||||
that.screenUserItem.type=this.userList[0].my_info.employee_.type;
|
that.screenUserItem.type = this.userList[0].my_info.employee_.type;
|
||||||
that.screenUserItem.id=this.userList[0].my_info.employee_.id;
|
that.screenUserItem.id = this.userList[0].my_info.employee_.id;
|
||||||
that.screenUserItem.photo=this.userList[0].my_info.employee_.photo?this.userList[0].my_info.employee_.photo:'';
|
that.screenUserItem.photo = this.userList[0].my_info.employee_.photo ? this.userList[0].my_info.employee_.photo : '';
|
||||||
that.screenUserItem.post_name=this.userList[0].my_info.employee_.post_name?this.userList[0].my_info.employee_.post_name:'';
|
that.screenUserItem.post_name = this.userList[0].my_info.employee_.post_name ? this.userList[0].my_info.employee_.post_name : '';
|
||||||
that.screenUserItem.belong_dept_name=this.userList[0].my_info.employee_.belong_dept_name?this.userList[0].my_info.employee_.belong_dept_name:'';
|
that.screenUserItem.belong_dept_name = this.userList[0].my_info.employee_.belong_dept_name ? this.userList[0].my_info.employee_.belong_dept_name : '';
|
||||||
},
|
},
|
||||||
//风险区域layer
|
//风险区域layer
|
||||||
riskMaskerLayers() {
|
riskMaskerLayers() {
|
||||||
|
|
@ -1290,6 +1338,16 @@
|
||||||
window.map.addLayer(that.jobDomMarkerLayer);
|
window.map.addLayer(that.jobDomMarkerLayer);
|
||||||
that.showJobDomMarkers();
|
that.showJobDomMarkers();
|
||||||
},
|
},
|
||||||
|
//点击区域显示图层
|
||||||
|
areaMarkerLayers() {
|
||||||
|
let that = this;
|
||||||
|
that.areaMarkerLayer = new jsmap.JSDomMarkerLayer({
|
||||||
|
minimumLevel: 3,
|
||||||
|
maxmumLevel: 22,
|
||||||
|
show: true
|
||||||
|
});
|
||||||
|
window.map.addLayer(that.areaMarkerLayer);
|
||||||
|
},
|
||||||
//员工标记layer
|
//员工标记layer
|
||||||
userMaskerLayers() {//图标文字
|
userMaskerLayers() {//图标文字
|
||||||
let that = this;
|
let that = this;
|
||||||
|
|
@ -1299,6 +1357,7 @@
|
||||||
show: false
|
show: false
|
||||||
});
|
});
|
||||||
window.map.addLayer(that.userMaskerLayer);
|
window.map.addLayer(that.userMaskerLayer);
|
||||||
|
that.getAllMen();
|
||||||
},
|
},
|
||||||
//喇叭layer
|
//喇叭layer
|
||||||
speakersMaskerLayers() {//消防物资
|
speakersMaskerLayers() {//消防物资
|
||||||
|
|
@ -1423,14 +1482,21 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//人员
|
//人员
|
||||||
showUserMarkers() {
|
showUserMarkers(userList) {
|
||||||
|
|
||||||
let that = this;
|
let that = this;
|
||||||
let iconTextMarker = null;
|
let iconTextMarker = null;
|
||||||
if(that.userList.length>0){
|
if (userList.length > 0) {
|
||||||
let employee_ = that.userList[0].my_info.employee_;
|
let lng = [114.62923138539462, 114.6315404372349];//经度
|
||||||
iconTextMarker = new jsmap.JSIconTextMarker({
|
let i = 0;
|
||||||
id: that.userList[0].my_info.code,
|
iconTextMarker = userList[0].mac;
|
||||||
position: {x: 114.6315404372349, y: 38.813557855009435, z: 0}, //坐标
|
let employee_ = userList[0].my_info.employee_;
|
||||||
|
employee_.mac = userList[0].mac;
|
||||||
|
console.log(employee_)
|
||||||
|
debugger;
|
||||||
|
that.userMarker[iconTextMarker] = new jsmap.JSIconTextMarker({
|
||||||
|
id: userList[0].my_info.code,
|
||||||
|
position: {x: 114.62923138539462, y: 38.8133418942645, z: 0}, //坐标
|
||||||
floorId: 1, //楼层id,默认为1(地面)
|
floorId: 1, //楼层id,默认为1(地面)
|
||||||
image: "/img/user.png",
|
image: "/img/user.png",
|
||||||
text: employee_.name,
|
text: employee_.name,
|
||||||
|
|
@ -1450,128 +1516,73 @@
|
||||||
properties: {
|
properties: {
|
||||||
employee: employee_
|
employee: employee_
|
||||||
},
|
},
|
||||||
callback: (marker) => {
|
|
||||||
return employee_
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
that.userMaskerLayer.addMarker(that.userMarker[iconTextMarker]);
|
||||||
that.userMaskerLayer.addMarker(iconTextMarker);
|
setInterval(function () {
|
||||||
setTimeout(function () {
|
i = (i + 1) % 2;
|
||||||
console.log(that.userMaskerLayer);
|
that.userMaskerLayer.updateMarkerPosition(that.userMarker[iconTextMarker], {
|
||||||
that.userMaskerLayer.updateMarkerPosition(iconTextMarker,{
|
floorId: 1,
|
||||||
floorId:1,
|
position: {x: lng[i], y: 38.8133418942642, z: 0},
|
||||||
position: {x:114.62923138539462, y:38.8133418942642, z:0},
|
animate: {duration: 10000,}
|
||||||
animate: true
|
|
||||||
});//动画效果,持续时间一秒
|
});//动画效果,持续时间一秒
|
||||||
},3000);
|
},11000)
|
||||||
setTimeout(function () {
|
|
||||||
console.log(that.userMaskerLayer);
|
|
||||||
that.userMaskerLayer.updateMarkerPosition(iconTextMarker,{
|
|
||||||
floorId:1,
|
|
||||||
position: {x:114.6315404372349, y: 38.813557855009435, z:0},
|
|
||||||
animate: true
|
|
||||||
});//动画效果,持续时间一秒
|
|
||||||
},6000);
|
|
||||||
debugger;
|
|
||||||
/*let employee_1 = that.userList[1].my_info.employee_;
|
|
||||||
iconTextMarker1 = new jsmap.JSIconTextMarker({
|
|
||||||
id: that.userList[1].my_info.code,
|
|
||||||
position: {x: 114.62923138539462, y: 38.8133418942642, z: 0}, //坐标
|
|
||||||
floorId: 1, //楼层id,默认为1(地面)
|
|
||||||
image: "/img/user.png",
|
|
||||||
text: employee_1.name,
|
|
||||||
font: '10px sans-serif',
|
|
||||||
fontColor: '#ffffff',
|
|
||||||
imageHeight: 25,
|
|
||||||
imageWidth: 25,
|
|
||||||
backgroundColor: 'rgba(0,0,0,0.3)',
|
|
||||||
backgroundRadius: 1,
|
|
||||||
backgroundStrokeColor: 'rgba(0,0,0,0.3)',
|
|
||||||
backgroundStrokeWidth: 1,
|
|
||||||
iconTextType: jsmap.JSIconTextType.TOPTEXT_BOTTOMICON,
|
|
||||||
allowPicking: true,
|
|
||||||
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),
|
|
||||||
nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1),
|
|
||||||
show: true,
|
|
||||||
properties: {
|
|
||||||
employee: employee_1
|
|
||||||
},
|
|
||||||
callback: (marker) => {
|
|
||||||
return employee_1
|
|
||||||
}
|
|
||||||
});
|
|
||||||
that.userMaskerLayer.addMarker(iconTextMarker1);
|
|
||||||
setTimeout(function () {
|
|
||||||
that.userMaskerLayer.updateMarkerPosition(jsmap.JSIconTextMarker,{
|
|
||||||
floorId:1,
|
|
||||||
position: {x:114.6315404372349, y:38.813557855009435, z:0},
|
|
||||||
animate: true
|
|
||||||
});//动画效果,持续时间一秒
|
|
||||||
|
|
||||||
},3000)*/
|
|
||||||
}else{
|
|
||||||
}
|
}
|
||||||
/*that.userList.forEach(item => {
|
/*setInterval(function () {
|
||||||
if (item.my_info.code) {
|
that.refreshUserMarker();
|
||||||
let employee_ = item.my_info.employee_;
|
}, 8500)*/
|
||||||
//{114.62923138539462,38.8133418942642}
|
},
|
||||||
iconTextMarker = new jsmap.JSIconTextMarker({
|
//更新人员标记
|
||||||
id: item.my_info.code,
|
refreshUserMarker() {
|
||||||
position: {x: 114.6315404372349, y: 38.813557855009435, z: 0}, //坐标
|
let that = this;
|
||||||
floorId: 1, //楼层id,默认为1(地面)
|
that.$API.third.blt.all.req().then(res => {
|
||||||
image: "/img/user.png",
|
if (res.err_msg) {
|
||||||
text: employee_.name,
|
} else {
|
||||||
font: '10px sans-serif',
|
let userList = res.filter(item => {
|
||||||
fontColor: '#ffffff',
|
return item.my_info.employee
|
||||||
imageHeight: 25,
|
|
||||||
imageWidth: 25,
|
|
||||||
backgroundColor: 'rgba(0,0,0,0.3)',
|
|
||||||
backgroundRadius: 1,
|
|
||||||
backgroundStrokeColor: 'rgba(0,0,0,0.3)',
|
|
||||||
backgroundStrokeWidth: 1,
|
|
||||||
iconTextType: jsmap.JSIconTextType.TOPTEXT_BOTTOMICON,
|
|
||||||
allowPicking: true,
|
|
||||||
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),
|
|
||||||
nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1),
|
|
||||||
show: true,
|
|
||||||
properties: {
|
|
||||||
employee: employee_
|
|
||||||
},
|
|
||||||
callback: (marker) => {
|
|
||||||
return employee_
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
that.userMaskerLayer.addMarker(iconTextMarker);
|
let addUser = that.func(userList, that.userList)[0];
|
||||||
iconTextMarker1 = new jsmap.JSIconTextMarker({
|
let refreshList = that.func(userList, that.userList)[1];
|
||||||
id: item.my_info.code,
|
let subUser = that.func(that.userList, userList)[0];
|
||||||
position: {x: 114.62923138539462, y: 38.8133418942642, z: 0}, //坐标
|
that.userList = refreshList.concat(addUser);//更新userList
|
||||||
floorId: 1, //楼层id,默认为1(地面)
|
that.showUserMarkers(addUser);//增加新进在线员工
|
||||||
image: "/img/user.png",
|
//that.userMaskerLayer.removeMarker(sectorMarker)(addUser);//删除离线员工
|
||||||
text: employee_.name,
|
refreshList.forEach(item => {
|
||||||
font: '10px sans-serif',
|
that.userMaskerLayer.updateMarkerPosition(that.userMarker[item.id], {
|
||||||
fontColor: '#ffffff',
|
floorId: 1,
|
||||||
imageHeight: 25,
|
position: {x: item.longitude, y: item.latitude, z: item.z},
|
||||||
imageWidth: 25,
|
animate: {duration: 1000,}
|
||||||
backgroundColor: 'rgba(0,0,0,0.3)',
|
});//动画效果,持续时间一秒
|
||||||
backgroundRadius: 1,
|
})
|
||||||
backgroundStrokeColor: 'rgba(0,0,0,0.3)',
|
|
||||||
backgroundStrokeWidth: 1,
|
|
||||||
iconTextType: jsmap.JSIconTextType.TOPTEXT_BOTTOMICON,
|
|
||||||
allowPicking: true,
|
|
||||||
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),
|
|
||||||
nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1),
|
|
||||||
show: true,
|
|
||||||
properties: {
|
|
||||||
employee: employee_
|
|
||||||
},
|
|
||||||
callback: (marker) => {
|
|
||||||
return employee_
|
|
||||||
}
|
|
||||||
});
|
|
||||||
that.userMaskerLayer.addMarker(iconTextMarker1);
|
|
||||||
}
|
}
|
||||||
|
})
|
||||||
})*/
|
},
|
||||||
|
//比较两次获取的人数的变动 func(a,b)//a与b相比多出来的
|
||||||
|
func(arr1, arr2) {
|
||||||
|
/*var arr1 = [{name:1},{name:2},{name:3},{name:4}];
|
||||||
|
var arr2 = [{name:2},{name:3},{name:4},{name:5}];*/
|
||||||
|
let arr = [];
|
||||||
|
let list = [];
|
||||||
|
let bool = false;
|
||||||
|
let same = false;
|
||||||
|
for (let i = 0; i < arr1.length; i++) {
|
||||||
|
for (let j = 0; j < arr2.length; j++) {
|
||||||
|
//遇到相同直接跳出循环
|
||||||
|
if (arr1[i].id === arr2[j].id) {
|
||||||
|
same = i;
|
||||||
|
bool = false;
|
||||||
|
break;
|
||||||
|
} else {
|
||||||
|
same = false;
|
||||||
|
bool = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (same !== false) list.push(arr1[same]);
|
||||||
|
if (bool !== false) arr.push(arr1[bool]);
|
||||||
|
}
|
||||||
|
let arrList = [arr,list];
|
||||||
|
debugger;
|
||||||
|
console.log(arrList);
|
||||||
|
return arrList;
|
||||||
},
|
},
|
||||||
//危险作业
|
//危险作业
|
||||||
showPolygonMarkers() {
|
showPolygonMarkers() {
|
||||||
|
|
@ -1599,9 +1610,10 @@
|
||||||
});
|
});
|
||||||
this.polygonMaskerLayer.addMarker(polygonMarker);
|
this.polygonMaskerLayer.addMarker(polygonMarker);
|
||||||
},
|
},
|
||||||
|
//危险作业图片标记
|
||||||
showJobDomMarkers() {
|
showJobDomMarkers() {
|
||||||
let domMarker = new jsmap.JSDomMarker({
|
let domMarker = new jsmap.JSDomMarker({
|
||||||
id: 'polygonmark',
|
id: 'polygonmark',
|
||||||
position: new jsmap.JSPoint(114.63168864138028, 38.81254802029822, 0),
|
position: new jsmap.JSPoint(114.63168864138028, 38.81254802029822, 0),
|
||||||
floorId: 1,
|
floorId: 1,
|
||||||
depthTest: true,
|
depthTest: true,
|
||||||
|
|
@ -1737,17 +1749,7 @@
|
||||||
that.riskMarkerLayer.show = false;
|
that.riskMarkerLayer.show = false;
|
||||||
}
|
}
|
||||||
if (that.markList[6]) {
|
if (that.markList[6]) {
|
||||||
that.$API.third.blt.all.req().then(res => {
|
that.userMaskerLayer.show = true;
|
||||||
if (res.err_msg) {
|
|
||||||
} else {
|
|
||||||
that.userMaskerLayer.show = true;
|
|
||||||
that.userList = res.filter(item=>{
|
|
||||||
return item.my_info.code
|
|
||||||
});
|
|
||||||
// this.showUserMarkers();
|
|
||||||
that.showUserMarkers();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
that.userMaskerLayer.show = false;
|
that.userMaskerLayer.show = false;
|
||||||
}
|
}
|
||||||
|
|
@ -1801,19 +1803,27 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//员工列表点击
|
//员工列表点击
|
||||||
userRowClick(row){
|
userRowClick(row) {
|
||||||
debugger;
|
debugger;
|
||||||
console.log(row);
|
console.log(row);
|
||||||
let that = this;
|
let that = this;
|
||||||
that.screenUserItem.name=row.my_info.employee_.name;
|
that.screenUserItem.name = row.my_info.employee_.name;
|
||||||
that.screenUserItem.type=row.my_info.employee_.type;
|
that.screenUserItem.type = row.my_info.employee_.type;
|
||||||
that.screenUserItem.id=row.my_info.employee_.id;
|
that.screenUserItem.id = row.my_info.employee_.id;
|
||||||
that.screenUserItem.photo=row.my_info.employee_.photo?row.my_info.employee_.photo:'';
|
that.screenUserItem.photo = row.my_info.employee_.photo ? row.my_info.employee_.photo : '';
|
||||||
that.screenUserItem.post_name=row.my_info.employee_.post_name?row.my_info.employee_.post_name:'';
|
that.screenUserItem.post_name = row.my_info.employee_.post_name ? row.my_info.employee_.post_name : '';
|
||||||
that.screenUserItem.belong_dept_name=row.my_info.employee_.belong_dept_name?row.my_info.employee_.belong_dept_name:'';
|
that.screenUserItem.belong_dept_name = row.my_info.employee_.belong_dept_name ? row.my_info.employee_.belong_dept_name : '';
|
||||||
},
|
},
|
||||||
userTrack(){
|
//人员追踪
|
||||||
|
userTrack() {
|
||||||
|
this.tracking = true;
|
||||||
|
window.map.trackMarker(this.userMarker[this.screenUserItem.mac],{
|
||||||
|
range:150
|
||||||
|
})
|
||||||
|
},
|
||||||
|
userUnTrack(){
|
||||||
|
window.map.cancelTrack();
|
||||||
|
this.tracking = false;
|
||||||
},
|
},
|
||||||
//区域/部门切换
|
//区域/部门切换
|
||||||
cockpitChange(index) {
|
cockpitChange(index) {
|
||||||
|
|
@ -2813,6 +2823,7 @@
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
transition: .5s;
|
transition: .5s;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
||||||
.drop-content-item {
|
.drop-content-item {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
||||||
|
|
@ -1,247 +1,335 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="handleForm('add')"
|
@click="handleForm('add')"
|
||||||
></el-button>
|
></el-button>
|
||||||
<!--
|
<!--
|
||||||
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
<el-button type="danger" plain icon="el-icon-delete" :disabled="selection.length==0" @click="batch_del"></el-button>
|
||||||
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<div class="right-panel-search">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="search.keyword"
|
v-model="search.keyword"
|
||||||
placeholder="姓名/手机号"
|
placeholder="姓名/手机号"
|
||||||
clearable
|
clearable
|
||||||
@click="upsearch"
|
@click="upsearch"
|
||||||
></el-input>
|
></el-input>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="upsearch"
|
@click="upsearch"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
ref="table"
|
ref="table"
|
||||||
:apiObj="apiObj"
|
:apiObj="apiObj"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
@selection-change="selectionChange"
|
@selection-change="selectionChange"
|
||||||
stripe
|
stripe
|
||||||
@resetQuery="resetQuery"
|
@resetQuery="resetQuery"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="50"></el-table-column>
|
<el-table-column type="selection" width="50"></el-table-column>
|
||||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||||
<el-table-column label="姓名" prop="name" width="150"></el-table-column>
|
<el-table-column label="姓名" prop="name" width="150"></el-table-column>
|
||||||
<el-table-column label="证件照" prop="photo" width="200">
|
<el-table-column label="证件照" prop="photo" width="200">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="手机号"
|
label="手机号"
|
||||||
prop="phone"
|
prop="phone"
|
||||||
width="120"
|
width="120"
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column label="部门" prop="belong_dept" width="180">
|
<el-table-column label="部门" prop="belong_dept" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.belong_dept_">{{
|
<span v-if="scope.row.belong_dept_">{{scope.row.belong_dept_.name}}</span>
|
||||||
scope.row.belong_dept_.name
|
</template>
|
||||||
}}</span>
|
</el-table-column>
|
||||||
</template>
|
<el-table-column
|
||||||
</el-table-column>
|
label="创建时间"
|
||||||
<el-table-column
|
prop="create_time"
|
||||||
label="创建时间"
|
width="180"
|
||||||
prop="create_time"
|
></el-table-column>
|
||||||
width="180"
|
<el-table-column label="操作" fixed="right" align="left" width="170">
|
||||||
></el-table-column>
|
<template #default="scope">
|
||||||
<el-table-column label="操作" fixed="right" align="left" width="170">
|
<el-button
|
||||||
<template #default="scope">
|
text
|
||||||
<el-button-group>
|
type="primary"
|
||||||
<el-button
|
size="small"
|
||||||
text
|
@click="Addcertificate(scope.row)"
|
||||||
type="primary"
|
>绑定证书
|
||||||
size="small"
|
</el-button>
|
||||||
@click="Addcertificate(scope.row)"
|
<el-button
|
||||||
>绑定证书</el-button
|
text
|
||||||
>
|
type="success"
|
||||||
<el-button
|
size="small"
|
||||||
text
|
@click="handleForm('show', scope.row)"
|
||||||
type="primary"
|
>查看
|
||||||
size="small"
|
</el-button>
|
||||||
@click="handleForm('show', scope.row)"
|
<el-button
|
||||||
>查看</el-button
|
text
|
||||||
>
|
type="warning"
|
||||||
<el-button
|
size="small"
|
||||||
text
|
@click="handleForm('edit', scope.row)"
|
||||||
type="warning"
|
>编辑
|
||||||
size="small"
|
</el-button>
|
||||||
@click="handleForm('edit', scope.row)"
|
<el-button
|
||||||
>编辑</el-button
|
v-if="scope.row.blt_"
|
||||||
>
|
text
|
||||||
<!-- <el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
type="primary"
|
||||||
<template #reference>
|
size="small"
|
||||||
<el-button text type="danger" size="small">删除</el-button>
|
@click="handleBindBlt(20, scope.row)"
|
||||||
</template>
|
>解绑
|
||||||
</el-popconfirm> -->
|
</el-button>
|
||||||
</el-button-group>
|
<el-button
|
||||||
</template>
|
v-else
|
||||||
</el-table-column>
|
text
|
||||||
</scTable>
|
type="primary"
|
||||||
</el-main>
|
size="small"
|
||||||
</el-container>
|
@click="handleBindBlt(10, scope.row)"
|
||||||
<save-dialog
|
>绑定
|
||||||
v-if="dialog.save"
|
</el-button>
|
||||||
ref="saveDialog"
|
</template>
|
||||||
@success="handleSaveSuccess"
|
</el-table-column>
|
||||||
@closed="dialog.save = false"
|
</scTable>
|
||||||
></save-dialog>
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
<save-dialog
|
||||||
|
v-if="dialog.save"
|
||||||
|
ref="saveDialog"
|
||||||
|
@success="handleSaveSuccess"
|
||||||
|
@closed="dialog.save = false"
|
||||||
|
></save-dialog>
|
||||||
|
<el-Dialog
|
||||||
|
title="绑定定位卡"
|
||||||
|
v-model="showBindBlt"
|
||||||
|
destroy-on-close
|
||||||
|
@closed="closeDrawer"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="dialogForm"
|
||||||
|
:model="form"
|
||||||
|
label-width="120px"
|
||||||
|
>
|
||||||
|
<el-form-item label="姓名">
|
||||||
|
{{bindBltName}}
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="绑定卡号">
|
||||||
|
<el-select v-model="form.blt" style="width: 100%" :disabled="dis">
|
||||||
|
<el-option
|
||||||
|
v-for="item in bltList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.id"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button v-if="form.type===10" type="primary" @click="submitBindBlt">绑定</el-button>
|
||||||
|
<el-button v-if="form.type===20" type="primary" @click="submitBindBlt">解绑</el-button>
|
||||||
|
<el-button @click="showBindBlt = false">取消</el-button>
|
||||||
|
</template>
|
||||||
|
</el-Dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./ep_form.vue";
|
import saveDialog from "./ep_form.vue";
|
||||||
export default {
|
|
||||||
name: "employee",
|
|
||||||
components: {
|
|
||||||
saveDialog,
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
dialog: {
|
|
||||||
save: false,
|
|
||||||
permission: false,
|
|
||||||
},
|
|
||||||
apiObj: this.$API.hrm.employee.list,
|
|
||||||
query: {},
|
|
||||||
selection: [],
|
|
||||||
search: {
|
|
||||||
keyword: null,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
//人员证书添加
|
|
||||||
Addcertificate(row) {
|
|
||||||
this.$router.push({
|
|
||||||
name: "certificate",
|
|
||||||
query: {
|
|
||||||
id: row.id,
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//添加
|
|
||||||
handleForm(type, row) {
|
|
||||||
this.dialog.save = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
if (type === "add") {
|
|
||||||
this.$refs.saveDialog.open(type);
|
|
||||||
} else {
|
|
||||||
this.$refs.saveDialog.open(type).setData(row);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
/*//添加
|
export default {
|
||||||
add(){
|
name: "employee",
|
||||||
this.dialog.save = true
|
components: {
|
||||||
|
saveDialog,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialog: {
|
||||||
|
save: false,
|
||||||
|
permission: false,
|
||||||
|
},
|
||||||
|
apiObj: this.$API.hrm.employee.list,
|
||||||
|
query: {},
|
||||||
|
tdevice: [],
|
||||||
|
selection: [],
|
||||||
|
search: {
|
||||||
|
keyword: null,
|
||||||
|
},
|
||||||
|
dis: false,
|
||||||
|
showBindBlt: false,
|
||||||
|
bltList: [],
|
||||||
|
bindBltName: '',
|
||||||
|
form: {
|
||||||
|
type: 10,
|
||||||
|
blt: '',
|
||||||
|
employee: '',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getBltList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//人员证书添加
|
||||||
|
Addcertificate(row) {
|
||||||
|
this.$router.push({
|
||||||
|
name: "certificate",
|
||||||
|
query: {
|
||||||
|
id: row.id,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//添加
|
||||||
|
handleForm(type, row) {
|
||||||
|
this.dialog.save = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.saveDialog.open('add')
|
if (type === "add") {
|
||||||
|
this.$refs.saveDialog.open(type);
|
||||||
|
} else {
|
||||||
|
this.$refs.saveDialog.open(type).setData(row);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/*//添加
|
||||||
|
add(){
|
||||||
|
this.dialog.save = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open('add')
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//编辑
|
||||||
|
table_edit(row){
|
||||||
|
this.dialog.save = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open('edit').setData(row)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//查看
|
||||||
|
table_show(row){
|
||||||
|
this.dialog.save = true
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.saveDialog.open('show').setData(row)
|
||||||
|
})
|
||||||
|
},*/
|
||||||
|
//权限设置
|
||||||
|
permission() {
|
||||||
|
this.dialog.permission = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.permissionDialog.open();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//删除
|
||||||
|
async table_del(row) {
|
||||||
|
await this.$API.hrm.employee.create.req(row.id).then((res) => {
|
||||||
|
if (res.err_msg) {
|
||||||
|
this.$message.error(res.err_msg);
|
||||||
|
} else {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
this.$message.success("删除成功");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//批量删除
|
||||||
|
async batch_del() {
|
||||||
|
this.$confirm(
|
||||||
|
`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`,
|
||||||
|
"提示",
|
||||||
|
{
|
||||||
|
type: "warning",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
|
const loading = this.$loading();
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
loading.close();
|
||||||
|
this.$message.success("操作成功");
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//表格选择后回调事件
|
||||||
|
selectionChange(selection) {
|
||||||
|
this.selection = selection;
|
||||||
|
},
|
||||||
|
//表格内开关
|
||||||
|
changeSwitch(val, row) {
|
||||||
|
row.status = row.status == "1" ? "0" : "1";
|
||||||
|
row.$switch_status = true;
|
||||||
|
setTimeout(() => {
|
||||||
|
delete row.$switch_status;
|
||||||
|
row.status = val;
|
||||||
|
this.$message.success("操作成功");
|
||||||
|
}, 500);
|
||||||
|
},
|
||||||
|
//搜索
|
||||||
|
upsearch() {
|
||||||
|
},
|
||||||
|
//根据ID获取树结构
|
||||||
|
filterTree(id) {
|
||||||
|
var target = null;
|
||||||
|
|
||||||
|
function filter(tree) {
|
||||||
|
tree.forEach((item) => {
|
||||||
|
if (item.id == id) {
|
||||||
|
target = item;
|
||||||
|
}
|
||||||
|
if (item.children) {
|
||||||
|
filter(item.children);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
filter(this.$refs.table.tableData);
|
||||||
|
return target;
|
||||||
|
},
|
||||||
|
//本地更新数据
|
||||||
|
handleSaveSuccess(data, mode) {
|
||||||
|
if (mode == "add") {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
} else if (mode == "edit") {
|
||||||
|
this.$refs.table.refresh();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
resetQuery() {
|
||||||
|
this.query = {};
|
||||||
|
},
|
||||||
|
getBltList() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.third.tdevice.list.req({type: 30, page: 0}).then(res => {
|
||||||
|
that.tdevice = res;
|
||||||
|
that.bltList = res.filter(item => {
|
||||||
|
return item.employee_ === null
|
||||||
|
})
|
||||||
|
;
|
||||||
|
console.log(res);
|
||||||
|
console.log(that.bltList);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//编辑
|
handleBindBlt(type, row) {
|
||||||
table_edit(row){
|
this.dis = false;
|
||||||
this.dialog.save = true
|
this.bindBltName = row.name;
|
||||||
this.$nextTick(() => {
|
this.form.type = type;
|
||||||
this.$refs.saveDialog.open('edit').setData(row)
|
this.form.employee = row.id;
|
||||||
|
if(type===20){
|
||||||
|
this.dis = true;
|
||||||
|
this.form.blt = row.blt_.id;
|
||||||
|
}
|
||||||
|
this.showBindBlt = true;
|
||||||
|
},
|
||||||
|
submitBindBlt() {
|
||||||
|
let that = this;
|
||||||
|
that.$API.third.tdevice.bltBind.req(this.form).then(res => {
|
||||||
|
if(res.err_msg){}else{
|
||||||
|
that.showBindBlt = false;
|
||||||
|
that.$refs.table.refresh();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
//查看
|
},
|
||||||
table_show(row){
|
};
|
||||||
this.dialog.save = true
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.saveDialog.open('show').setData(row)
|
|
||||||
})
|
|
||||||
},*/
|
|
||||||
//权限设置
|
|
||||||
permission() {
|
|
||||||
this.dialog.permission = true;
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.$refs.permissionDialog.open();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//删除
|
|
||||||
async table_del(row) {
|
|
||||||
await this.$API.hrm.employee.create.req(row.id).then((res) => {
|
|
||||||
if (res.err_msg) {
|
|
||||||
this.$message.error(res.err_msg);
|
|
||||||
} else {
|
|
||||||
this.$refs.table.refresh();
|
|
||||||
this.$message.success("删除成功");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//批量删除
|
|
||||||
async batch_del() {
|
|
||||||
this.$confirm(
|
|
||||||
`确定删除选中的 ${this.selection.length} 项吗?如果删除项中含有子集将会被一并删除`,
|
|
||||||
"提示",
|
|
||||||
{
|
|
||||||
type: "warning",
|
|
||||||
}
|
|
||||||
)
|
|
||||||
.then(() => {
|
|
||||||
const loading = this.$loading();
|
|
||||||
this.$refs.table.refresh();
|
|
||||||
loading.close();
|
|
||||||
this.$message.success("操作成功");
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
},
|
|
||||||
//表格选择后回调事件
|
|
||||||
selectionChange(selection) {
|
|
||||||
this.selection = selection;
|
|
||||||
},
|
|
||||||
//表格内开关
|
|
||||||
changeSwitch(val, row) {
|
|
||||||
row.status = row.status == "1" ? "0" : "1";
|
|
||||||
row.$switch_status = true;
|
|
||||||
setTimeout(() => {
|
|
||||||
delete row.$switch_status;
|
|
||||||
row.status = val;
|
|
||||||
this.$message.success("操作成功");
|
|
||||||
}, 500);
|
|
||||||
},
|
|
||||||
//搜索
|
|
||||||
upsearch() {},
|
|
||||||
//根据ID获取树结构
|
|
||||||
filterTree(id) {
|
|
||||||
var target = null;
|
|
||||||
function filter(tree) {
|
|
||||||
tree.forEach((item) => {
|
|
||||||
if (item.id == id) {
|
|
||||||
target = item;
|
|
||||||
}
|
|
||||||
if (item.children) {
|
|
||||||
filter(item.children);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
filter(this.$refs.table.tableData);
|
|
||||||
return target;
|
|
||||||
},
|
|
||||||
//本地更新数据
|
|
||||||
handleSaveSuccess(data, mode) {
|
|
||||||
if (mode == "add") {
|
|
||||||
this.$refs.table.refresh();
|
|
||||||
} else if (mode == "edit") {
|
|
||||||
this.$refs.table.refresh();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
resetQuery() {
|
|
||||||
this.query = {};
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
<el-descriptions :column="1" border size="small">
|
<el-descriptions :column="1" border size="small">
|
||||||
<el-descriptions-item label="请求接口">{{data.path}}</el-descriptions-item>
|
<el-descriptions-item label="请求接口">{{data.path}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="请求方法">{{data.method}}</el-descriptions-item>
|
<el-descriptions-item label="请求方法">{{data.method}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="状态代码">{{data.status_code}}</el-descriptions-item>
|
<el-descriptions-item v-if="data.target" label="target">{{data.target}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item v-if="data.result" label="状态代码">{{data.result}}</el-descriptions-item>
|
||||||
|
<el-descriptions-item v-if="data.status_code" label="状态代码">{{data.status_code}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="日志id">{{data.id}}</el-descriptions-item>
|
<el-descriptions-item label="日志id">{{data.id}}</el-descriptions-item>
|
||||||
<el-descriptions-item label="日志时间">{{data.requested_at}}</el-descriptions-item>
|
<el-descriptions-item label="日志时间">{{data.requested_at}}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
@ -32,15 +34,17 @@
|
||||||
methods: {
|
methods: {
|
||||||
setData(data){
|
setData(data){
|
||||||
this.data = data;
|
this.data = data;
|
||||||
// debugger;
|
|
||||||
console.log(data);
|
|
||||||
let dataStr = '';
|
let dataStr = '';
|
||||||
for (let i in data) {
|
for (let i in data) {
|
||||||
let X = i + ':' + data[i]+'<br>';
|
let X='';
|
||||||
|
if(typeof data[i] ==='object'){
|
||||||
|
let temp =JSON.stringify(data[i]);
|
||||||
|
X ='<span style="color: #43e669;margin-right: 6px;">'+i+'</span>'+ ':' + temp+'<br>';
|
||||||
|
}else{
|
||||||
|
X ='<span style="color: #43e669;margin-right: 6px;">'+i+'</span>'+ ':' + data[i]+'<br>';
|
||||||
|
}
|
||||||
dataStr += X;
|
dataStr += X;
|
||||||
console.log(i);
|
|
||||||
}
|
}
|
||||||
console.log(dataStr);
|
|
||||||
this.dataStr = dataStr;
|
this.dataStr = dataStr;
|
||||||
document.getElementById("logDetail").innerHTML = dataStr;
|
document.getElementById("logDetail").innerHTML = dataStr;
|
||||||
}
|
}
|
||||||
|
|
@ -50,7 +54,7 @@
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.code {
|
.code {
|
||||||
background: #848484;
|
background: #0F0F0F;
|
||||||
padding:15px;
|
padding:15px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
|
||||||
|
|
@ -11,16 +11,25 @@
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe highlightCurrentRow @row-click="rowClick">
|
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe highlightCurrentRow @row-click="rowClick">
|
||||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||||
<el-table-column label="id" prop="id" min-width="250"></el-table-column>
|
<el-table-column label="method" prop="method" min-width="80"></el-table-column>
|
||||||
|
<el-table-column label="id" prop="id" min-width="200"></el-table-column>
|
||||||
<el-table-column label="路径" prop="path" min-width="150"></el-table-column>
|
<el-table-column label="路径" prop="path" min-width="150"></el-table-column>
|
||||||
<el-table-column label="view" prop="view" min-width="150"></el-table-column>
|
<el-table-column label="view" prop="view" min-width="150"></el-table-column>
|
||||||
<el-table-column label="method" prop="method" min-width="150"></el-table-column>
|
|
||||||
|
<el-table-column label="状态码" prop="status_code" min-width="80">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag class="ml-2" type="success" v-if="scope.row.status_code>=200&&scope.row.status_code<300">{{scope.row.status_code}}</el-tag>
|
||||||
|
<el-tag class="ml-2" type="warning" v-if="scope.row.status_code>=400&&scope.row.status_code<500">{{scope.row.status_code}}</el-tag>
|
||||||
|
<el-tag class="ml-2" type="danger" v-if="scope.row.status_code>=500">{{scope.row.status_code}}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作时间" prop="requested_at" min-width="150"></el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="100">
|
<el-table-column label="操作" align="center" width="100">
|
||||||
<el-button type="text" size="small">查看详情</el-button>
|
<el-button type="text" size="small">查看详情</el-button>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
</el-main>
|
</el-main>
|
||||||
<el-drawer v-model="infoDrawer" title="日志详情" :size="600" destroy-on-close>
|
<el-drawer v-model="infoDrawer" title="日志详情" :size="'50%'" destroy-on-close>
|
||||||
<logInfo ref="logInfo"></logInfo>
|
<logInfo ref="logInfo"></logInfo>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,72 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
|
<div class="right-panel-search">
|
||||||
|
<el-input v-model="search.id" placeholder="logId" clearable></el-input>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="getSearch"></el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe highlightCurrentRow @row-click="rowClick">
|
||||||
|
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||||
|
<el-table-column label="method" prop="method" min-width="80"></el-table-column>
|
||||||
|
<el-table-column label="id" prop="id" min-width="200"></el-table-column>
|
||||||
|
<el-table-column label="路径" prop="path" min-width="150"></el-table-column>
|
||||||
|
<el-table-column label="target" prop="target" min-width="80"></el-table-column>
|
||||||
|
<el-table-column label="状态" prop="status_code" min-width="80">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag class="ml-2" type="success" v-if="scope.row.result==='success'">成功</el-tag>
|
||||||
|
<el-tag class="ml-2" type="warning" v-if="scope.row.result==='fail'">报错</el-tag>
|
||||||
|
<el-tag class="ml-2" type="danger" v-if="scope.row.result==='error'">失败</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作时间" prop="requested_at" min-width="150"></el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" width="100">
|
||||||
|
<el-button type="text" size="small">查看详情</el-button>
|
||||||
|
</el-table-column>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
<el-drawer v-model="infoDrawer" title="日志详情" :size="'50%'" destroy-on-close>
|
||||||
|
<logInfo ref="logInfo"></logInfo>
|
||||||
|
</el-drawer>
|
||||||
|
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import logInfo from './logInfo'
|
||||||
|
export default {
|
||||||
|
name: 'thirdLogs',
|
||||||
|
components: {
|
||||||
|
logInfo
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
apiObj: this.$API.third.thirdLog,
|
||||||
|
search:{
|
||||||
|
id:null,
|
||||||
|
},
|
||||||
|
logLists:[],
|
||||||
|
infoDrawer:false,
|
||||||
|
logDetailVisible:false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getSearch(){
|
||||||
|
this.$refs.table.reload(this.search);
|
||||||
|
},
|
||||||
|
rowClick(row){
|
||||||
|
this.infoDrawer = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.logInfo.setData(row)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.treeMain {height:280px;overflow: auto;border: 1px solid #dcdfe6;margin-bottom: 10px;}
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue