12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <template>
- </template>
- <script setup>
- export default {
- data() {
- return {}
- },
- created() {
- let path = window.location.pathname
- // alert(path)
- console.log('window.path',window)
- let paths = [{
- path:'/jczl1',
- redirect:'/jczl'
- },{
- path:'/sprh1',
- redirect:'/sprh'
- },{
- path:'/yshj1',
- redirect:'/yshj'
- },{
- path:'/yshj_new1',
- redirect:'/yshj_new'
- },{
- path:'/weather1',
- redirect:'/weather'
- },{
- path:'/aqyj1',
- redirect:'/aqyj'
- },{
- path:'/fwyq1',
- redirect:'/fwyq'
- },{
- path:'/jjyx1',
- redirect:'/jjyx'
- },{
- path:'/csgl1',
- redirect:'/csgl'
- },{
- path:'/bjzshz1',
- redirect:'/bjzshz'
- }];
- let redirect = '';
- for (let i = 0; i < paths.length; i++) {
- if(paths[i].path === path){
- redirect = paths[i].redirect;
- }
- }
- // 前端大屏新窗口 跳转
- let routeUrl = this.$router.resolve({
- path: redirect
- });
- this.$store.dispatch("tagsView/delView", this.$route);
- // 返回上一页面
- this.$router.go(-1);
- //新窗口打开页面
- window.open(routeUrl.href, '_blank');
- //原窗口保持原来的页面
- return 0;
- // }
- },
- }
- </script>
- <style scoped lang="scss">
- </style>
|