liuqiao před 9 měsíci
rodič
revize
57e8826ed9

+ 21 - 0
src/style/style.css

@@ -19,6 +19,26 @@ body,html{
   .maopading{
     padding: 20px;
   }
+  .re_tele1{
+
+  }
+  .re_tele1 .btn{
+    position: absolute;
+    right: 0;
+    top:13px;
+    width: 0.401rem;
+    height: 26px;
+    text-align: center;
+    line-height: 26px;
+    text-align: center;
+    font-family: Microsoft YaHei, Microsoft YaHei;
+    font-weight: 400;
+    font-size: 0.0625rem;
+    color: #FFFFFF;
+    font-style: normal;
+    text-transform: none;
+    background-image: linear-gradient(to right, #ACD6FF , #105CF0 );
+  }
   .maopading .radio .el-radio{
     color: #fff;
     display: inline-block;
@@ -1758,6 +1778,7 @@ font-size: .0833rem;
   padding:0 .0781rem .0781rem .0781rem ;
   display: flex;
   justify-content: space-between;
+  position: relative;
 }
 .zongjili{
   width: .4271rem;

+ 6 - 1
src/view/appmian.vue

@@ -307,12 +307,14 @@ const childfun = () => {
   boundary.value.addboundary(aid.value);
   sourcedis.value.accident3(activeIndex.value);
   boundary.value.accident4(activeIndex.value);
+  //indexref.value.changeColor(0);
 };
 const headerclick = (data) => {
   headerobj.value.name = data.name;
   headerobj.value.time = data.time;
   aid.value = data.aid;
   reheaderref.value.hname(data.name);
+
  // state.value=lliudialog.value.state;
 };
 //首页组件调用的方法
@@ -333,7 +335,7 @@ const vtkshowfuc= (key)=>{
 //清空灾情推演隐藏
  const hiadden= (key)=>{
     boundary.value.accident4(key);
-      sourcedis.value.accident3(key);
+    sourcedis.value.accident3(key);
     lliudialog.value.accident2(key);
  }
 const imgonclock=()=>{
@@ -342,6 +344,9 @@ const imgonclock=()=>{
 }
 const handleSelect = (key) => {
   // window.location.reload();
+ //indexref.value.changeColor("0")
+//  indexref.value.changeColor(0);
+//  indexref.value.clearconst();
  titleclick();
   activeIndeximg.value=key;
   bgk2false.value=true;

+ 50 - 17
src/view/components/MenuMine.vue

@@ -99,10 +99,10 @@
                                             <p>暂无数据</p>
                                             </template>
                                                   <el-table-column property="id" label="序号"  />
-                                            <el-table-column property="snId" label="开始节点" />
+                                            <!-- <el-table-column property="snId" label="开始节点" />
                                             <el-table-column property="enId" label="结束节点" />
-                                            <el-table-column property="code" label="编号" />
-                                            <el-table-column property="name" label="名称" width="150" />
+                                            <el-table-column property="code" label="编号" /> -->
+                                            <el-table-column property="name" label="名称"/>
                                             <el-table-column property="sectionType" label="截面类型" width="120" />
                                             <el-table-column property="roughCoe" label="粗糙系数" width="120"/>
                                             <el-table-column property="sectionPara1" label="截面参数1" width="90" />
@@ -648,7 +648,7 @@ let qxmobj=ref({
     val2:49,
     val3:24.5,
     val4:29.4,
-    val4:39.2,
+    val5:39.2,
 })
 let qtzhobj=ref({
     val1:88.2,
@@ -663,7 +663,7 @@ let zaiobj=ref({
     val3:29.4,
 })
 // 文件上传参数
-const radio1 = ref('1');
+const radio1 = ref('0');
 const gfx=ref();
 const inp=ref();
 let gid=ref("");
@@ -1286,7 +1286,13 @@ const fileboolen=(val)=>{
 const handleChange=(val)=>{
     //resourcechange();
   jsuanval.value=val;
-  calculatefun();
+  console.log(val);
+  if(zairadio.value=='0'){
+    falsecalculatefun();
+  }else{
+    calculatefun();
+  }
+
 }
 // 阻碍
 const zaihandleChange=(val)=>{
@@ -1308,11 +1314,15 @@ switch(resource.value){
     jsuanval.value=jisuanobj.value.val3;
     break;
     case '3':
-    jsuanval.value=jisuanobj.value.val3;
+    jsuanval.value=jisuanobj.value.val4;
     break;
 
 }
-calculatefun()
+if(zairadio.value=='0'){
+    falsecalculatefun();
+  }else{
+    calculatefun();
+  }
 }
 // 砌碹巷道
 const resourcechange2=(val)=>{
@@ -1334,7 +1344,11 @@ switch(resource.value){
     jsuanval.value=qxmobj.value.val5;
     break;
 }
-calculatefun()
+if(zairadio.value=='0'){
+    falsecalculatefun();
+  }else{
+    calculatefun();
+  }
 }
 // 障碍物
 const zaireschange=(val)=>{
@@ -1354,6 +1368,14 @@ switch(zaires.value){
 console.log(  zuaival.value);
 calculatefun()
 }
+// 障碍为否是
+// 计算
+const falsecalculatefun=()=>{
+    let zonghe= parseFloat( jsuanval.value);
+    console.log(zonghe);
+    zuli.value.jsuan=zonghe/ 10000;
+}
+
 // 计算
 const calculatefun=()=>{
     let zonghe= parseFloat( jsuanval.value)+parseFloat( zuaival.value);
@@ -1361,11 +1383,20 @@ const calculatefun=()=>{
 }
 // 清空
 const zairadiochage1=()=>{
-    if(radio1.value=="0"||zairadio.value=='0'){
-        zuli.value.jsuan=null;
+    if(radio1.value=="0"){
+        zuli.value.jsuan='';
+        zuli.value.zidiny=guandaoobj.value.roughCoe;
+        console.log('jis'+zuli.value.jsuan);
      
-    }else{
+    }else if(radio1.value=="1"&&zairadio.value=='1'){
+        zuli.value.zidiny=null;
         calculatefun();
+
+    }else if(zairadio.value=='0'){
+        falsecalculatefun();
+    }
+    else{
+       calculatefun();
     }
   
 }
@@ -1382,18 +1413,20 @@ const maoqueding=()=>{
 sdialog.value.resistance = false;
 }
 const seltree=(val)=>{
-console.log(val);zulitext.value
+    zairadiochage1();
+    radio1.value='0';
+    zuli.value.jsuan='';
+    zuli.value.zidiny=  guandaoobj.value.roughCoe;
 if(val=='毛壁面'){
-    jsuanval.value=147.0;
+    jsuanval.value=58.8;
     zulitext.value='毛壁面'
     sdialog.value.resistance=true;
-    calculatefun();
-   
+   // calculatefun();
 }else if(val=='砌碹面'){
     jsuanval.value=29.4;
     zulitext.value='砌碹巷道'
     sdialog.value.resistance=true;
-    calculatefun();
+   // calculatefun();
 }else if(val=='其它支护'){
     zulitext.value='其它支护'
     sdialog.value.resistance=true;

+ 2 - 1
src/view/components/Menudisaster.vue

@@ -1,6 +1,6 @@
 <template>
     <!-- 报警设置-->
-    <div class="l_Dialog bou tablebk">
+    <div class="l_Dialog bou tablebk" v-show="idshow">
       <div class="common-layout" style="margin: 0" >
         <el-aside
           width="480px"
@@ -227,6 +227,7 @@ import baozha from "@/assets/img/baozha.png"
   import { timestampToTime } from '@/js/lindex.js';
   import NodeSelect from "./NodeLine.vue";
   let dialogVisible=ref(false);
+  let idshow=ref(false);
   let formLabelWidth6=ref(120)
   let xiugVisible=ref(false);
   const resultactiveName = ref("Water");

+ 25 - 4
src/view/index/first-left.vue

@@ -25,7 +25,6 @@
                 inactive-text="否"
               />
             </div>
-          
                 <div class="he_pading color1  wusele">
               <el-form-item label="物理量:" v-if="props.classradio == 'Fire'||props.classradio == 'Gass'">
                 <el-select 
@@ -51,6 +50,8 @@
               <div class="zongji">
                 <!-- <div class="zongjili img1">{{ warnin2 }}<span>个</span></div> -->
                 <div class="zongjili img2">{{ warnin}}<span>个</span></div>
+                <div class="re_tele1">
+            <div class="btn"  @click="downloadImg('')">生成报告</div></div>
               </div>
               <div class="asides_content">
                 <div class="jc_content tablecolor">
@@ -168,9 +169,9 @@
   </div>
   <div class="timedlgheader"  v-show="firstshow">
     <div class="timedlg" v-show="timeshow">
-      <div class="closeimg" @click="timeshow = false"><el-image :src="closeimg" fit="contain"
-         style="margin-top: -10px;"></el-image></div>
-    <h4 class="teletdq">指定时间:</h4>
+      <!-- <div class="closeimg" @click="timeshow = false"><el-image :src="closeimg" fit="contain"
+         style="margin-top: -10px;"></el-image></div> -->
+    <!-- <h4 class="teletdq">指定时间:</h4> -->
     <div class="resultime">
         <div class="time">{{ timeline }}</div>
       </div>
@@ -683,6 +684,25 @@ function sliderchange(val) {
 }
 const tableRowClassName=()=>{
 
+}
+function downloadImg(url, fileName) {
+  if(aid.value==null||aid.value==''||aid.value==undefined){
+    ElMessage.error('项目不存在');
+  }else{
+  let href="http://localhost:5173/api/TransServlet?channelNo=service&clientToken=e47b87eec69545559d1e81e56626da68&userId=5f06c8bc77234f969d13e160b54c27e3&"
+  const x = new window.XMLHttpRequest();
+  x.open('GET', url, true);
+  x.responseType = 'blob';
+  x.onload = () => {
+    const url = window.URL.createObjectURL(x.response);
+    const a = document.createElement('a');
+    a.href = href+'aid='+aid.value+"&transCode=D000017&"+'step='+fcon.step;
+    console.log( a.href );
+    a.download = fileName;
+    a.click();
+  };
+  x.send();
+}
 }
 //获取最大值的下标
 function firstOccurrenceOfMax(arr) {
@@ -1076,6 +1096,7 @@ defineExpose({firstshow,isshow,indexinit});
     text-align: left;
     font-style: normal;
     text-transform: none;
+    text-align: center; 
 }
 .teletdq{
   color: #fff;

+ 14 - 6
src/view/index/index.vue

@@ -50,7 +50,9 @@ let listArray = ref([
 let currentIndex=ref(0);
 let btnlistshow=ref(false);
 const changeColor=(index)=>{
+ 
     btnindex.value=index;
+    console.log( btnindex.value+'点击了');
     emit("vtkshowfuc", index);
     currentIndex.value = btnindex.value;
     indexchange(btnindex.value);
@@ -59,16 +61,23 @@ const changeColor=(index)=>{
         emit("hiadden", 1);
     }else if(btnindex.value==1){
       firstleftref.value.isshow=false;
-      emit("hiadden", 5);
+      emit("hiadden", null);
       towrightref.value.huoaid(props.aid);
    
-    }
-    else{
+    }else if(btnindex.value==2){
+      firstleftref.value.isshow=false;
+        emit("hiadden", null);
+    }else{
       firstleftref.value.isshow=false;
-        emit("hiadden", 5);
+        emit("hiadden", null);
     }
    
 }
+//隐藏所有
+const clearconst=()=>{
+  firstleftref.value.isshow=false;
+        // emit("hiadden", null);
+}
 // 求解成功后调用右边
 const firsrdata= ()=>{
     firstleftref.value.firstshow=true;
@@ -80,7 +89,6 @@ const firstshowfuc=()=>{
   firstleftref.value.isshow=false;
 }
 const indexchange=(key)=>{
-  console.log(111111235677)
   if(key==0){
     towrightref.value.towshow=false;
     console.log(props.state);
@@ -110,7 +118,7 @@ const hiddfalse=()=>{
 const showhadend=()=>{
     btnlistshow.value=true;
 }
-     defineExpose({showhadend,changeColor,btnindex,btnlistshow,hiddfalse,currentIndex,firsrdata,firstshowfuc});
+     defineExpose({showhadend,changeColor,btnindex,btnlistshow,hiddfalse,currentIndex,firsrdata,firstshowfuc,clearconst});
    </script>
    <style  lang="scss" scoped>
 

+ 24 - 2
src/view/result/Wdisaster.vue

@@ -5,7 +5,7 @@
               <div class="jc_content tablecolor">
                 <div class="jc_padding">
                   <div class="re_tele">灾害信息展示
-                    <div class="btn">生成报告</div>
+                    <div class="btn"  @click="downloadImg('')">生成报告</div>
                   </div >
                   <div class="jiancd">
                   <div class="je_left duijc">
@@ -91,11 +91,33 @@ let warnin2=ref(0);
 let steptimes = ref([]);
 let series = ref([]);
 let jcname=ref("监测点");
+let href=ref();
+let steps=ref();
 const dynamicHeaders = ref([
 
 ]);
 const tableData2 = ref([
 ]);
+//下载报告
+function downloadImg(url, fileName) {
+  if(aid.value==null||aid.value==''||aid.value==undefined){
+    ElMessage.error('项目不存在');
+  }else{
+  let href="http://localhost:5173/api/TransServlet?channelNo=service&clientToken=e47b87eec69545559d1e81e56626da68&userId=5f06c8bc77234f969d13e160b54c27e3&"
+  const x = new window.XMLHttpRequest();
+  x.open('GET', url, true);
+  x.responseType = 'blob';
+  x.onload = () => {
+    const url = window.URL.createObjectURL(x.response);
+    const a = document.createElement('a');
+    a.href = href+'aid='+aid.value+"&transCode=D000017&"+'step='+steps.value;
+    console.log( a.href );
+    a.download = fileName;
+    a.click();
+  };
+  x.send();
+}
+}
 // 批量数据
 const handleDelete=(event)=>{
 
@@ -183,7 +205,7 @@ onMounted(() => {
  const fcon = createFireControl();
 //监测点数据获取
  function getdata(step) {
-   
+   steps.value=Number(step);
 const params = {
   transCode: "D10018",
   aid: aid.value,

+ 23 - 1
src/view/result/Wdisaster2.vue

@@ -5,7 +5,7 @@
               <div class="jc_content tablecolor">
                 <div class="jc_padding">
                   <div class="re_tele">灾害信息展示
-                    <div class="btn" >生成报告</div>
+                    <div class="btn"  @click="downloadImg('')">生成报告</div>
                   </div >
                   <div class="jiancd">
                   <div class="je_left duijc">
@@ -90,12 +90,33 @@ let warnin=ref(0);
 let warnin2=ref(0);
 let steptimes = ref([]);
 let series = ref([]);
+let steps=ref();
 let jcname=ref("监测点");
 const dynamicHeaders = ref([
 
 ]);
 const tableData = ref([
 ]);
+//下载报告
+function downloadImg(url, fileName) {
+  if(aid.value==null||aid.value==''||aid.value==undefined){
+    ElMessage.error('项目不存在');
+  }else{
+  let href="http://localhost:5173/api/TransServlet?channelNo=service&clientToken=e47b87eec69545559d1e81e56626da68&userId=5f06c8bc77234f969d13e160b54c27e3&"
+  const x = new window.XMLHttpRequest();
+  x.open('GET', url, true);
+  x.responseType = 'blob';
+  x.onload = () => {
+    const url = window.URL.createObjectURL(x.response);
+    const a = document.createElement('a');
+    a.href = href+'aid='+aid.value+"&transCode=D000017&"+'step='+steps.value;
+    console.log( a.href );
+    a.download = fileName;
+    a.click();
+  };
+  x.send();
+}
+}
 // 批量数据
 const handleDelete=(event)=>{
  jcname.value=event.chname;
@@ -178,6 +199,7 @@ onMounted(() => {
  const fcon = createFireControl();
 //监测点数据获取
 async  function getdata(val) {
+  steps.value=Number(val);
 const params = {
   transCode: "D10018",
   aid: aid.value,