LabelCasePopup.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <template>
  2. <MenuCard class="label-case" :menuData="menuData">
  3. <div class="label-case-inner">
  4. <div class="header">
  5. <div class="header-title">名称 :</div>
  6. <div class="header-input">
  7. <input type="text" v-model="nameInput" />
  8. </div>
  9. </div>
  10. <div class="top">
  11. <div class="top-title">标记点分类 :</div>
  12. <select class="top-select" v-model="selectVal">
  13. <option value="土地资源">土地资源</option>
  14. <option value="林业资源">林业资源</option>
  15. <option value="水资源">水资源</option>
  16. </select>
  17. </div>
  18. <div class="area">
  19. 面积 :&nbsp;&nbsp;
  20. <span v-if="targetArea === 0 || targetArea === ''">0</span>
  21. <span v-else>{{ targetArea }}</span>
  22. </div>
  23. <div class="distance">
  24. 距离:&nbsp;&nbsp;
  25. <span v-if="targetDistance === 0 || !targetDistance">0</span>
  26. <span v-else>{{ parseFloat(targetDistance).toFixed(2) }}&nbsp;米</span>
  27. </div>
  28. <div class="center">
  29. <div class="center-title">描述 :</div>
  30. <div class="center-text">
  31. <textarea placeholder="请输入详细信息" v-model="textContent"></textarea>
  32. </div>
  33. </div>
  34. <div class="footer">
  35. <input type="button" value="取消" @click="cancelEvent" />
  36. <input type="button" value="保存" @click="saveEvent" />
  37. </div>
  38. </div>
  39. </MenuCard>
  40. </template>
  41. <script>
  42. import MenuCard from "@/components/layout/MenuCard.vue";
  43. /**
  44. * 标记疑点 - 辅助录入属性弹窗
  45. * @author: Gao Lu
  46. * @Date: 2022.11.22
  47. */
  48. export default {
  49. name: "LabelCasePopup",
  50. components: { MenuCard },
  51. props: ["targetArea", "targetDistance"],
  52. data() {
  53. return {
  54. nameInput: "",
  55. menuData: {
  56. type: "chart",
  57. title: "添加标记",
  58. boxWidth: "380",
  59. boxHeight: "300"
  60. },
  61. selectVal: "土地资源",
  62. textContent: "",
  63. id: null,
  64. geojson: ""
  65. };
  66. },
  67. methods: {
  68. cancelEvent() {
  69. this.$emit("close");
  70. },
  71. saveEvent() {
  72. this.$emit("save");
  73. }
  74. }
  75. };
  76. </script>
  77. <style lang="less" scoped>
  78. .label-case {
  79. position: relative;
  80. cursor: auto;
  81. pointer-events: auto;
  82. &-inner {
  83. width: 100%;
  84. height: 100%;
  85. font-size: 16px;
  86. font-family: PingFang SC;
  87. font-weight: 300;
  88. color: #e6e6e6;
  89. // line-height: 36px;
  90. .header {
  91. height: 15%;
  92. width: 100%;
  93. display: flex;
  94. align-items: center;
  95. justify-content: center;
  96. &-title {
  97. width: 37%;
  98. height: 100%;
  99. line-height: 37px;
  100. }
  101. &-input {
  102. width: 68%;
  103. height: 30px;
  104. input {
  105. height: 24px;
  106. background: none;
  107. border: 1px solid rgba(230, 230, 230, 0.8);
  108. border-radius: 3px;
  109. color: #fff;
  110. font-size: 14px;
  111. width: 165px;
  112. }
  113. // /deep/.el-input__inner {
  114. // width: 93%;
  115. // font-size: 15px;
  116. // height: 30px;
  117. // }
  118. }
  119. }
  120. .top {
  121. height: 13%;
  122. width: 100%;
  123. display: flex;
  124. align-items: center;
  125. justify-content: flex-start;
  126. &-title {
  127. width: 35%;
  128. height: 100%;
  129. line-height: 37px;
  130. }
  131. &-select {
  132. width: 60%;
  133. height: 30px;
  134. border: 1px solid #818ca4;
  135. border-radius: 4px;
  136. background: transparent;
  137. color: rgba(230, 230, 230, 1);
  138. cursor: pointer;
  139. &:focus {
  140. border: none;
  141. border-radius: 1px;
  142. }
  143. option {
  144. cursor: pointer;
  145. background-color: rgba(0, 39, 77, 0.8);
  146. box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
  147. border: 1px solid rgba(47, 184, 255, 0.7);
  148. }
  149. }
  150. }
  151. .area {
  152. height: 10%;
  153. width: 100%;
  154. display: flex;
  155. align-items: center;
  156. }
  157. .center {
  158. height: 40%;
  159. width: 100%;
  160. &-title {
  161. width: 100%;
  162. height: 30px;
  163. line-height: 30px;
  164. }
  165. &-text {
  166. width: 100%;
  167. height: calc(95% - 30px);
  168. & textarea {
  169. width: 100%;
  170. height: 100%;
  171. }
  172. }
  173. }
  174. .footer {
  175. margin: 0 auto;
  176. width: 50%;
  177. height: 13%;
  178. display: flex;
  179. align-items: center;
  180. justify-content: space-around;
  181. input {
  182. width: 50px;
  183. height: 25px;
  184. border-radius: 3px;
  185. border: none;
  186. cursor: pointer;
  187. color: #e6e6e6;
  188. }
  189. input:nth-child(1) {
  190. background: rgba(129, 140, 164, 1);
  191. }
  192. input:nth-child(2) {
  193. background-image: linear-gradient(to top, rgba(79, 172, 254, 1), rgba(0, 242, 254, 1));
  194. }
  195. }
  196. }
  197. }
  198. </style>