RightScreenshotBox.vue 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <template>
  2. <div class="right-screenshot-box">
  3. <ul>
  4. <li v-for="item in tools" :key="item.type" @click="captureSelection(item.type)">
  5. <icon :icon="item.icon" width="30" height="30"></icon>
  6. <span>{{ item.name }}</span>
  7. </li>
  8. </ul>
  9. </div>
  10. </template>
  11. <script setup>
  12. import { downLoadFile } from '@/utils'
  13. import { useOutsideSystemStore } from '@/stores/modules/system.js'
  14. const useSystem = useOutsideSystemStore()
  15. const { API_SCREENSHOT_GET } = useRequest()
  16. const tools = [
  17. // {
  18. // name: '选区截图',
  19. // icon: 'mingcute:screenshot-line',
  20. // type: 'xq'
  21. // },
  22. {
  23. name: '全景截图',
  24. icon: 'fluent:screenshot-20-regular',
  25. type: 'jt'
  26. }
  27. ]
  28. const captureSelection = (type) => {
  29. switch (type) {
  30. case 'jt':
  31. downLoadFile(API_SCREENSHOT_GET, { UUID: useSystem.qjUUID })
  32. break
  33. }
  34. }
  35. </script>
  36. <style scoped lang="scss">
  37. .right-screenshot-box {
  38. ul {
  39. display: grid;
  40. grid-template-columns: repeat(1, 70px);
  41. grid-template-rows: repeat(auto-fill, 70px);
  42. gap: 15px;
  43. li {
  44. border: 1px solid rgba(138, 197, 255, 0.4);
  45. display: flex;
  46. flex-direction: column;
  47. justify-content: center;
  48. align-items: center;
  49. cursor: pointer;
  50. }
  51. }
  52. }
  53. </style>