diff --git a/src/api/model/am.js b/src/api/model/am.js index 69b0afe8..ff61994c 100644 --- a/src/api/model/am.js +++ b/src/api/model/am.js @@ -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}/` ); diff --git a/src/config/index.js b/src/config/index.js index fa6d4e4b..93532209 100644 --- a/src/config/index.js +++ b/src/config/index.js @@ -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", diff --git a/src/views/bigScreen/index.vue b/src/views/bigScreen/index.vue index 420e2778..b22c22d9 100644 --- a/src/views/bigScreen/index.vue +++ b/src/views/bigScreen/index.vue @@ -98,7 +98,7 @@
有卡 - 在厂 + 在线
@@ -136,7 +136,7 @@
司机
- {{ userCount.count_remployee }} {{ userCount.count_driver }} 
@@ -175,7 +175,8 @@
-
+ +
全部 @@ -656,13 +657,13 @@
风险区域名称:重大风险区域 + class="risk-item-info">{{areaItemDetail.name}}
风险等级:重大风险 + class="risk-item-info">{{levelOption[areaItemDetail.level]}}
-
创建人:李英
+
区域编号:{{areaItemDetail.number}}
详细信息
@@ -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); }) }, @@ -1480,8 +1502,7 @@ export default { if (userList.length > 0) { userList.forEach(item=>{ let employee_ = item.my_info.employee_; - employee_.mac = item.mac; - console.log(item.my_info.employee_.type) + employee_.mac = item.mac; 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; diff --git a/src/views/rpm/rparty_form.vue b/src/views/rpm/rparty_form.vue index 8ec58e46..5c86ac91 100644 --- a/src/views/rpm/rparty_form.vue +++ b/src/views/rpm/rparty_form.vue @@ -68,6 +68,7 @@ expandTrigger: 'hover', // 次级菜单的展开方式 label: 'label', // value: 'value', // + checkStrictly: true, emitPath: false, // 在选中节点改变时,是否返回由该节点所在的各级菜单的值所组成的数组,若设置 false,则只返回该节点的值 }" clearable