surveyAskPopup.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <template>
  2. <Popup
  3. v-model:show="showValue"
  4. round
  5. position="center"
  6. teleport="body"
  7. :z-index="20000"
  8. class="survey-ask-popup"
  9. :close-on-click-overlay="true"
  10. >
  11. <img class="survey-ask-popup__badge" src="@/assets/img/agricultural/ask-bg.png" alt="" />
  12. <img class="survey-ask-popup__illust" src="@/assets/img/agricultural/ask.png" alt="" />
  13. <div class="survey-ask-popup__title">{{ t("workExecute.fillSurvey") }}</div>
  14. <div class="survey-ask-popup__desc">{{ t("workExecute.fillSurveyDesc") }}</div>
  15. <div class="survey-ask-popup__btn" @click="handleFill">{{ t("workExecute.fillNow") }}</div>
  16. </Popup>
  17. </template>
  18. <script setup>
  19. import { computed } from "vue";
  20. import { Popup } from "vant";
  21. import { useI18n } from "@/i18n";
  22. const { t } = useI18n();
  23. const props = defineProps({
  24. show: {
  25. type: Boolean,
  26. default: false,
  27. },
  28. });
  29. const emit = defineEmits(["update:show", "confirm"]);
  30. const showValue = computed({
  31. get: () => props.show,
  32. set: (val) => emit("update:show", val),
  33. });
  34. const handleFill = () => {
  35. emit("confirm");
  36. showValue.value = false;
  37. };
  38. </script>
  39. <style lang="scss">
  40. .survey-ask-popup.van-popup {
  41. width: 300px;
  42. padding: 28px 20px 24px;
  43. text-align: center;
  44. overflow: visible;
  45. background: #fff;
  46. box-sizing: border-box;
  47. }
  48. .survey-ask-popup__badge {
  49. position: absolute;
  50. top: -18px;
  51. left: -10px;
  52. width: 128px;
  53. height: auto;
  54. pointer-events: none;
  55. z-index: 1;
  56. }
  57. .survey-ask-popup__illust {
  58. display: block;
  59. width: 148px;
  60. height: auto;
  61. margin: 12px auto 18px;
  62. }
  63. .survey-ask-popup__title {
  64. font-size: 24px;
  65. color: #000;
  66. line-height: 28px;
  67. font-family: "PangMenZhengDao";
  68. }
  69. .survey-ask-popup__desc {
  70. margin-top: 6px;
  71. font-size: 22px;
  72. color: #000;
  73. line-height: 28px;
  74. font-family: "PangMenZhengDao";
  75. }
  76. .survey-ask-popup__btn {
  77. height: 40px;
  78. line-height: 40px;
  79. border-radius: 25px;
  80. background: #2199f8;
  81. color: #fff;
  82. font-size: 16px;
  83. box-sizing: border-box;
  84. padding: 0 30px;
  85. width: fit-content;
  86. margin: 20px auto 0;
  87. }
  88. </style>