diff --git a/.env.development b/.env.development index 6b5bb543..71f440e3 100644 --- a/.env.development +++ b/.env.development @@ -5,10 +5,10 @@ NODE_ENV = development VUE_APP_TITLE = '曲阳金隅安全智能管控平台' # 接口地址 -# VUE_APP_API_BASEURL = http://1.203.161.103:2800/api -VUE_APP_WS_API = 'ws://localhost:8000' -VUE_APP_API_BASEURL = http://127.0.0.1:8000/api -VUE_APP_BASEURL = http://127.0.0.1:8000 +VUE_APP_API_BASEURL = http://1.203.161.103:2800/api +#VUE_APP_WS_API = 'ws://localhost:8000' +#VUE_APP_API_BASEURL = http://127.0.0.1:8000/api +#VUE_APP_BASEURL = http://127.0.0.1:8000 # 本地端口 VUE_APP_PORT = 2800 diff --git a/public/img/avatar.jpg b/public/img/avatar.jpg deleted file mode 100644 index b8a3cf3c..00000000 Binary files a/public/img/avatar.jpg and /dev/null differ diff --git a/public/img/avatar2.gif b/public/img/avatar2.gif deleted file mode 100644 index 6fade970..00000000 Binary files a/public/img/avatar2.gif and /dev/null differ diff --git a/public/img/avatar3.gif b/public/img/avatar3.gif deleted file mode 100644 index 495fe433..00000000 Binary files a/public/img/avatar3.gif and /dev/null differ diff --git a/public/img/employee.png b/public/img/employee.png new file mode 100644 index 00000000..a5fc9962 Binary files /dev/null and b/public/img/employee.png differ diff --git a/public/img/remployee.png b/public/img/remployee.png new file mode 100644 index 00000000..b2db5570 Binary files /dev/null and b/public/img/remployee.png differ diff --git a/public/img/visitor.png b/public/img/visitor.png new file mode 100644 index 00000000..8f4474c3 Binary files /dev/null and b/public/img/visitor.png differ diff --git a/src/utils/tool.js b/src/utils/tool.js index d8672e85..c59ff134 100644 --- a/src/utils/tool.js +++ b/src/utils/tool.js @@ -156,12 +156,11 @@ tool.dateFormat = function (date, fmt='yyyy-MM-dd hh:mm:ss') { "s+" : date.getSeconds(), //秒 "q+" : Math.floor((date.getMonth()+3)/3), //季度 "S" : date.getMilliseconds(), //毫秒 - "W" : date.getDay(), //毫秒 }; - var weeks = new Array("星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"); + var weeks = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]; if(fmt==='week'){ - fmt =weeks[o.w]; + fmt =weeks[date.getDay()]; }else{ if(/(y+)/.test(fmt)) { fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length)); diff --git a/src/views/am/area.vue b/src/views/am/area.vue index 4e79dd17..37cd8bfe 100644 --- a/src/views/am/area.vue +++ b/src/views/am/area.vue @@ -273,6 +273,7 @@ ref="saveRailDialog" :areaId="areaId" :areaName="areaName" + :areaPoints="areaPoints" @success="handleSaveSuccess" @closed="dialog.saveRail = false" > @@ -324,6 +325,7 @@ export default { query2: {}, areaId: null, areaName: "", + areaPoints:[], cate_: { post: "岗位", org: "单位", people: "人员" }, }; }, @@ -363,6 +365,13 @@ export default { }, //围栏,添加 handleRail(row) { + debugger; + // console.log(row.third_info.xx_rail.detail.polygon.points); + if(row.third_info.xx_rail){ + this.areaPoints = row.third_info.xx_rail.detail.polygon.points; + }else{ + + } this.areaId = row.id; this.areaName = row.name; this.dialog.saveRail = true; diff --git a/src/views/am/area_rail_form.vue b/src/views/am/area_rail_form.vue index 7c25c0d2..6be8e1f6 100644 --- a/src/views/am/area_rail_form.vue +++ b/src/views/am/area_rail_form.vue @@ -48,6 +48,9 @@ }, areaName: { type: String, + }, + areaPoints:{ + type:Array, } }, data() { @@ -68,7 +71,7 @@ points:[], }; }, - mounted() { + mounted() { this.$nextTick(()=>{ this.loadMap(); }) @@ -135,8 +138,44 @@ locateCallback: (feature) => { // console.log('locate..', feature); } + }); + window.map.addControl(drawTool2); + //当电子围栏有数据时 + if(that.areaPoints.length>2){ + let areaPoints = []; + let point =null; + that.areaPoints.forEach(item=>{ + debugger; + + let obj = {lng:345,lat:268} + console.log(obj) + let tool = new jsmap.JSMapCoordTool(window.map); + let pixel = tool.screenToMapCoordinate(obj); + debugger; + console.log(pixel) + debugger; + point = new jsmap.JSPoint(item.x,item.y,0); + areaPoints.push(point) + }) + let polygonMarker = new jsmap.JSPolygonMarker({ + id: that.areaId,//id + position: that.areaPoints,//坐标集合 + floorId: 1,//楼层id + color: 'rgba(0,0,255,.44)',//填充颜色 + strokeColor: 'rgba(0,0,255,.44)',//边线颜色 + depthTest: false,//是否开启深度检测 + // material: new jsmap.JSWaterMaterial(), //材质,材质属性一旦设置,color属性就会失效 + allowPicking: true, //是否允许点击 + displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), //可见范围 + properties: { + test: 'polygonTest' + },//属性设置 + callback: (marker) => { + // console.log(marker); + }//回调 }); - window.map.addControl(drawTool2); + window.map.addMarker(polygonMarker); + } }); }, closeDrawer() { diff --git a/src/views/bigScreen/index.vue b/src/views/bigScreen/index.vue index fd9a27cd..3b5acdc5 100644 --- a/src/views/bigScreen/index.vue +++ b/src/views/bigScreen/index.vue @@ -6,8 +6,8 @@