showDownHole.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <!-- 完成说明 -->
  2. <script setup lang="ts">
  3. import { onMounted, watch, ref } from 'vue';
  4. import { courseChapter3dShow } from "@/stores/courseChapter3dShow.ts";
  5. import { studentTaskFoundationAdd, studentTaskFoundationGetByStudentTaskId } from "@/api/studentTaskFoundation.ts";
  6. // watch(
  7. // () => courseChapter3dShow().show.showCongratulationsViewBool,
  8. // (newVal, oldVal) => {
  9. // }
  10. // );
  11. const submitEvent = () => {
  12. // console.log(
  13. // "courseChapter3dShow().show.showDownHoleConfig ===",
  14. // courseChapter3dShow().show.showDownHoleConfig
  15. // );
  16. // 先进行验证字段是否都填写完成
  17. for (let key in courseChapter3dShow().show.showDownHoleConfig) {
  18. let val = courseChapter3dShow().show.showDownHoleConfig[key];
  19. // console.log("填写提交的内容", key, val);
  20. if (val == null || val == undefined || val == '' || val == ' ') {
  21. courseChapter3dShow().show.showPromptEvent(
  22. "请填写下井信息,才可以进行下一步",
  23. null,
  24. function(res : any) {
  25. // console.log("yes", res);
  26. }
  27. );
  28. return;
  29. }
  30. }
  31. courseChapter3dShow().show.showDownHoleViewOpen = false;
  32. if (typeof courseChapter3dShow().show.showDownHoleCallback == 'function') {
  33. courseChapter3dShow().show.showDownHoleCallback("yes");
  34. }
  35. }
  36. </script>
  37. <template>
  38. <div class="showDownHole">
  39. <img class="exit" src="../../../assets/downHole/Union.webp" @click="submitEvent()" />
  40. <img class="topTitleImg" src="../../../assets/downHole/dy.webp" />
  41. <div class="title" >下井信息录入</div>
  42. <div class="inputMain" >
  43. <div class="edit" >
  44. <div class="editLeft">任务名称/编号:</div>
  45. <div class="editRight">
  46. <input class="newInput" type="text" v-model="courseChapter3dShow().show.showDownHoleConfig.taskName"
  47. placeholder="请输入 任务名称/编号" />
  48. </div>
  49. </div>
  50. <div class="edit" >
  51. <div class="editLeft">检测地点:</div>
  52. <div class="editRight">
  53. <input class="newInput" type="text" v-model="courseChapter3dShow().show.showDownHoleConfig.location"
  54. placeholder="请输入 检测地点" />
  55. </div>
  56. </div>
  57. <div class="edit" >
  58. <div class="editLeft">井号:</div>
  59. <div class="editRight">
  60. <input class="newInput" type="text" v-model="courseChapter3dShow().show.showDownHoleConfig.hashSign"
  61. placeholder="请输入 井号" />
  62. </div>
  63. </div>
  64. <div class="edit" >
  65. <div class="editLeft">检测方向:</div>
  66. <div class="editRight">
  67. <input class="newInput" type="text" v-model="courseChapter3dShow().show.showDownHoleConfig.detectionDirection"
  68. placeholder="请输入 检测方向" />
  69. </div>
  70. </div>
  71. <div class="edit" >
  72. <div class="editLeft">管道类型:</div>
  73. <div class="editRight">
  74. <input class="newInput" type="text" v-model="courseChapter3dShow().show.showDownHoleConfig.pipeType"
  75. placeholder="请输入 管道类型" />
  76. </div>
  77. </div>
  78. <div class="edit" >
  79. <div class="editLeft">材质:</div>
  80. <div class="editRight">
  81. <input class="newInput" type="text" v-model="courseChapter3dShow().show.showDownHoleConfig.material"
  82. placeholder="请输入 材质" />
  83. </div>
  84. </div>
  85. <div class="edit" >
  86. <div class="editLeft">管径:</div>
  87. <div class="editRight">
  88. <input class="newInput" type="text" v-model="courseChapter3dShow().show.showDownHoleConfig.pipeDiameter"
  89. placeholder="请输入 管径" />
  90. </div>
  91. </div>
  92. <div class="editBtn" @click="submitEvent()" >
  93. 提交信息
  94. </div>
  95. </div>
  96. </div>
  97. </template>
  98. <style lang="scss" scoped>
  99. $proportion : 0.8;
  100. .showDownHole * {
  101. -moz-user-select: none;
  102. -webkit-user-select: none;
  103. -ms-user-select: none;
  104. -khtml-user-select: none;
  105. user-select: none;
  106. /*固定宽度,设置内边距,不会影响宽度和高度的自增*/
  107. box-sizing:border-box;
  108. -moz-box-sizing:border-box; /* Firefox */
  109. -webkit-box-sizing:border-box; /* Safari */
  110. }
  111. .showDownHole {
  112. position: fixed;
  113. width: 54.92rem * $proportion;
  114. height: 54.21rem * $proportion;
  115. z-index: 1;
  116. top: 50%;
  117. left: 50%;
  118. margin: -27.105rem * $proportion 0px 0px -27.46rem * $proportion;
  119. background-image: url("../../../assets/downHole/bg.webp");
  120. -webkit-background-size: 100% 100%;
  121. -moz-background-size: 100% 100%;
  122. -o-background-size: 100% 100%;
  123. background-size: 100% 100%;
  124. background-position: center center;
  125. .exit {
  126. position: absolute;
  127. cursor:pointer;
  128. width: 1.71rem * $proportion;
  129. top: 1.64rem * $proportion;
  130. right: 2.5rem * $proportion;
  131. }
  132. .topTitleImg {
  133. position: absolute;
  134. width: 4.07rem * $proportion;
  135. left: 50%;
  136. margin: 0px 0px 0px -2.035rem * $proportion;
  137. top: 2.14rem * $proportion;
  138. }
  139. .title {
  140. position: absolute;
  141. z-index: 1;
  142. width: 100%;
  143. text-align: center;
  144. font-weight: 500;
  145. font-size: 2rem * $proportion;
  146. color: #87D9FE;
  147. top: 4.17rem * $proportion;
  148. }
  149. .inputMain {
  150. position: absolute;
  151. width: 87%;
  152. left: 6.5%;
  153. top: 9rem * $proportion;
  154. .edit {
  155. position: relative;
  156. width: 100%;
  157. height: 3.5rem * $proportion;
  158. margin: 1.57rem * $proportion 0px 1.57rem * $proportion 0px;
  159. background-image: url("../../../assets/downHole/edit.webp");
  160. -webkit-background-size: 100% 100%;
  161. -moz-background-size: 100% 100%;
  162. -o-background-size: 100% 100%;
  163. background-size: 100% 100%;
  164. background-position: center center;
  165. .editLeft, .editRight {
  166. position: absolute;
  167. height: 100%;
  168. top: 0px;
  169. line-height: 3.5rem * $proportion;
  170. }
  171. .editLeft {
  172. left: 0px;
  173. width: 29%;
  174. font-weight: 400;
  175. font-size: 1.28rem * $proportion;
  176. color: #CCD2DF;
  177. padding: 0px 0px 0px 1.35rem * $proportion;
  178. }
  179. .editRight {
  180. right: 0px;
  181. width: 71%;
  182. font-weight: 400;
  183. font-size: 1.28rem * $proportion;
  184. color: #FFFFFF;
  185. .newInput {
  186. /* 移除默认外观 */
  187. -webkit-appearance: none;
  188. -moz-appearance: none;
  189. appearance: none;
  190. /* 移除边框和轮廓 */
  191. border: none;
  192. outline: none;
  193. /* 移除默认内边距 */
  194. padding: 0;
  195. /* 继承字体样式 */
  196. font-family: inherit;
  197. font-size: inherit;
  198. line-height: inherit;
  199. /* 背景透明 */
  200. background: transparent;
  201. width: 100%;
  202. }
  203. .newInput::placeholder {
  204. color: #ebeaea;
  205. }
  206. }
  207. }
  208. .editBtn {
  209. position: relative;
  210. width: 14.21rem * $proportion;
  211. height: 3.5rem * $proportion;
  212. line-height: 3.5rem * $proportion;
  213. margin: 1.57rem * $proportion auto 1.57rem * $proportion auto;
  214. text-align: center;
  215. font-weight: 400;
  216. font-size: 1.28rem * $proportion;
  217. color: #FFFFFF;
  218. cursor:pointer;
  219. background-image: url("../../../assets/downHole/btn.webp");
  220. -webkit-background-size: 100% 100%;
  221. -moz-background-size: 100% 100%;
  222. -o-background-size: 100% 100%;
  223. background-size: 100% 100%;
  224. background-position: center center;
  225. }
  226. }
  227. }
  228. </style>