e54c783bc2bdb4e24ead94ae18c2bd06f331f2261cc921b3a6244b4ec99af92b.json 9.8 KB

1
  1. {"ast":null,"code":"import \"core-js/modules/es.array.filter.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.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 userName: '',\n menuItems: [{\n path: '/process/employee?userId=' + this.$route.query.userId,\n title: '员工入职业务流程',\n icon: 'el-icon-user',\n showProcessSelector: false\n }, {\n path: '/process/sales?userId=' + this.$route.query.userId,\n title: '销售订单业务流程',\n icon: 'el-icon-goods',\n showProcessSelector: false\n }, {\n path: '/process/shipping?userId=' + this.$route.query.userId,\n title: '发货业务流程',\n icon: 'el-icon-truck',\n showProcessSelector: false\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 },\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 // eslint-disable-next-line no-unused-vars\n handleMenuItemClick: function handleMenuItemClick(item) {\n // 简化后的菜单点击处理\n }\n },\n mounted: function mounted() {\n window.addEventListener('resize', this.handleResize);\n this.userName = this.$route.query.userName;\n },\n beforeDestroy: function beforeDestroy() {\n window.removeEventListener('resize', this.handleResize);\n }\n};","map":{"version":3,"names":["name","data","searchQuery","showSidebar","windowWidth","window","innerWidth","userName","menuItems","path","$route","query","userId","title","icon","showProcessSelector","computed","currentRoute","filteredMenuItems","_this","filter","item","toLowerCase","includes","isMobile","methods","handleSearch","handleResize","handleMobileMenuSelect","_this2","setTimeout","handleMenuItemClick","mounted","addEventListener","beforeDestroy","removeEventListener"],"sources":["src/App.vue"],"sourcesContent":["<template>\n <div id=\"app\">\n <el-container>\n <!-- 移动端显示的顶部栏 -->\n <el-header v-if=\"isMobile\" class=\"mobile-header\">\n <div class=\"mobile-header-content\">\n <i class=\"el-icon-s-platform\" style=\"font-size: 24px; color: #409EFF;\"></i>\n <h3 class=\"mobile-title\">业务流程管理</h3>\n <i class=\"el-icon-s-unfold\" @click=\"showSidebar = true\"></i>\n </div>\n </el-header>\n\n <!-- 侧边栏 - 在移动端作为抽屉显示 -->\n <el-drawer\n v-if=\"isMobile\"\n title=\"业务流程导航\"\n :visible.sync=\"showSidebar\"\n direction=\"ltr\"\n size=\"80%\">\n <div class=\"mobile-sidebar\">\n <div class=\"search-container\">\n <el-input\n v-model=\"searchQuery\"\n placeholder=\"搜索业务名称\"\n prefix-icon=\"el-icon-search\"\n clearable\n @input=\"handleSearch\">\n </el-input>\n </div>\n\n <el-menu\n :router=\"true\"\n :default-active=\"currentRoute\"\n @select=\"handleMobileMenuSelect\">\n <el-menu-item\n v-for=\"item in filteredMenuItems\"\n :key=\"item.path\"\n :index=\"item.path\"\n @click=\"handleMenuItemClick(item)\">\n <i :class=\"item.icon\"></i>\n <span>{{ item.title }}</span>\n </el-menu-item>\n </el-menu>\n </div>\n </el-drawer>\n\n <!-- 桌面端的常规侧边栏 -->\n <el-aside v-if=\"!isMobile\" width=\"250px\">\n <div class=\"logo-container\">\n <!-- 使用 Element UI 图标临时替代 logo -->\n <i class=\"el-icon-s-platform\" style=\"font-size: 40px; color: #409EFF;\"></i>\n </div>\n <div class=\"search-container\">\n <el-input\n v-model=\"searchQuery\"\n placeholder=\"搜索业务名称\"\n prefix-icon=\"el-icon-search\"\n clearable\n @input=\"handleSearch\">\n </el-input>\n </div>\n\n <el-menu\n :router=\"true\"\n :default-active=\"currentRoute\"\n class=\"el-menu-vertical\">\n <el-menu-item\n v-for=\"item in filteredMenuItems\"\n :key=\"item.path\"\n :index=\"item.path\"\n @click=\"handleMenuItemClick(item)\">\n <i :class=\"item.icon\"></i>\n <span>{{ item.title }}</span>\n </el-menu-item>\n </el-menu>\n </el-aside>\n <el-main>\n <router-view></router-view>\n </el-main>\n </el-container>\n </div>\n</template>\n\n<script>\nexport default {\n name: 'App',\n data() {\n return {\n searchQuery: '',\n showSidebar: false,\n windowWidth: window.innerWidth,\n userName: '',\n menuItems: [\n {\n path: '/process/employee?userId=' + this.$route.query.userId,\n title: '员工入职业务流程',\n icon: 'el-icon-user',\n showProcessSelector: false\n },\n {\n path: '/process/sales?userId=' + this.$route.query.userId,\n title: '销售订单业务流程',\n icon: 'el-icon-goods',\n showProcessSelector: false\n },\n {\n path: '/process/shipping?userId=' + this.$route.query.userId,\n title: '发货业务流程',\n icon: 'el-icon-truck',\n showProcessSelector: false\n }\n ]\n }\n },\n computed: {\n currentRoute() {\n return this.$route.path\n },\n filteredMenuItems() {\n return this.menuItems.filter(item =>\n item.title.toLowerCase().includes(this.searchQuery.toLowerCase())\n )\n },\n isMobile() {\n return this.windowWidth < 768\n }\n },\n methods: {\n handleSearch() {\n // 这里可以添加额外的搜索逻辑\n },\n handleResize() {\n this.windowWidth = window.innerWidth\n },\n handleMobileMenuSelect() {\n // 关闭侧边栏\n setTimeout(() => {\n this.showSidebar = false;\n }, 300);\n },\n // eslint-disable-next-line no-unused-vars\n handleMenuItemClick(item) {\n // 简化后的菜单点击处理\n }\n },\n mounted() {\n window.addEventListener('resize', this.handleResize)\n this.userName = this.$route.query.userName;\n },\n beforeDestroy() {\n window.removeEventListener('resize', this.handleResize)\n }\n}\n</script>\n\n<style>\n#app {\n font-family: Arial, sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n height: 100vh;\n}\n\n.el-container {\n height: 100%;\n}\n\n.el-aside {\n background-color: #f8f9fa;\n border-right: 1px solid #e9ecef;\n}\n\n.logo-container {\n padding: 20px;\n text-align: center;\n}\n\n.search-container {\n padding: 0 20px 20px 20px;\n}\n\n.el-menu-vertical {\n border-right: none;\n}\n\n.el-menu-item {\n font-size: 15px;\n}\n\n.el-menu-item i {\n color: #606266;\n margin-right: 5px;\n}\n\n/* 移动端样式 */\n.mobile-header {\n background-color: #fff;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n z-index: 100;\n padding: 0;\n}\n\n.mobile-header-content {\n display: flex;\n justify-content: space-between;\n align-items: center;\n height: 60px;\n padding: 0 15px;\n}\n\n.mobile-title {\n margin: 0;\n font-size: 18px;\n color: #303133;\n}\n\n.mobile-sidebar {\n padding: 20px 0;\n}\n\n.el-drawer__header {\n margin-bottom: 0;\n padding: 20px;\n border-bottom: 1px solid #ebeef5;\n}\n\n/* 响应式调整 */\n@media screen and (max-width: 768px) {\n .el-main {\n padding: 10px;\n }\n}\n</style> "],"mappings":";;;;;;;AAoFA;EACAA,IAAA;EACAC,IAAA,WAAAA,KAAA;IACA;MACAC,WAAA;MACAC,WAAA;MACAC,WAAA,EAAAC,MAAA,CAAAC,UAAA;MACAC,QAAA;MACAC,SAAA,GACA;QACAC,IAAA,qCAAAC,MAAA,CAAAC,KAAA,CAAAC,MAAA;QACAC,KAAA;QACAC,IAAA;QACAC,mBAAA;MACA,GACA;QACAN,IAAA,kCAAAC,MAAA,CAAAC,KAAA,CAAAC,MAAA;QACAC,KAAA;QACAC,IAAA;QACAC,mBAAA;MACA,GACA;QACAN,IAAA,qCAAAC,MAAA,CAAAC,KAAA,CAAAC,MAAA;QACAC,KAAA;QACAC,IAAA;QACAC,mBAAA;MACA;IAEA;EACA;EACAC,QAAA;IACAC,YAAA,WAAAA,aAAA;MACA,YAAAP,MAAA,CAAAD,IAAA;IACA;IACAS,iBAAA,WAAAA,kBAAA;MAAA,IAAAC,KAAA;MACA,YAAAX,SAAA,CAAAY,MAAA,WAAAC,IAAA;QAAA,OACAA,IAAA,CAAAR,KAAA,CAAAS,WAAA,GAAAC,QAAA,CAAAJ,KAAA,CAAAjB,WAAA,CAAAoB,WAAA;MAAA,CACA;IACA;IACAE,QAAA,WAAAA,SAAA;MACA,YAAApB,WAAA;IACA;EACA;EACAqB,OAAA;IACAC,YAAA,WAAAA,aAAA;MACA;IAAA,CACA;IACAC,YAAA,WAAAA,aAAA;MACA,KAAAvB,WAAA,GAAAC,MAAA,CAAAC,UAAA;IACA;IACAsB,sBAAA,WAAAA,uBAAA;MAAA,IAAAC,MAAA;MACA;MACAC,UAAA;QACAD,MAAA,CAAA1B,WAAA;MACA;IACA;IACA;IACA4B,mBAAA,WAAAA,oBAAAV,IAAA;MACA;IAAA;EAEA;EACAW,OAAA,WAAAA,QAAA;IACA3B,MAAA,CAAA4B,gBAAA,gBAAAN,YAAA;IACA,KAAApB,QAAA,QAAAG,MAAA,CAAAC,KAAA,CAAAJ,QAAA;EACA;EACA2B,aAAA,WAAAA,cAAA;IACA7B,MAAA,CAAA8B,mBAAA,gBAAAR,YAAA;EACA;AACA","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]}