diff --git a/src/asyncRouter.js b/src/asyncRouter.js index 7750987..d6ba197 100644 --- a/src/asyncRouter.js +++ b/src/asyncRouter.js @@ -48,7 +48,11 @@ router.beforeEach((to, from, next) => { if (to.path == `/login` || to.path == '/apiBI' || to.path == '/apivideomanager') { next() } else { - next(`/login`) + if (to.path == '/map' && to.query.userId) { + next() + } else { + next(`/login`) + } } } }) diff --git a/src/views/map/index.vue b/src/views/map/index.vue index 0d91fb9..7afe3d0 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -1259,6 +1259,7 @@ export default { } }, mounted() { + this.initUser() this.initMap() this.pointBoxCfd = loadMapBoxCfd() this.pointBoxCmt = loadCmtMapBox() @@ -1362,6 +1363,23 @@ export default { // }) // }) // }, + initUser() { + const { userId } = this.$route.query + if (!userId) return + requestFN( + '/admin/v2/login', + { userId } + ).then((res) => { + console.log(res) + if (res.result !== 'success') { + alert('登录失败') + window.close() + } + }).catch((e) => { + alert('登录失败') + window.close() + }) + }, initMap() { viewer = new Cesium.Viewer('cesiumContainer', { // terrainProvider: Cesium.createWorldTerrain() @@ -1425,6 +1443,13 @@ export default { // } // } // }, 1000) + const { id, longitude, latitude, CORP_INFO_ID, type } = this.$route.query + + if (type === 'newToOld') { + setTimeout(() => { + this.clickPort({ id, longitude, latitude, height: 10000, CORP_INFO_ID }) + }, 1000) + } }, loadTilesetHandler() { @@ -1962,6 +1987,10 @@ export default { handleClickRightTools(index) { if (this.rightOptionsList[index].check !== '') this.rightOptionsList[index].check = !this.rightOptionsList[index].check if (index === 0) { + if (this.$route.query.userId) { + window.close() + return + } if (this.gangkouActive === '00004') { // if (this.fwebsocket) { // this.fwebsocket.close() diff --git a/src/views/security_commitment/promise_book_issued/components/add.vue b/src/views/security_commitment/promise_book_issued/components/add.vue index 0be66d9..aec165e 100644 --- a/src/views/security_commitment/promise_book_issued/components/add.vue +++ b/src/views/security_commitment/promise_book_issued/components/add.vue @@ -165,7 +165,7 @@ - + + + + + + @@ -355,6 +360,7 @@ export default { DEPARTMENT_ID: null, POST_ID: '', USER_ID: [], + NICKNAMES: [], id: Math.random() } ], @@ -459,6 +465,7 @@ export default { CORPINFO_ID: data.coverpeople[i].CORPINFO_ID, DEPARTMENT_ID: data.coverpeople[i].DEPARTMENT_ID, POST_ID: data.coverpeople[i].POST_ID, + NICKNAME: data.coverpeople[i].NICKNAME, USER_ID: [], id: data.coverpeople[i].PROMISEPEOPLE_ID }) @@ -616,6 +623,7 @@ export default { DEPARTMENT_ID: null, POST_ID: '', USER_ID: [], + NICKNAMES: [], id: Math.random() } ) @@ -702,7 +710,7 @@ export default { { DEPARTMENT_ID: item.DEPARTMENT_ID, POST_ID: item.POST_ID, USER_ID: item.USER_ID, CORPINFO_ID: item.CORPINFO_ID } )) const coverpeople = this.form.coverpeople.map(item => ( - { DEPARTMENT_ID: item.DEPARTMENT_ID, POST_ID: item.POST_ID, USER_ID: item.USER_ID, CORPINFO_ID: item.CORPINFO_ID } + { DEPARTMENT_ID: item.DEPARTMENT_ID, POST_ID: item.POST_ID, USER_ID: item.USER_ID, CORPINFO_ID: item.CORPINFO_ID,NICKNAME: item.NICKNAME } )) let url if (this.$parent.PROMISE_ID) { @@ -765,6 +773,7 @@ export default { DEPARTMENT_ID: null, POST_ID: '', USER_ID: [], + NICKNAMES: [], id: Math.random() } ] diff --git a/src/views/security_commitment/promise_book_issued/components/details.vue b/src/views/security_commitment/promise_book_issued/components/details.vue index b32420c..983964f 100644 --- a/src/views/security_commitment/promise_book_issued/components/details.vue +++ b/src/views/security_commitment/promise_book_issued/components/details.vue @@ -92,7 +92,10 @@ export default { ).then((data) => { const DETAIL = data.COLLATERAL.map(item => ({ value: item.COLLATERAL, id: item.PROMISEDETAIL_ID })) this.dialog.visible = true - this.dialog.data = { ...data.varList, DETAIL, FILEPATH: data.ISGN.FILEPATH, SIGNTIME: data.ISGN.SIGNTIME, COVERPEOPLE: data.COVERPEOPLE[0].USERNAME, ORDER: data.COVERPEOPLE } + this.dialog.data = { ...data.varList, DETAIL, + FILEPATH: data.ISGN.FILEPATH, SIGNTIME: data.ISGN.SIGNTIME, + COVERPEOPLE: data.COVERPEOPLE[0].USERNAME, ORDER: data.COVERPEOPLE , + NICKNAME: data.COVERPEOPLE[0].NICKNAME,} }).catch((e) => { }) }, diff --git a/src/views/security_commitment/promise_book_issued/components/promise_book_dialog.vue b/src/views/security_commitment/promise_book_issued/components/promise_book_dialog.vue index 27a8b79..53d6780 100644 --- a/src/views/security_commitment/promise_book_issued/components/promise_book_dialog.vue +++ b/src/views/security_commitment/promise_book_issued/components/promise_book_dialog.vue @@ -9,7 +9,7 @@

{{ dialogData.TYPE === '0' ? '安全生产承诺书' : '安全生产责任状' }}

-
{{ dialogData.COVERPEOPLE }}:
+
{{ dialogData.COVERPEOPLE }}{{ dialogData.NICKNAME }}:
{{ dialogData.TEXT }}
@@ -27,7 +27,7 @@