SetNode.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. <template>
  2. <div>
  3. <el-dialog
  4. width="300px"
  5. v-model="dialoglog"
  6. :modal="false"
  7. :close-on-click-modal="false"
  8. :append-to-body="true"
  9. draggable
  10. :fullscreen="false"
  11. :modal-append-to-body="false"
  12. modal-class="summary-dlg"
  13. @close='closeDialog'
  14. class="right log_class bgcolor tianjia asideg asidegbg leftbgimg"
  15. >
  16. <template #header="{ titleId, titleClass }">
  17. <div class="my-header">
  18. <el-image :src="icon" fit="contain"></el-image>
  19. <h4 :id="titleId" :class="titleClass">{{ texttitle }}</h4>
  20. </div>
  21. </template>
  22. <div class="mgstamkuang">
  23. <ul>
  24. <li><span>节点编号:</span>{{msg.id}}</li>
  25. <li><span>名称:</span>{{msg.name}}</li>
  26. <li><span>X:</span>{{msg.x}}</li>
  27. <li><span>y:</span>{{msg.y}}</li>
  28. <li><span>Z:</span>{{msg.z}}</li>
  29. </ul>
  30. </div>
  31. <div class="dialog-footer footer_div l_btn">
  32. <div class="footerbtn flex1">
  33. <div class="borderimg">
  34. <el-button @click=" closeDialog();dialoglog = false">取消</el-button>
  35. </div>
  36. </div>
  37. <div class="footerbtn flex1">
  38. <div class="borderimg">
  39. <el-button @click="textclick(); dialoglog = false"> 确定 </el-button>
  40. </div>
  41. </div>
  42. </div>
  43. </el-dialog>
  44. </div>
  45. </template>
  46. <script setup>
  47. import { ref, onMounted, onBeforeUnmount,reactive,onUnmounted } from "vue";
  48. import { RouterView, RouterLink } from "vue-router";
  49. import { request, uploadFile } from "@/utils/request";
  50. import { ElMessage, ElButton, ElDialog, ElSelect } from "element-plus";
  51. import icon from "@/assets/img/icon.png";
  52. import { vtkmodel } from "@/control/vtkModel.js";
  53. let emit = defineEmits(['Dtext',])
  54. let dialoglog = ref(false);
  55. let texttitle = ref("节点信息");
  56. let msg=ref({
  57. id: '',
  58. name: "",
  59. x:"",
  60. y: '',
  61. z: '',
  62. })
  63. let state=ref();
  64. defineExpose({ dialoglog,jgSelect});
  65. let timing = ref(null);
  66. //管道节点选择对象
  67. let selectObj = ref(null);
  68. const textclick=()=>{
  69. emit('Dtext',selectObj.value);
  70. state.value=sessionStorage.getItem("state");
  71. if(state.value=='1'){
  72. vtkmodel.clearModeAddJg();
  73. }else{
  74. vtkmodel.selectNoting();
  75. }
  76. clearInterval(timing.value);
  77. }
  78. const closeDialog=()=>{
  79. state.value=sessionStorage.getItem("state");
  80. console.log( state.value);
  81. if(state.value=='1'){
  82. vtkmodel.clearModeAddJg();
  83. }else{
  84. vtkmodel.selectNoting();
  85. }
  86. clearInterval(timing.value);
  87. }
  88. onBeforeUnmount(() => {
  89. clearInterval(timing.value);
  90. });
  91. onMounted(() => {
  92. });
  93. onUnmounted(() => {
  94. clearInterval(timing.value);
  95. })
  96. //选择结果定时器
  97. function jgSelect(){
  98. timing.value = setInterval(() => {//定时器
  99. selectObj.value=vtkmodel.selectObj;
  100. if(selectObj.value==null){
  101. }else{
  102. msg.value=selectObj.value;
  103. }
  104. }, 200);
  105. }
  106. </script>
  107. <style lang="scss" scoped>
  108. .vtk {
  109. position: absolute;
  110. z-index: 150;
  111. top: 70px;
  112. }
  113. .jc_padding .el-table tr {
  114. height: 30px !important;
  115. background: rgba(104, 173, 255, 0.3);
  116. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  117. border-radius: 0px 0px 0px 0px;
  118. border: 1px solid;
  119. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1
  120. 1;
  121. }
  122. .flex_a {
  123. flex: 1;
  124. padding: 0 19px;
  125. }
  126. .btns {
  127. width: 72px;
  128. height: 30px;
  129. background-image: url(../../assets/img/Rectangle399.png);
  130. background-repeat: no-repeat;
  131. line-height: 30px;
  132. overflow: hidden;
  133. margin: 10px 0;
  134. .spantext {
  135. font-weight: bold;
  136. font-size: 12px;
  137. color: #ffffff;
  138. text-align: left;
  139. font-style: normal;
  140. text-transform: none;
  141. }
  142. }
  143. .header_z {
  144. box-shadow: none !important;
  145. padding: 10px 20px !important;
  146. }
  147. .header_l {
  148. line-height: 10px;
  149. text-align: left;
  150. padding: 0 20px;
  151. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1
  152. 1;
  153. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  154. border-radius: 0px 0px 0px 0px;
  155. .el-image {
  156. padding: 10px 10px 0 0;
  157. }
  158. h4 {
  159. font-weight: bold;
  160. font-size: 12px;
  161. color: #68adff;
  162. line-height: 14px;
  163. text-align: left;
  164. font-style: normal;
  165. text-transform: none;
  166. }
  167. }
  168. .jc_padding {
  169. padding: 18px 10px;
  170. }
  171. .line {
  172. border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  173. box-sizing: border-box;
  174. }
  175. .L_aside {
  176. .iconimg {
  177. width: 37px;
  178. height: 36px;
  179. margin: 0 7px 0 24px;
  180. }
  181. }
  182. .ddd {
  183. margin-top: 20px;
  184. .ddd_div {
  185. padding: 20px 0;
  186. position: relative;
  187. }
  188. .class_btn {
  189. position: absolute;
  190. right: 0;
  191. top: 21px;
  192. }
  193. .header_l {
  194. line-height: 10px;
  195. text-align: left;
  196. padding: 0 20px;
  197. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48))
  198. 1 1;
  199. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  200. border-radius: 0px 0px 0px 0px;
  201. .el-image {
  202. padding: 10px 10px 0 0;
  203. }
  204. h4 {
  205. font-weight: bold;
  206. font-size: 12px;
  207. color: #68adff;
  208. line-height: 14px;
  209. text-align: left;
  210. font-style: normal;
  211. text-transform: none;
  212. }
  213. }
  214. }
  215. .el-dialog__title {
  216. display: inline-block;
  217. }
  218. .bgcolor {
  219. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  220. border-radius: 0px 0px 0px 0px;
  221. border: 1px solid;
  222. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1
  223. 1;
  224. }
  225. .log_class {
  226. .my-header {
  227. line-height: 10px;
  228. height: 40px;
  229. text-align: left;
  230. padding: 0 20px;
  231. border-bottom: 1px solid;
  232. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48))
  233. 1 1;
  234. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  235. border-radius: 0px 0px 0px 0px;
  236. .el-image {
  237. padding: 0px 10px 0 0;
  238. }
  239. h4 {
  240. font-weight: bold;
  241. font-size: 12px;
  242. color: #68adff;
  243. line-height: 14px;
  244. text-align: left;
  245. font-style: normal;
  246. text-transform: none;
  247. margin-top: 8px;
  248. }
  249. }
  250. .my_content {
  251. width: 100%;
  252. height: 90px;
  253. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  254. border-radius: 0px 0px 0px 0px;
  255. position: relative;
  256. .radio-group {
  257. display: flex;
  258. justify-content: center;
  259. .el-radio {
  260. flex: 1;
  261. justify-content: center;
  262. font-weight: bold;
  263. font-size: 12px;
  264. color: #ffffff;
  265. line-height: 14px;
  266. }
  267. }
  268. }
  269. .el-dialog__footer {
  270. position: absolute;
  271. bottom: 17px;
  272. display: flex;
  273. .footerbtn {
  274. flex: 1;
  275. text-align: center;
  276. }
  277. }
  278. }
  279. .my_content1 {
  280. .el-table .cell {
  281. font-weight: 400;
  282. font-size: 12px;
  283. color: #ffffff !important;
  284. line-height: 14px;
  285. text-align: left;
  286. font-style: normal;
  287. text-transform: none;
  288. }
  289. }
  290. .borderimg {
  291. width: 109px;
  292. height: 30px;
  293. background: rgba(104, 173, 255, 0.3);
  294. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  295. /* border: 1px solid rgba(31, 107, 255, 1); */
  296. -o-border-image: linear-gradient(
  297. 180deg,
  298. rgba(31, 107, 255, 1),
  299. rgba(31, 107, 255, 0.48)
  300. )
  301. 1 1;
  302. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1
  303. 1;
  304. border-radius: 4px;
  305. display: flex;
  306. display: inline-block;
  307. box-sizing: border-box;
  308. }
  309. .el-table,
  310. .el-table thead th {
  311. background-color: rgba(13, 22, 57, 0.96) !important;
  312. }
  313. .el-form-item__label {
  314. color: #ffffff !important;
  315. }
  316. .jiancedian {
  317. width: 380px;
  318. position: absolute;
  319. right: 0;
  320. top: 70px;
  321. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  322. border-radius: 4px 4px 4px 4px;
  323. border: 1px solid;
  324. border-image: linear-gradient(180deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0.48)) 1
  325. 1;
  326. }
  327. </style>
  328. <style>
  329. .log_class {
  330. background-color: rgba(13, 22, 57, 0.96) !important;
  331. }
  332. .right {
  333. right: 0px;
  334. position: absolute;
  335. top: -7vh;
  336. }
  337. </style>