{"ast":null,"code":"import \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.find.js\";\nimport \"core-js/modules/es.array.includes.js\";\nimport \"core-js/modules/es.iterator.constructor.js\";\nimport \"core-js/modules/es.iterator.filter.js\";\nimport \"core-js/modules/es.iterator.find.js\";\nimport \"core-js/modules/es.object.to-string.js\";\nimport \"core-js/modules/es.string.includes.js\";\nimport \"core-js/modules/web.timers.js\";\nexport default {\n name: 'App',\n data: function data() {\n return {\n searchQuery: '',\n showSidebar: false,\n windowWidth: window.innerWidth,\n showProcessTypeSelector: false,\n selectedProcessType: 'employee',\n menuItems: [{\n path: '/process/employee',\n title: '员工入职业务流程',\n icon: 'el-icon-user',\n showProcessSelector: true\n }, {\n path: '/process/shipping',\n title: '发货业务流程',\n icon: 'el-icon-truck',\n showProcessSelector: true\n }]\n };\n },\n computed: {\n currentRoute: function currentRoute() {\n return this.$route.path;\n },\n filteredMenuItems: function filteredMenuItems() {\n var _this = this;\n return this.menuItems.filter(function (item) {\n return item.title.toLowerCase().includes(_this.searchQuery.toLowerCase());\n });\n },\n isMobile: function isMobile() {\n return this.windowWidth < 768;\n },\n isEmployeeProcessActive: function isEmployeeProcessActive() {\n return this.selectedProcessType === 'employee';\n },\n isShippingProcessActive: function isShippingProcessActive() {\n return this.selectedProcessType === 'shipping';\n }\n },\n methods: {\n handleSearch: function handleSearch() {\n // 这里可以添加额外的搜索逻辑\n },\n handleResize: function handleResize() {\n this.windowWidth = window.innerWidth;\n },\n handleMobileMenuSelect: function handleMobileMenuSelect() {\n var _this2 = this;\n // 在应用选择类型变更后再关闭侧边栏\n setTimeout(function () {\n _this2.showSidebar = false;\n }, 300);\n },\n handleMenuItemClick: function handleMenuItemClick(item) {\n // 显示或隐藏流程类型选择器\n this.showProcessTypeSelector = item.showProcessSelector || false;\n\n // 根据当前路径设置默认选中的流程类型\n if (item.path.includes('employee')) {\n this.selectedProcessType = 'employee';\n } else if (item.path.includes('shipping')) {\n this.selectedProcessType = 'shipping';\n }\n },\n handleProcessTypeChange: function handleProcessTypeChange(type) {\n this.selectedProcessType = type;\n // 通知流程组件更新流程类型\n this.$root.$emit('change-process-type', type);\n }\n },\n mounted: function mounted() {\n window.addEventListener('resize', this.handleResize);\n\n // 根据当前路径初始化\n var currentPath = this.$route.path;\n var currentItem = this.menuItems.find(function (item) {\n return item.path === currentPath;\n });\n if (currentItem) {\n this.showProcessTypeSelector = currentItem.showProcessSelector || false;\n }\n },\n beforeDestroy: function beforeDestroy() {\n window.removeEventListener('resize', this.handleResize);\n }\n};","map":{"version":3,"names":["name","data","searchQuery","showSidebar","windowWidth","window","innerWidth","showProcessTypeSelector","selectedProcessType","menuItems","path","title","icon","showProcessSelector","computed","currentRoute","$route","filteredMenuItems","_this","filter","item","toLowerCase","includes","isMobile","isEmployeeProcessActive","isShippingProcessActive","methods","handleSearch","handleResize","handleMobileMenuSelect","_this2","setTimeout","handleMenuItemClick","handleProcessTypeChange","type","$root","$emit","mounted","addEventListener","currentPath","currentItem","find","beforeDestroy","removeEventListener"],"sources":["src/App.vue"],"sourcesContent":["\n\n\n\n "],"mappings":";;;;;;;;;AAkHA;EACAA,IAAA;EACAC,IAAA,WAAAA,KAAA;IACA;MACAC,WAAA;MACAC,WAAA;MACAC,WAAA,EAAAC,MAAA,CAAAC,UAAA;MACAC,uBAAA;MACAC,mBAAA;MACAC,SAAA,GACA;QACAC,IAAA;QACAC,KAAA;QACAC,IAAA;QACAC,mBAAA;MACA,GACA;QACAH,IAAA;QACAC,KAAA;QACAC,IAAA;QACAC,mBAAA;MACA;IAEA;EACA;EACAC,QAAA;IACAC,YAAA,WAAAA,aAAA;MACA,YAAAC,MAAA,CAAAN,IAAA;IACA;IACAO,iBAAA,WAAAA,kBAAA;MAAA,IAAAC,KAAA;MACA,YAAAT,SAAA,CAAAU,MAAA,WAAAC,IAAA;QAAA,OACAA,IAAA,CAAAT,KAAA,CAAAU,WAAA,GAAAC,QAAA,CAAAJ,KAAA,CAAAhB,WAAA,CA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