DialogModel1.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <template>
  2. <el-dialog
  3. class="my-dialog"
  4. fullscreen
  5. append-to-body
  6. destroy-on-close
  7. :model-value="showDialog"
  8. @close="closeDialog()"
  9. >
  10. <div class="dialog-box">
  11. <div class="title">
  12. <div class="name">农事方案</div>
  13. <div class="close cursor-pointer" @click="closeDialog"></div>
  14. </div>
  15. <div class="my-body"></div>
  16. </div>
  17. </el-dialog>
  18. </template>
  19. <script setup>
  20. import {reactive, ref, toRefs, computed, nextTick, onMounted} from "vue";
  21. import {useStore} from "vuex";
  22. import {WKT} from "ol/format";
  23. const emit = defineEmits(["closeDialog","success"])
  24. const store = useStore();
  25. const props = defineProps({
  26. showDialog: {
  27. type: Boolean,
  28. default: true,
  29. },
  30. });
  31. const formRef = ref(null);
  32. const {title, rowData} = toRefs(props);
  33. const closeDialog = () => {
  34. emit("closeDialog", "pdf");
  35. };
  36. /**表单验证规则
  37. * @description:
  38. * @param {*} computed
  39. * @return {*}
  40. */
  41. const rules = computed(() => ({
  42. name: [
  43. {
  44. required: true,
  45. message: "请录入药品名称",
  46. trigger: "change",
  47. },
  48. ]
  49. }));
  50. const form = reactive({
  51. name:null,
  52. type:1,
  53. })
  54. /**
  55. * @description:提交表单
  56. * @param {*}
  57. * @return {*}
  58. */
  59. const onSubmit = () => {
  60. };
  61. </script>
  62. <style lang="scss" >
  63. $title-height:44px;
  64. $body-height:calc(100% - $title-height);
  65. .my-dialog{
  66. background-color: #F4F4F400;
  67. }
  68. .dialog-box{
  69. font-family: PingFangSC-Regular, PingFang SC;
  70. position: absolute;
  71. left: 33%;
  72. right: 33%;
  73. top:10%;
  74. bottom:10%;
  75. background: rgba(1,17,22,0.8);
  76. box-shadow: 0px 0px 20px 0px #00FFF0;
  77. border-radius: 4px;
  78. border: 2px solid rgba(81,233,240,0.6);
  79. .title{
  80. width: 100%;
  81. height: $title-height;
  82. box-sizing: border-box;
  83. background: rgba(0,77,101,0.8);
  84. border-radius: 4px 4px 0px 0px;
  85. border-bottom: 2px solid rgba(81,233,240,0.3);
  86. display: flex;
  87. align-items: center;
  88. justify-content: space-between;
  89. .name{
  90. margin-left: 20px;
  91. font-size: 16px;
  92. font-weight: 600;
  93. color: #00FFF0;
  94. height: 22px;
  95. }
  96. .close{
  97. margin-right: 20px;
  98. width: 16px;
  99. height: 16px;
  100. background-image: url("@/assets/img/close.png");
  101. background-size: 100% 100%;
  102. }
  103. }
  104. .my-body{
  105. width: 100%;
  106. height: $body-height;
  107. box-sizing: border-box;
  108. padding: 21px;
  109. }
  110. }
  111. </style>