\r\n \r\n \r\n\r\n \r\n\r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\n\n\n// WEBPACK FOOTER //\n// src/App.vue","import Vue from \"vue\";\r\nimport Router from \"vue-router\";\r\n\r\n\r\nVue.use(Router);\r\n\r\n//获取原型对象上的push函数\r\nconst originalPush = Router.prototype.push;\r\n//修改原型对象中的push方法\r\nRouter.prototype.push = function push(location) {\r\n return originalPush.call(this, location).catch(err => err);\r\n};\r\nlet router = new Router({\r\n // mode: 'history', //去掉url中的#\r\n routes: [\r\n {\r\n /*登录页面 */\r\n path: \"/\",\r\n name: \"Login\",\r\n component: () => import('@/views/Login'),\r\n children: []\r\n },\r\n {\r\n /*模型主页面 */\r\n path: \"/BIM\",\r\n name: \"BIM\",\r\n component: () => import('@/views/BIM'),\r\n },\r\n {\r\n /*项目列表 */\r\n path: \"/ProjectList\",\r\n name: \"ProjectList\",\r\n component: () => import('@/views/ProjectList')\r\n },\r\n {\r\n path: '/JumpPage',\r\n name: 'JumpPage',\r\n component: () => import('@/views/JumpPage')\r\n }, {\r\n\r\n path: '/ReportView',\r\n name: 'ReportView',\r\n component: () => import('@/views/ReportView')\r\n }\r\n\r\n ]\r\n});\r\nrouter.beforeEach((to, from, next) => {\r\n console.log(to, from)\r\n if (to.path === \"/Login\") {\r\n next();\r\n } else {\r\n if (to.path == \"/ProjectList\" && from.path === \"/\") {\r\n if (localStorage.getItem('Ip_section') === 'noIp_section' && (localStorage.getItem('userName') === 'njUser1' || localStorage.getItem('userName') === 'njUser2')) {\r\n alert('非审图单位账号,请重新输入!')\r\n // window.location.href='http://180.101.236.93:9082/#/';\r\n\r\n } else {\r\n next()\r\n }\r\n } else {\r\n next();\r\n }\r\n }\r\n});\r\nexport default router;\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/router/index.js","// The Vue build version to load with the `import` command\r\n// (runtime-only or standalone) has been set in webpack.base.conf with an alias.\r\nimport Vue from \"vue\";\r\nimport App from \"./App\";\r\nimport axios from \"axios\";\r\nimport ElementUI from \"element-ui\";\r\nimport Pdfjs from \"pdfjs\";\r\nimport \"element-ui/lib/theme-chalk/index.css\";\r\nimport \"./assets/iconfont/iconfont.css\";\r\nimport store from \"./store/index\";\r\n\r\nimport router from \"./router\";\r\n\r\n/**重置message,防止重复点击重复弹出message弹框 */\r\nimport { Message } from \"element-ui\";\r\nlet messageInstance = null;\r\nlet mainMessage = function DoneMessage(options) {\r\n //如果弹窗已存在先关闭\r\n if (messageInstance) {\r\n messageInstance.close();\r\n }\r\n messageInstance = Message(options);\r\n};\r\nlet arr = [\"success\", \"warning\", \"info\", \"error\"];\r\narr.forEach(function(type) {\r\n mainMessage[type] = function(options) {\r\n if (typeof options === \"string\") {\r\n options = {\r\n message: options\r\n };\r\n }\r\n options.type = type;\r\n return mainMessage(options);\r\n };\r\n});\r\n\r\nVue.config.productionTip = false;\r\nVue.prototype.$axios = axios;\r\nVue.use(ElementUI);\r\nVue.prototype.$message = mainMessage;\r\nVue.use(Pdfjs);\r\n\r\n/* eslint-disable no-new */\r\nnew Vue({\r\n el: \"#app\",\r\n router,\r\n store,\r\n components: { App },\r\n template: \"