MarkHeader.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <div
  3. class="
  4. tw-flex tw-gap-4 tw-justify-between tw-items-center
  5. header-container
  6. tw-px-1
  7. "
  8. v-if="store.setting"
  9. >
  10. <div>
  11. {{
  12. `${store.setting.subject.code ?? ""}-${
  13. store.setting.subject.name ?? ""
  14. }`
  15. }}
  16. </div>
  17. <div class="tw-flex tw-gap-1">
  18. <div>
  19. 编号<span class="highlight-text">{{
  20. store.currentTask?.secretNumber
  21. }}</span>
  22. </div>
  23. </div>
  24. <ZoomPaper v-if="isScanImage()" :store="store" />
  25. <a-popover
  26. v-if="isScanImage()"
  27. title="小助手"
  28. trigger="hover"
  29. class="tw-cursor-pointer"
  30. >
  31. <template #content>
  32. <table class="assistant-table">
  33. <tr v-if="store.setting.subject.paperUrl">
  34. <td>试卷</td>
  35. <td>
  36. <a-switch
  37. v-model:checked="store.setting.uiSetting['paper.modal']"
  38. />
  39. </td>
  40. </tr>
  41. <tr v-if="store.setting.subject.answerUrl">
  42. <td>答案</td>
  43. <td>
  44. <a-switch
  45. v-model:checked="store.setting.uiSetting['answer.modal']"
  46. />
  47. </td>
  48. </tr>
  49. <tr>
  50. <td>缩略图</td>
  51. <td>
  52. <a-switch
  53. v-model:checked="store.setting.uiSetting['minimap.modal']"
  54. />
  55. </td>
  56. </tr>
  57. </table>
  58. </template>
  59. <div class="tw-flex">
  60. 小助手
  61. <DownOutlined
  62. style="font-size: 12px; display: inline-block"
  63. class="tw-self-center tw-ml-1"
  64. />
  65. </div>
  66. </a-popover>
  67. <div class="tw-flex tw-place-items-center">
  68. <UserOutlined class="icon-font icon-with-text" />{{
  69. store.setting.userName
  70. }}
  71. </div>
  72. <div
  73. class="tw-flex tw-place-items-center tw-cursor-pointer"
  74. @click="closeWindow"
  75. >
  76. <PoweroffOutlined class="icon-font icon-with-text" />关闭
  77. </div>
  78. </div>
  79. </template>
  80. <script setup lang="ts">
  81. import { store, isScanImage } from "@/features/mark/store";
  82. import {
  83. UserOutlined,
  84. PoweroffOutlined,
  85. DownOutlined,
  86. } from "@ant-design/icons-vue";
  87. import ZoomPaper from "@/components/ZoomPaper.vue";
  88. const closeWindow = async () => {
  89. window.close();
  90. };
  91. </script>
  92. <style scoped>
  93. .header-container {
  94. position: relative;
  95. font-size: 16px;
  96. height: 40px;
  97. background-color: #5d6d7d;
  98. color: white;
  99. }
  100. .highlight-text {
  101. color: #ffe400;
  102. }
  103. .icon-font {
  104. display: block;
  105. }
  106. .icon-with-text {
  107. font-size: 18px;
  108. line-height: 18px;
  109. }
  110. </style>