{"remainingRequest":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\damDance-fvue\\src\\components\\common\\TabsComponent.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\damDance-fvue\\src\\components\\common\\TabsComponent.vue","mtime":1696817248419},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\damDance-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport {mapGetters} from 'vuex'\r\nimport utils from '@/hotent-ui-util.js'\r\nimport menuApi from '@/api/menu.js'\r\n\r\n// 懒加载组件 只加载当前页面用到的组件\r\n// 个人设置\r\n\r\n// const secretary = () => import('@/biz/views/personal/Secretary/SecretaryList.vue');\r\n// // 任务中心\r\n// const vTodo = () => import(\"@/biz/views/flow/todo.vue\");\r\n// const vDone = () => import(\"@/biz/views/flow/done.vue\");\r\n// const vRequest = () => import(\"@/biz/views/flow/myRequest.vue\");\r\n// const vFlowList = () => import(\"@/biz/views/flow/flowList.vue\");\r\n// const vTodoRead = () => import(\"@/biz/views/flow/todoRead.vue\");\r\n// const vDoneRead =() => import(\"@/biz/views/flow/doneRead.vue\");\r\n// const vMyRead = () => import(\"@/biz/views/flow/myRead.vue\");\r\n// const vMyDelegate = () => import(\"@/biz/views/flow/myDelegate.vue\");\r\n//养护管理路由\r\nimport moduleRouter from '@/module_components.js'\r\n//元件管理\r\nexport default {\r\n name: 'front-tabs-component',\r\n components: {\r\n ...moduleRouter\r\n },\r\n props: {},\r\n computed: {\r\n ...mapGetters({\r\n tabsStyle: 'styleSetting/tabsStyle',\r\n }),\r\n finalTabsStyle: function () {\r\n // 使用菜单的配置\r\n if (\r\n (this.tabsStyle.tabType == 'menuSetting' ||\r\n this.tabsStyle.tabType == null) &&\r\n this.menuTabsStyle\r\n ) {\r\n return this.menuTabsStyle\r\n }\r\n\r\n // 使用默认的\r\n if (\r\n this.tabsStyle.tabType == null ||\r\n ((this.tabsStyle.tabType == 'menuSetting' ||\r\n this.tabsStyle.tabType == null) &&\r\n !this.menuTabsStyle)\r\n ) {\r\n return {tabType: ''}\r\n }\r\n // 使用全局的配置\r\n return this.tabsStyle\r\n },\r\n },\r\n data() {\r\n return {\r\n tabComponentOptions: [],\r\n currentTabComponent: '',\r\n menuTabsStyle: null,\r\n }\r\n },\r\n methods: {\r\n handlePaneClick: function (data) {\r\n if (data.alias) {\r\n this.currentTabComponent = data.alias\r\n }\r\n },\r\n genHref(anchor) {\r\n if (this.$router.mode == 'history') {\r\n return '#' + anchor\r\n }\r\n return '/#' + this.$route.path + '#' + anchor\r\n },\r\n activeTab(fullpath) {\r\n let lastIdx = fullpath.lastIndexOf('#')\r\n if (lastIdx != -1) {\r\n let urlAnchor = fullpath.substr(lastIdx + 1)\r\n this.tabComponentOptions.filter((item) => {\r\n if (item.alias == urlAnchor) {\r\n this.currentTabComponent = urlAnchor\r\n }\r\n })\r\n }\r\n },\r\n },\r\n mounted() {},\r\n beforeRouteEnter(to, from, next) {\r\n next((vm) => {\r\n // 通过 `vm` 访问组件实例\r\n let routePath = vm.$route.path\r\n let activePlat\r\n if (routePath) {\r\n let i = routePath.lastIndexOf('/')\r\n routePath = routePath.slice(i + 1)\r\n\r\n if (vm.$route.path.indexOf('frontPlat') !== -1) {\r\n activePlat = 'getFrontMenuByAlias'\r\n } else {\r\n activePlat = 'getMenuByAlias'\r\n }\r\n }\r\n menuApi[activePlat](routePath, (m) => {\r\n if (m) {\r\n vm.$emit('menuChange', m)\r\n if (m.children && m.children.length > 0) {\r\n vm.tabComponentOptions = m.children\r\n vm.currentTabComponent =\r\n m.activeTab || vm.tabComponentOptions[0].alias\r\n vm.activeTab(to.fullPath)\r\n } else {\r\n vm.tabComponentOptions = []\r\n vm.currentTabComponent = m.alias\r\n }\r\n if (m.tabsStyle) {\r\n vm.menuTabsStyle = utils.parseToJson(m.tabsStyle)\r\n } else {\r\n vm.menuTabsStyle = null\r\n }\r\n } else {\r\n // 没有菜单的路由跳转 需要显示TAb名称需要定义tobName参数传递过来\r\n vm.tabComponentOptions = []\r\n vm.currentTabComponent = to.name\r\n vm.$emit('menuChange', {name: to.params.tobName?to.params.tobName:to.meta.menuLabel})\r\n }\r\n })\r\n })\r\n },\r\n beforeRouteUpdate(to, from, next) {\r\n // 在当前路由改变,但是该组件被复用时调用\r\n // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候,\r\n // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用。\r\n // 可以访问组件实例 `this`\r\n this.activeTab(to.fullPath)\r\n next()\r\n },\r\n}\r\n",null]}