diff --git a/src/config/index.js b/src/config/index.js index 52cfedd8..fa6d4e4b 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: 10000, + TIMEOUT: 20000, //TokenName TOKEN_NAME: "Authorization", diff --git a/src/views/am/area.vue b/src/views/am/area.vue index 37cd8bfe..ccb0b06c 100644 --- a/src/views/am/area.vue +++ b/src/views/am/area.vue @@ -18,7 +18,6 @@ v-model="search.keyword" placeholder="编号/名称" clearable - @click="handleQuery" > { - this.loadMap(); + let that =this; + that.$nextTick(() => { + that.coordinates.railName = that.areaName; + that.loadMap(); }) }, methods: { @@ -107,6 +109,7 @@ export default { // this.coordinates.floorId = feature.properties.floorId; that.points = feature.geometry.coordinates[0]; }, + //移除相应面的回调,返回相应面信息 removeCallback: (feature) => { // console.log('remove', feature); @@ -121,6 +124,14 @@ export default { } }); window.map.addControl(drawTool2); + let compassControl = new jsmap.JSCompassControl({ + position: jsmap.JSControlPosition.LEFT_TOP, + offset: { + x: 50, + y: 50 + } + }); + window.map.addControl(compassControl); if (that.areaPoints.length > 2) { that.areaMarkerLayers(); } diff --git a/src/views/am/vchannel_view.vue b/src/views/am/vchannel_view.vue index fd5fa9af..3e1c7681 100644 --- a/src/views/am/vchannel_view.vue +++ b/src/views/am/vchannel_view.vue @@ -179,14 +179,7 @@ export default { this.$emit('closed'); }, getArea() { - this.$API.am.area.list.req().then(res => { - debugger; - if (res.err_msg) { - this.message.error(res.err_msg) - } else { - this.areasList = res.results; - } - }) + this.areasList = that.$TOOL.data.get('qyjyAreaList'); }, //表单提交方法 submit() { diff --git a/src/views/bigScreen/index.vue b/src/views/bigScreen/index.vue index 222a33e2..386e9b6a 100644 --- a/src/views/bigScreen/index.vue +++ b/src/views/bigScreen/index.vue @@ -2,7 +2,7 @@
-
曲阳金隅智慧安全
+
曲阳金隅智能安全管控系统
{{ currentDay }} @@ -926,6 +926,8 @@ 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; @@ -1148,13 +1150,8 @@ export default { //区域列表/获取风险区域 getAreas() { let that = this; - that.$API.am.area.list.req().then(res => { - if (res.err_msg) { - } else { - that.areaList = res.results; - that.showRiskMarkers(res.results); - } - }) + let areaList = that.$TOOL.data.get('qyjyAreaList'); + that.showRiskMarkers(areaList); }, //获取人员列表(全部在线标签列表信息) getAllMen() { @@ -1375,7 +1372,7 @@ export default { }, //摄像头 showCameraMarkers(list) { - debugger; + // debugger; let that = this; if(list.length>0){ list.forEach(item => { @@ -1404,7 +1401,7 @@ export default { callback: () => { } }); - debugger; + // debugger; console.log(that.cameraMaskerLayer) that.cameraMaskerLayer.addMarker(cameraMarker); } @@ -1709,7 +1706,7 @@ export default { //获取摄像头列表 getVchannels() { let that = this; - debugger; + // debugger; that.$API.am.tdevice.vchannel.req({pageSize:999}).then(res => { if (res.err_msg) { that.$message.error(res.err_msg); diff --git a/src/views/login/components/passwordForm.vue b/src/views/login/components/passwordForm.vue index 06334a1e..d9b4c781 100644 --- a/src/views/login/components/passwordForm.vue +++ b/src/views/login/components/passwordForm.vue @@ -139,30 +139,35 @@ export default { mounted() {}, methods: { async login() { - var validate = await this.$refs.loginForm.validate().catch(() => {}); + let that = this; + var validate = await that.$refs.loginForm.validate().catch(() => {}); if (!validate) { return false; } - this.islogin = true; + that.islogin = true; var data = { - username: this.form.user, - // password: this.$TOOL.crypto.MD5(this.form.password) - password: this.form.password, + username: that.form.user, + // password: that.$TOOL.crypto.MD5(that.form.password) + password: that.form.password, }; //获取token try { - var res = await this.$API.auth.token.post(data); - this.$TOOL.cookie.set("TOKEN", res.access, { - expires: this.form.autologin ? 24 * 60 * 60 : 0, + var res = await that.$API.auth.token.post(data); + that.$TOOL.cookie.set("TOKEN", res.access, { + expires: that.form.autologin ? 24 * 60 * 60 : 0, }); try { - var res1 = await this.$API.auth.info.get(); - this.$TOOL.data.set("USER_INFO", res1); - this.$TOOL.data.set("PERMISSIONS", Object.keys(res1.perms)); - debugger; - console.log(res1.type) - if(res1.type==='employee'){ + var res1 = await that.$API.auth.info.get(); + that.$TOOL.data.set("USER_INFO", res1); + that.$TOOL.data.set("PERMISSIONS", Object.keys(res1.perms)); + that.$API.am.area.list.req({page_size:999}).then(res => { + if (res.err_msg) { + } else { + debugger; + let areaList = res.results; + that.$TOOL.data.set("qyjyAreaList", areaList); + if(res1.type==='employee'){ this.$router.replace({ path: "/", }); @@ -171,13 +176,16 @@ export default { path: "/rpm/rpj", }); } - this.$message.success("Login Success 登录成功"); - this.islogin = false; + that.$message.success("Login Success 登录成功"); + that.islogin = false; + } + }) + } catch (err) { - this.islogin = false; + that.islogin = false; console.log(err);} } catch (err) { - this.islogin = false; + that.islogin = false; console.log(err); } // var res = await this.$API.auth.token.post(data)