comprehensive.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <template>
  2. <div class="comprehensive-search">
  3. <basic-container>
  4. <div class="search-header">
  5. <h2>综合搜索</h2>
  6. <p>选择您需要查询的功能模块</p>
  7. </div>
  8. <div class="search-modules">
  9. <el-row :gutter="20">
  10. <el-col :span="6" v-for="module in searchModules" :key="module.key">
  11. <el-card
  12. class="search-module-card"
  13. :body-style="{ padding: '20px' }"
  14. @click.native="openModule(module)"
  15. >
  16. <div class="module-icon">
  17. <i :class="module.icon"></i>
  18. </div>
  19. <div class="module-info">
  20. <h3>{{ module.title }}</h3>
  21. <p>{{ module.description }}</p>
  22. </div>
  23. </el-card>
  24. </el-col>
  25. </el-row>
  26. </div>
  27. </basic-container>
  28. </div>
  29. </template>
  30. <script>
  31. export default {
  32. name: 'ComprehensiveSearch',
  33. data() {
  34. return {
  35. searchModules: [
  36. {
  37. key: 'shipment-status',
  38. title: '发货状态查询',
  39. description: '查询订单发货状态、物流跟踪信息',
  40. icon: 'el-icon-truck',
  41. path: '/search/shipment-status'
  42. },
  43. {
  44. key: 'invoice',
  45. title: '发票及开票信息查询',
  46. description: '查询发票信息、开票信息',
  47. icon: 'el-icon-document',
  48. path: '/search/invoice'
  49. },
  50. {
  51. key: 'claim-query',
  52. title: '理赔信息查询',
  53. description: '查询理赔信息',
  54. icon: 'el-icon-box',
  55. path: '/claim/index'
  56. },
  57. // {
  58. // key: 'customer-query',
  59. // title: '客户查询',
  60. // description: '查询客户信息、客户订单',
  61. // icon: 'el-icon-user',
  62. // path: '/search/customer-query'
  63. // }
  64. ]
  65. }
  66. },
  67. methods: {
  68. openModule(module) {
  69. console.log(module.key)
  70. if (module.key === 'shipment-status') {
  71. this.$router.push('/search/shipment-status')
  72. } else if (module.key === 'invoice') {
  73. this.$router.push('/search/invoice')
  74. } else if (module.key === 'claim-query') {
  75. this.$router.push('/claim/index')
  76. } else {
  77. this.$message.info(`${module.title}功能开发中...`)
  78. }
  79. }
  80. }
  81. }
  82. </script>
  83. <style lang="scss" scoped>
  84. .comprehensive-search {
  85. padding: 20px;
  86. }
  87. .search-header {
  88. text-align: center;
  89. margin-bottom: 40px;
  90. h2 {
  91. color: #303133;
  92. margin-bottom: 10px;
  93. }
  94. p {
  95. color: #909399;
  96. font-size: 14px;
  97. }
  98. }
  99. .search-modules {
  100. max-width: 1200px;
  101. margin: 0 auto;
  102. }
  103. .search-module-card {
  104. cursor: pointer;
  105. transition: all 0.3s;
  106. margin-bottom: 20px;
  107. &:hover {
  108. transform: translateY(-5px);
  109. box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  110. }
  111. .module-icon {
  112. text-align: center;
  113. margin-bottom: 15px;
  114. i {
  115. font-size: 48px;
  116. color: #409EFF;
  117. }
  118. }
  119. .module-info {
  120. text-align: center;
  121. h3 {
  122. color: #303133;
  123. margin-bottom: 8px;
  124. font-size: 16px;
  125. }
  126. p {
  127. color: #909399;
  128. font-size: 12px;
  129. line-height: 1.4;
  130. }
  131. }
  132. }
  133. </style>