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: { item: {
name: "获取某个区域详情", name: "获取某个区域详情",
req: async function(data){ req: async function(id){
return await http.get( return await http.get(
`${config.API_URL}/am/area/${id}/` `${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, 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 //TokenName
TOKEN_NAME: "Authorization", TOKEN_NAME: "Authorization",

View File

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

View File

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