{"ast":null,"code":"import \"core-js/modules/es.array.filter.js\";\nimport \"core-js/modules/es.array.includes.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 selectedProcessType: 'employee'\n };\n },\n computed: {\n currentRoute: function currentRoute() {\n return this.$route.path;\n },\n filteredItems: function filteredItems() {\n var _this = this;\n var items = [{\n path: '/process/employee',\n title: '员工入职流程'\n }, {\n path: '/process/x6',\n title: 'X6员工入职流程图'\n }, {\n path: '/process/sales',\n title: '销售订单流程'\n }, {\n path: '/process/shipping',\n title: '发货业务流程'\n }];\n return items.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' || this.currentRoute === '/process/employee';\n },\n isSalesProcessActive: function isSalesProcessActive() {\n return this.selectedProcessType === 'sales' || this.currentRoute === '/process/sales';\n },\n isShippingProcessActive: function isShippingProcessActive() {\n return this.selectedProcessType === 'shipping' || this.currentRoute === '/process/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 handleProcessTypeChange: function handleProcessTypeChange(type) {\n this.selectedProcessType = type;\n // 通知流程组件更新流程类型\n this.$root.$emit('change-process-type', type);\n },\n getProcessType: function getProcessType(path) {\n // Implement the logic to determine the process type based on the path\n // This is a placeholder and should be replaced with the actual implementation\n return 'employee'; // Placeholder return, actual implementation needed\n },\n getActiveClass: function getActiveClass(path) {\n // Implement the logic to determine the active class based on the path\n // This is a placeholder and should be replaced with the actual implementation\n return ''; // Placeholder return, actual implementation needed\n },\n getIconClass: function getIconClass(path) {\n // Implement the logic to determine the icon class based on the path\n // This is a placeholder and should be replaced with the actual implementation\n return 'el-icon-user'; // Placeholder return, actual implementation needed\n }\n },\n mounted: function mounted() {\n window.addEventListener('resize', this.handleResize);\n\n // 根据当前路径初始化\n var currentPath = this.$route.path;\n if (currentPath.includes('employee')) {\n this.selectedProcessType = 'employee';\n } else if (currentPath.includes('sales')) {\n this.selectedProcessType = 'sales';\n } else if (currentPath.includes('shipping')) {\n this.selectedProcessType = 'shipping';\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","selectedProcessType","computed","currentRoute","$route","path","filteredItems","_this","items","title","filter","item","toLowerCase","includes","isMobile","isEmployeeProcessActive","isSalesProcessActive","isShippingProcessActive","methods","handleSearch","handleResize","handleMobileMenuSelect","_this2","setTimeout","handleProcessTypeChange","type","$root","$emit","getProcessType","getActiveClass","getIconClass","mounted","addEventListener","currentPath","beforeDestroy","removeEventListener"],"sources":["src/App.vue"],"sourcesContent":["\n\n\n\n "],"mappings":";;;;;AAwFA;EACAA,IAAA;EACAC,IAAA,WAAAA,KAAA;IACA;MACAC,WAAA;MACAC,WAAA;MACAC,WAAA,EAAAC,MAAA,CAAAC,UAAA;MACAC,mBAAA;IACA;EACA;EACAC,QAAA;IACAC,YAAA,WAAAA,aAAA;MACA,YAAAC,MAAA,CAAAC,IAAA;IACA;IACAC,aAAA,WAAAA,cAAA;MAAA,IAAAC,KAAA;MACA,IAAAC,KAAA,IACA;QAAAH,IAAA;QAAAI,KAAA;MAAA,GACA;QAAAJ,IAAA;QAAAI,KAAA;MAAA,GACA;QAAAJ,IAAA;QAAAI,KAAA;MAAA,GACA;QAAAJ,IAAA;QAAAI,KAAA;MAAA,EACA;MA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C,aAAA,WAAAA,cAAA;IACAnC,MAAA,CAAAoC,mBAAA,gBAAAf,YAAA;EACA;AACA","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}