applist.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <!-- <ul class="flex space-x-2 rtl:space-x-reverse">
  3. <li>
  4. <a href="javascript:;" class="text-primary hover:underline">首页</a>
  5. </li>
  6. <li class="before:content-['/'] ltr:before:mr-2 rtl:before:ml-2">
  7. <span>所有应用</span>
  8. </li>
  9. </ul> -->
  10. <div class="grid grid-cols-2 gap-8">
  11. <div v-for="(item, index) in cols" :key="index" @click="goPageList(item)">
  12. <svg class="w-40 h-40 text-gray-500 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
  13. fill="currentColor" viewBox="0 0 24 24">
  14. <path fill-rule="evenodd"
  15. d="M11.32 6.176H5c-1.105 0-2 .949-2 2.118v10.588C3 20.052 3.895 21 5 21h11c1.105 0 2-.948 2-2.118v-7.75l-3.914 4.144A2.46 2.46 0 0 1 12.81 16l-2.681.568c-1.75.37-3.292-1.263-2.942-3.115l.536-2.839c.097-.512.335-.983.684-1.352l2.914-3.086Z"
  16. clip-rule="evenodd" />
  17. <path fill-rule="evenodd"
  18. d="M19.846 4.318a2.148 2.148 0 0 0-.437-.692 2.014 2.014 0 0 0-.654-.463 1.92 1.92 0 0 0-1.544 0 2.014 2.014 0 0 0-.654.463l-.546.578 2.852 3.02.546-.579a2.14 2.14 0 0 0 .437-.692 2.244 2.244 0 0 0 0-1.635ZM17.45 8.721 14.597 5.7 9.82 10.76a.54.54 0 0 0-.137.27l-.536 2.84c-.07.37.239.696.588.622l2.682-.567a.492.492 0 0 0 .255-.145l4.778-5.06Z"
  19. clip-rule="evenodd" />
  20. </svg>
  21. <div class="h-4 mx-10 my-2"><span class="text-center text-base font-bold whitespace-nowrap">{{ item.title }}</span></div>
  22. </div>
  23. <!-- <div>
  24. <svg class="w-40 h-40 text-gray-500 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
  25. fill="currentColor" viewBox="0 0 24 24">
  26. <path fill-rule="evenodd"
  27. d="M11.32 6.176H5c-1.105 0-2 .949-2 2.118v10.588C3 20.052 3.895 21 5 21h11c1.105 0 2-.948 2-2.118v-7.75l-3.914 4.144A2.46 2.46 0 0 1 12.81 16l-2.681.568c-1.75.37-3.292-1.263-2.942-3.115l.536-2.839c.097-.512.335-.983.684-1.352l2.914-3.086Z"
  28. clip-rule="evenodd" />
  29. <path fill-rule="evenodd"
  30. d="M19.846 4.318a2.148 2.148 0 0 0-.437-.692 2.014 2.014 0 0 0-.654-.463 1.92 1.92 0 0 0-1.544 0 2.014 2.014 0 0 0-.654.463l-.546.578 2.852 3.02.546-.579a2.14 2.14 0 0 0 .437-.692 2.244 2.244 0 0 0 0-1.635ZM17.45 8.721 14.597 5.7 9.82 10.76a.54.54 0 0 0-.137.27l-.536 2.84c-.07.37.239.696.588.622l2.682-.567a.492.492 0 0 0 .255-.145l4.778-5.06Z"
  31. clip-rule="evenodd" />
  32. </svg>
  33. <div class="h-4 mx-10 my-2"><span class="text-center text-base font-bold">订单查询</span></div>
  34. </div>
  35. <div class="goods-transfer">
  36. <svg class="w-40 h-40 text-gray-500 dark:text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"
  37. fill="currentColor" viewBox="0 0 24 24">
  38. <path fill-rule="evenodd"
  39. d="M11.32 6.176H5c-1.105 0-2 .949-2 2.118v10.588C3 20.052 3.895 21 5 21h11c1.105 0 2-.948 2-2.118v-7.75l-3.914 4.144A2.46 2.46 0 0 1 12.81 16l-2.681.568c-1.75.37-3.292-1.263-2.942-3.115l.536-2.839c.097-.512.335-.983.684-1.352l2.914-3.086Z"
  40. clip-rule="evenodd" />
  41. <path fill-rule="evenodd"
  42. d="M19.846 4.318a2.148 2.148 0 0 0-.437-.692 2.014 2.014 0 0 0-.654-.463 1.92 1.92 0 0 0-1.544 0 2.014 2.014 0 0 0-.654.463l-.546.578 2.852 3.02.546-.579a2.14 2.14 0 0 0 .437-.692 2.244 2.244 0 0 0 0-1.635ZM17.45 8.721 14.597 5.7 9.82 10.76a.54.54 0 0 0-.137.27l-.536 2.84c-.07.37.239.696.588.622l2.682-.567a.492.492 0 0 0 .255-.145l4.778-5.06Z"
  43. clip-rule="evenodd" />
  44. </svg>
  45. <div class="h-4 mx-10 my-2"><span class="text-center text-base font-bold">订单查询</span></div>
  46. </div> -->
  47. </div>
  48. <!-- <div class="relative inline-flex align-middle">
  49. <button type="button" @click="godashbord" class="btn btn-dark ltr:rounded-r-none rtl:rounded-l-none">Left</button>
  50. <button type="button" class="btn btn-dark rounded-none">Middle</button>
  51. <button type="button" class="btn btn-dark ltr:rounded-l-none rtl:rounded-r-none">Right</button>
  52. </div>
  53. -->
  54. <!--
  55. <div class="relative inline-flex align-middle fixed-bottom button-group">
  56. <button type="button" @click="godashbord" class="btn btn-dark ltr:rounded-r-none rtl:rounded-l-none">Left</button>
  57. <button type="button" @click="godashbord" class="btn btn-dark rounded-none">Middle</button>
  58. <button type="button" class="btn btn-dark ltr:rounded-l-none rtl:rounded-r-none">Right</button>
  59. </div> -->
  60. </template>
  61. <script lang="ts" setup>
  62. import { ref, computed, onMounted, inject } from 'vue'; // Added onMounted here
  63. import { useAppStore } from '@/stores/index';
  64. import { useMeta } from '@/composables/use-meta';
  65. import router from '@/router';
  66. import { AxiosInstance } from 'axios';
  67. const $axios = inject('axios') as AxiosInstance;
  68. const cols: any = ref([
  69. { path: 'InventoryList', title: '库存列表', },
  70. { path: 'locationList', title: '库位管理'},
  71. { path: 'InventoryLoss', title: '库存报损'},
  72. { path: 'warehouseList', title: '仓库列表'},
  73. { path: 'locationArea', title: '库位区域'},
  74. /* { path: 'order_vo.pay_type', title: '冻结列表'},
  75. { path: 'orderList', title: '订单列表' },
  76. { path: 'actions', title: '售后列表'},
  77. { path: 'actions', title: '商品列表'} */
  78. ]);
  79. const godashbord = () => {
  80. router.push(({ path: '/' }))
  81. }
  82. const goPageList = (item?: any) => {
  83. router.replace({
  84. name: item.path,
  85. });
  86. }
  87. useMeta({ title: 'Chat' });
  88. const store = useAppStore();
  89. const isShowUserChat = ref(false);
  90. const isShowChatMenu = ref(false);
  91. const loginUser = ref({
  92. id: 0,
  93. name: 'Alon Smith',
  94. path: 'profile-34.jpeg',
  95. designation: 'Software Developer',
  96. });
  97. const fetchData = async () => {
  98. try {
  99. const response = await $axios.get('/api-endpoint');
  100. console.log('API Response:', response.data);
  101. } catch (error) {
  102. console.error('API Error:', error);
  103. }
  104. };
  105. // 在组件加载时调用 fetchData
  106. onMounted(() => {
  107. /* fetchData(); */
  108. });
  109. </script>
  110. <style>
  111. .btn {
  112. width: 100px;
  113. }
  114. .button-group {
  115. position: fixed;
  116. bottom: 0;
  117. left: 0;
  118. width: 100%;
  119. display: flex;
  120. justify-content: center;
  121. z-index: 1000;
  122. /* 确保按钮组在其他内容之上 */
  123. }
  124. </style>