Răsfoiți Sursa

4.20 下班之前上传

liuqiao 1 an în urmă
părinte
comite
5589122a9f
3 a modificat fișierele cu 68 adăugiri și 31 ștergeri
  1. 51 25
      src/view/index/htmldialog.vue
  2. 7 2
      src/view/index/index.vue
  3. 10 4
      src/view/index/tow-right.vue

+ 51 - 25
src/view/index/htmldialog.vue

@@ -27,7 +27,7 @@
         <!-- <p class="htmlclass_txte">水位:{{ item.value }}</p> -->
       </div>
       <div class="dialog-footer footer_div l_btn">
-        <div class="footerbtn flex1">
+        <!-- <div class="footerbtn flex1">
           <div class="borderimg">
             <el-button
               ><a
@@ -39,41 +39,54 @@
               ></el-button
             >
           </div>
+        </div> -->
+        <div class="footerbtn flex1">
+          <div class="borderimg">
+            <el-button @click="tiaozhuan('1')"> 内部查看</el-button
+            >
+          </div>
         </div>
         <div class="footerbtn flex1">
           <div class="borderimg">
-            <el-button>
-              <a
-                class="tiaozhaun"
-                :href="jghrfe2"
-                rel="external nofollow"
-                target="_blank"
-                >外部查看</a
-              >
-            </el-button>
+            <el-button @click="tiaozhuan('0')"> 外部查看</el-button
+            >
           </div>
         </div>
       </div>
     </el-dialog>
-    <!-- <div class="xuandian">
-        <h4>3D选点</h4>
-        <div class="htmlclass_content">
-            <p class="htmlclass_txte">水位:</p>
+  </div>
+  <el-dialog
+      width="54%"
+      v-model="iframeshow"
+      :modal="false"
+      align-center
+      :close-on-click-modal="false"
+      :append-to-body="true"
+      draggable
+      modal-class="summary-dlg"
+      class=" log_class bgcolor tianjia asideg asidegbg leftbgimg"
+    >
+      <template #header="{ titleId, titleClass }">
+        <div class="my-header">
+          <h4 class="telet" :id="titleId" :class="titleClass">局部</h4>
         </div>
-        <div class="dialog-footer footer_div l_btn">
-          <div class="footerbtn flex1">
-            <div class="borderimg">
-              <el-button @click="htmldialogshow = false">内部查看</el-button>
-            </div>
+      </template>
+      <div>
+        <iframe :src="ifr" width="100%" height="630px" frameborder="0"></iframe>
+      </div>
+      <!-- <div class="dialog-footer footer_div l_btn">
+        <div class="footerbtn flex1">
+          <div class="borderimg">
+            <el-button @click="iframeshow = false">取消</el-button>
           </div>
-          <div class="footerbtn flex1">
-            <div class="borderimg">
-              <el-button @click="htmldialogshow=false"> 外部查看 </el-button>
-            </div>
+        </div>
+        <div class="footerbtn flex1">
+          <div class="borderimg">
+            <el-button @click="iframeshow = false"> 确定 </el-button>
           </div>
         </div>
-    </div> -->
-  </div>
+      </div> -->
+    </el-dialog>
 </template>
 <script setup>
 import { ref, onMounted, reactive } from "vue";
@@ -87,12 +100,15 @@ let buntext = ref("3D选点");
 let htmldialogshow = ref(false);
 let msgval = ref([]);
 let water = ref();
+let iframeshow=ref(false);
+let ifr=ref();
 const props = defineProps({
   isshow: {
     type: Boolean,
     // required: true,
   },
 });
+
 let jghrfe=ref();
 let jghrfe2=ref();
 const getdatahtml = (val) => {
@@ -102,6 +118,16 @@ const getdatahtml = (val) => {
   jghrfe2="../../../../static/index.html?camera=0&water="+ water.value;
   msgval.value = val;
 };
+const tiaozhuan = (val) => {
+  if(val=='1'){
+    ifr.value=jghrfe;
+ 
+  }else{
+    ifr.value=jghrfe2;
+  }
+  iframeshow.value=true;
+
+}
 const closeDialog = () => {
   htmldialogshow.value = false;
   emit("funidshow", false);

+ 7 - 2
src/view/index/index.vue

@@ -11,7 +11,7 @@
         </ul>
     </div>
     <firstLeft ref="firstleftref"   :classradio="props.classradio" />
-    <towright ref="towrightref"  />
+    <towright ref="towrightref"/>
      </template>
    <script setup>
 import { ref, onMounted, reactive, } from "vue";
@@ -58,7 +58,12 @@ const changeColor=(index)=>{
    emit("indexchange", btnindex.value);
     if(btnindex.value==0){
         emit("hiadden", 1);
-    }else{
+    }else if(btnindex.value==1){
+      emit("hiadden", 5);
+      towrightref.value.huoaid(props.aid);
+   
+    }
+    else{
         emit("hiadden", 5);
     }
    

+ 10 - 4
src/view/index/tow-right.vue

@@ -25,7 +25,7 @@
           </el-collapse-item>
         </el-collapse>
 
-        <el-button type="" @click="getWayResult()" >测试</el-button>
+        <!-- <el-button type="" @click="getWayResult()" >测试</el-button> -->
       </div>
     </el-aside>
   </div>
@@ -46,16 +46,21 @@ let listArray = ref([
   { id: 0, name: "危险路径", img: bt1 },
   { id: 1, name: "安全路径", img: bt2 },
 ]);
-defineExpose({ towshow });
 
-let aid = 7;
+
+let aid =ref();
 onMounted(() => {
 
 });
+const huoaid=(id)=>{
+  aid.value=id;
+
+  getWayResult();
+}
 async function getWayResult() {
   const params = {
     transCode: "D10036",
-    aid: aid,
+    aid: aid.value,
   };
   await request(params)
     .then((res) => {
@@ -79,5 +84,6 @@ async function getWayResult() {
       }
     });
 }
+defineExpose({ towshow,huoaid });
 </script>
 <style scoped></style>