This commit is contained in:
shijing 2022-09-08 10:50:50 +07:00
parent 56154669b9
commit 2daa22557b
4 changed files with 62 additions and 28 deletions

View File

@ -15,7 +15,7 @@ export default {
},
item: {
name: "获取某个区域详情",
req: async function(data){
req: async function(id){
return await http.get(
`${config.API_URL}/am/area/${id}/`
);

View File

@ -15,7 +15,7 @@ const DEFAULT_CONFIG = {
API_URL: process.env.NODE_ENV === 'development' && process.env.VUE_APP_PROXY === 'false' ? "/api" : process.env.VUE_APP_API_BASEURL,
//请求超时
TIMEOUT: 20000,
TIMEOUT: 200000,
//TokenName
TOKEN_NAME: "Authorization",

View File

@ -98,7 +98,7 @@
<div class="countTypeWrap">
<span :class="{ 'activeCount': countIndex === '1' }" @click="countINdexChange('1')">有卡</span>
<el-divider direction="vertical"></el-divider>
<span :class="{ 'activeCount': countIndex === '2' }" @click="countINdexChange('2')"></span>
<span :class="{ 'activeCount': countIndex === '2' }" @click="countINdexChange('2')">线</span>
</div>
</div>
<div class="count-list">
@ -136,7 +136,7 @@
<div class="item-info">
<div title="司机" class="normal">司机</div>
<div class="bottom">
<span class="large">{{ userCount.count_remployee }}</span>&nbsp;<span
<span class="large">{{ userCount.count_driver }}</span>&nbsp;<span
class="normal"></span>
</div>
</div>
@ -175,7 +175,8 @@
<div class="detail-content">
<div class="content-head">
<div class="screen-multiple-select head-select">
<div class="multiple-select-tags" @click="warningTypeShow = true">
<!-- <div class="multiple-select-tags" @click="warningTypeShow = true"> -->
<div class="multiple-select-tags" @click="warningTypeChange">
<span class="multiple-select-input">全部</span>
<el-icon color="#ffffff" class="no-inherit">
<ArrowDownBold />
@ -656,13 +657,13 @@
<div class="risk-content">
<div class="risk-basic">
<div class="risk-item"><span class="risk-item-name">风险区域名称</span><span
class="risk-item-info">重大风险区域</span>
class="risk-item-info">{{areaItemDetail.name}}</span>
</div>
<div class="risk-item"><span class="risk-item-name">风险等级</span><span
class="risk-item-info">重大风险</span>
class="risk-item-info">{{levelOption[areaItemDetail.level]}}</span>
</div>
<div class="risk-item"><span class="risk-item-name">创建人</span><span
class="risk-item-info">李英</span></div>
<div class="risk-item"><span class="risk-item-name">区域编号</span><span
class="risk-item-info">{{areaItemDetail.number}}</span></div>
</div>
<div class="simple-title">
<div>详细信息</div>
@ -796,6 +797,7 @@ export default {
is_handled: false,
completed: true
},
areaItemDetail:{},
wStatistics: {},
warningTypes: [],//
Vchannels: [],//
@ -814,7 +816,6 @@ export default {
count_remployee: 0,//访
count_visitor: 0//
},
screenJobItem: {},//
screenRiskItem: {},//
screenWarningItem: {},//
@ -855,6 +856,12 @@ export default {
currentTime: '',
currentWeek: '',
areaTableHeight: null,
levelOption:{
10:'低风险',
20:'一般风险',
30:'较大风险',
40:'重大风险'
},
}
},
created() {
@ -936,13 +943,19 @@ export default {
let that = this;
let type = event.nodeType.toString();
console.log(type === 'Symbol(icontextmaker)');
// debugger;
// console.log(item)
if (item.markers.length > 0) {
if (type === 'Symbol(boxmarker)') {
this.screenJob = false;
this.screenWarning = false;
this.screenRisk = true;
let areaId = item.properties.get("areaId");
console.log(areaId);
debugger;
that.$API.am.area.item.req(areaId).then(res=>{
debugger;
console.log(res);
that.areaItemDetail = res;
that.screenJob = false;
that.screenWarning = false;
that.screenRisk = true;
})
//
} else if (type === 'Symbol(icontextmaker)') {
//
@ -1021,7 +1034,6 @@ export default {
})
}
}
} else if (type === 'Symbol(polygonmarker)') {
//
this.screenRisk = false;
@ -1079,6 +1091,9 @@ export default {
}
})
},
warningTypeChange(){
this.warningTypeShow = !this.warningTypeShow
},
//
areaRowClick(data) {
let that = this;
@ -1206,13 +1221,13 @@ export default {
this.warningData.list = res.results.filter(item => {
return item.handle_user === null;
});
this.warningData.total = this.warningData.list.length;
this.warningData.total = res.count;
}
})
},
//
warningTypeSelected(id) {
// debugger;
debugger;
let that = this;
this.warningTypeShow = false;
let params = new Object();
@ -1220,9 +1235,12 @@ export default {
if (id !== null) {
params.cates = id;
}
debugger;
console.log(params);
that.$API.ecm.event.list.req(params).then(res => {
if (res.err_msg) { } else {
that.warningData.list = res;
that.warningData.list = res.results;
that.warningData.total = res.count;
}
})
//
@ -1363,6 +1381,7 @@ export default {
obj.z = 0;
return obj
});
let areaId = item.id;
let maskColor = '',strokeColor='';
if(item.level===10){
maskColor = 'rgba(0,0,255,.3)';//
@ -1388,7 +1407,9 @@ export default {
show: true, //
allowPicking: true, //
displayCondition: new jsmap.JSDisplayCondition(0.0, 1000),//
properties: {
areaId: areaId
},
});
// debugger;
console.log(that.riskMarkerLayer);
@ -1445,6 +1466,7 @@ export default {
console.log(item)
let materialMarker = null;
let pixel = item.my_info.location;
console.log(pixel)
materialMarker = new jsmap.JSIconTextMarker({
id: item.id,
position: {x: pixel.x, y: pixel.y, z: pixel.z}, //
@ -1467,7 +1489,7 @@ export default {
nearFarScale: new jsmap.JSNearFarScale(0.0, 1, 500, 1),
show: true
});
this.materialsMaskerLayer.addMarker(materialMarker);
that.materialsMaskerLayer.addMarker(materialMarker);
})
},
@ -1481,7 +1503,6 @@ export default {
userList.forEach(item=>{
let employee_ = item.my_info.employee_;
employee_.mac = item.mac;
console.log(item.my_info.employee_.type)
let employeeType = item.my_info.employee_.type
if (employeeType === 'employee') {
userImage = "/img/employee.png"
@ -1493,13 +1514,10 @@ export default {
userImage = "/img/visitor.png"
}
debugger;
console.log(item.longitude);
console.log(item.latitude);
let x=item.longitude;
let y=item.latitude;
console.log(item)
that.userMarker[item.mac] = new jsmap.JSIconTextMarker({
id: item.my_info.code,
position: { x: x, y: y, z: 0 }, //
position: { x:1694, y: 257399, z: item.z }, //
floorId: 1, //id,1
image: userImage,
text: employee_.name,
@ -1520,7 +1538,10 @@ export default {
employee: employee_
},
});
debugger;
console.log(that.userMarker)
that.userMaskerLayer.addMarker(that.userMarker[item.mac]);
// window.map.flyToPosition(new jsmap.JSPoint(item.x, item.latitude, 0), { duration: 1000 });
})
// setInterval(function () {
@ -1652,6 +1673,7 @@ export default {
this.mapPause();
}
},
//
mapRun() {
if (this.flyManager !== null) {
@ -1668,15 +1690,18 @@ export default {
}
},
//
mapPause() {
// this.flyManager.destroy();
this.flyManager.pauseFly();
},
//
filterCtrlFocusChange() {
this.filterCtrlFocus = !this.filterCtrlFocus
},
//maker
markerClick(index) {
let arr = [];
@ -1734,6 +1759,7 @@ export default {
that.userMaskerLayer.show = false;
}
},
//
getVchannels() {
let that = this;
@ -1747,6 +1773,7 @@ export default {
}
});
},
//
getSpeakers() {
let that = this;
@ -1759,6 +1786,7 @@ export default {
}
});
},
//
warningItemShow(item) {
this.screenJob = false;
@ -1770,18 +1798,22 @@ export default {
this.screenWarning = true;
});
},
//
closeScreenJob() {
this.screenJob = false;
},
//
closeScreenRisk() {
this.screenRisk = false;
},
//
closeScreenWarning() {
this.screenWarning = false;
},
//
handleWarning() {
let that = this;
@ -1795,6 +1827,7 @@ export default {
}
})
},
//
userRowClick(row) {
// debugger;

View File

@ -68,6 +68,7 @@
expandTrigger: 'hover', //
label: 'label', //
value: 'value', //
checkStrictly: true,
emitPath: false, // false
}"
clearable