diagnosisReportPopup.vue 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <template>
  2. <popup
  3. v-model:show="showValue"
  4. round
  5. teleport="body"
  6. class="diagnosis-report-popup"
  7. :z-index="20000"
  8. :close-on-click-overlay="true"
  9. >
  10. <img class="diagnosis-report-popup__image" src="@/assets/img/agricultural/report.png" alt="" />
  11. <div class="diagnosis-report-popup__title">
  12. <div>{{ t("agriFile.plantingDiagnosisReport") }}</div>
  13. <div>{{ t("agriFile.reportGenerated") }}</div>
  14. </div>
  15. <div class="diagnosis-report-popup__btn" @click="handleView">{{ t("agriFile.clickToView") }}</div>
  16. <div class="diagnosis-report-popup__hint">{{ t("agriFile.viewInDiagnosisHint") }}</div>
  17. </popup>
  18. </template>
  19. <script setup>
  20. import { computed } from "vue";
  21. import { Popup } from "vant";
  22. import { useI18n } from "@/i18n";
  23. const { t } = useI18n();
  24. const props = defineProps({
  25. show: {
  26. type: Boolean,
  27. default: false,
  28. },
  29. });
  30. const emit = defineEmits(["update:show", "confirm"]);
  31. const showValue = computed({
  32. get: () => props.show,
  33. set: (val) => emit("update:show", val),
  34. });
  35. const handleView = () => {
  36. emit("confirm");
  37. showValue.value = false;
  38. };
  39. </script>
  40. <style scoped lang="scss">
  41. .diagnosis-report-popup {
  42. width: 78%;
  43. padding: 90px 20px 22px;
  44. text-align: center;
  45. overflow: visible;
  46. background: linear-gradient(360deg, #FFFFFF 0%, #D3EBFF 100%);
  47. &__image {
  48. display: block;
  49. width: 138px;
  50. height: 138px;
  51. margin: 0 auto 16px;
  52. position: absolute;
  53. top: -54px;
  54. left: 50%;
  55. transform: translateX(-50%);
  56. }
  57. &__title {
  58. font-size: 30px;
  59. color: #010101;
  60. line-height: 32px;
  61. div{
  62. font-family: "pangmenzhengdao";
  63. }
  64. }
  65. &__btn {
  66. width: 162px;
  67. margin: 18px auto 10px;
  68. padding: 8px 0;
  69. border-radius: 25px;
  70. background: linear-gradient(180deg, #96D1FF 0%, #2199F8 100%);
  71. color: #fff;
  72. font-size: 16px;
  73. }
  74. &__hint {
  75. color: #1D1919;
  76. }
  77. }
  78. </style>