htmldialog.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <template>
  2. <!-- 加载html界面 -->
  3. <div v-show="htmldialogshow" class="htmlclass">
  4. <el-dialog
  5. width="300px"
  6. v-model="htmldialogshow"
  7. :modal="false"
  8. :close-on-click-modal="false"
  9. :append-to-body="true"
  10. draggable
  11. :fullscreen="false"
  12. :modal-append-to-body="false"
  13. modal-class="summary-dlg"
  14. @close="closeDialog"
  15. class="right log_class bgcolor tianjia asideg asidegbg leftbgimg"
  16. >
  17. <template #header="{ titleId, titleClass }">
  18. <div class="my-header">
  19. <h4 class="telet" :id="titleId" :class="titleClass">3D选点</h4>
  20. </div>
  21. </template>
  22. <div class="htmlclass_content" v-for="(item, i) in msgval" :key="i">
  23. <span class="htmlclass_txte" style="width: 150px; display: inline-block">{{
  24. item.name
  25. }}</span>
  26. <span class="htmlclass_txte">{{ item.value }}</span>
  27. <!-- <p class="htmlclass_txte">水位:{{ item.value }}</p> -->
  28. </div>
  29. <div class="dialog-footer footer_div l_btn">
  30. <!-- <div class="footerbtn flex1">
  31. <div class="borderimg">
  32. <el-button
  33. ><a
  34. class="tiaozhaun"
  35. :href="jghrfe"
  36. rel="external nofollow"
  37. target="_blank"
  38. >内部查看</a
  39. ></el-button
  40. >
  41. </div>
  42. </div> -->
  43. <div class="footerbtn flex1">
  44. <div class="borderimg">
  45. <el-button @click="tiaozhuan('1')"> 内部查看</el-button
  46. >
  47. </div>
  48. </div>
  49. <div class="footerbtn flex1">
  50. <div class="borderimg">
  51. <el-button @click="tiaozhuan('0')"> 外部查看</el-button
  52. >
  53. </div>
  54. </div>
  55. </div>
  56. </el-dialog>
  57. </div>
  58. <el-dialog
  59. width="54%"
  60. v-model="iframeshow"
  61. :modal="false"
  62. align-center
  63. :close-on-click-modal="false"
  64. :append-to-body="true"
  65. draggable
  66. modal-class="summary-dlg"
  67. class=" log_class bgcolor tianjia asideg asidegbg leftbgimg"
  68. >
  69. <template #header="{ titleId, titleClass }">
  70. <div class="my-header">
  71. <h4 class="telet" :id="titleId" :class="titleClass">局部</h4>
  72. </div>
  73. </template>
  74. <div>
  75. <iframe :src="ifr" width="100%" height="630px" frameborder="0"></iframe>
  76. </div>
  77. <!-- <div class="dialog-footer footer_div l_btn">
  78. <div class="footerbtn flex1">
  79. <div class="borderimg">
  80. <el-button @click="iframeshow = false">取消</el-button>
  81. </div>
  82. </div>
  83. <div class="footerbtn flex1">
  84. <div class="borderimg">
  85. <el-button @click="iframeshow = false"> 确定 </el-button>
  86. </div>
  87. </div>
  88. </div> -->
  89. </el-dialog>
  90. </template>
  91. <script setup>
  92. import { ref, onMounted, reactive } from "vue";
  93. import { RouterView, RouterLink } from "vue-router";
  94. import { request, uploadFile } from "@/utils/request";
  95. import { ElMessage, ElButton, ElDialog, ElSelect } from "element-plus";
  96. import { vtkmodel } from "@/control/vtkModel.js";
  97. import { createFireControl } from "@/control/fireControl.js";
  98. let emit = defineEmits(["funidshow"]);
  99. let buntext = ref("3D选点");
  100. let htmldialogshow = ref(false);
  101. let msgval = ref([]);
  102. let water = ref();
  103. let iframeshow=ref(false);
  104. let ifr=ref();
  105. const props = defineProps({
  106. isshow: {
  107. type: Boolean,
  108. // required: true,
  109. },
  110. });
  111. let jghrfe=ref();
  112. let jghrfe2=ref();
  113. const getdatahtml = (val) => {
  114. water.value = Number(val[0].value) / 4;
  115. console.log(water.value);
  116. jghrfe="../../../../static/index.html?camera=1&water="+ water.value;
  117. jghrfe2="../../../../static/index.html?camera=0&water="+ water.value;
  118. msgval.value = val;
  119. };
  120. const tiaozhuan = (val) => {
  121. if(val=='1'){
  122. ifr.value=jghrfe;
  123. }else{
  124. ifr.value=jghrfe2;
  125. }
  126. iframeshow.value=true;
  127. }
  128. const closeDialog = () => {
  129. htmldialogshow.value = false;
  130. emit("funidshow", false);
  131. };
  132. onMounted(() => {
  133. // arrowtimeStart();
  134. });
  135. watch(
  136. () => [props.isshow],
  137. (newVal, oldVal) => {
  138. if (newVal[0] == true) {
  139. htmldialogshow.value = true;
  140. } else {
  141. htmldialogshow.value = false;
  142. }
  143. },
  144. { deep: true }
  145. ); //深度监视
  146. defineExpose({ getdatahtml });
  147. </script>
  148. <style lang="scss" scoped></style>