123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575 |
- <template>
- <div class="appmian" >
- <!-- <v-scale-screen width="1920" height="1080" style="margin: 0;"> -->
- <el-container>
-
- <el-header>
- <div class="bgk1">
- <div class="d-flex jc-center title_wrap">
-
- <div class="timers">
- <span>{{ headerobj.name }}</span>
- {{ headertime.dateYear }} {{ headertime.dateDay }}
- </div>
- <!-- <RouterLink :to="{path:'/myHome'}">跳转到目标页</RouterLink> -->
- <div class="titlebtn titleanniu imgtupian" @click="handleSelect('1')" >突水推演</div>
- <div class="titlebtn titleanniu imgtupian" style="margin-right: 20px;" @click="handleSelect('2')">火灾推演</div>
- <div class="d-flex jc-center s-content">
- <div class="title tiletimg">
- <div class="ve_logo_img">
- <el-image style="height: 100%" :src="logo" fit="contain"></el-image>
- </div>
-
- <span class="title-text">矿道灾情软件推演</span>
- </div>
- </div>
-
- <div class="titlebtn titleanniu imgtupian2" @click="handleSelect('3')" >瓦斯爆炸推演</div>
- <div class="titlebtn titleanniu imgtupian2" @click="handleSelect('4')">模型库</div>
- </div>
- </div>
- </el-header>
-
- <el-main>
- <div class="maincontent">
- <div class="mainpdding">
- <source-disaster ref="sourcedis" :classradio="classradio" />
- <info-boundary ref="boundary" :classradio="classradio" />
- <info-animation ref="tanimation" :classradio="classradio" :aid="aid" />
- <InfoVtkmodel ref="vtkmodel" />
- <Dialoges
- ref="lliudialog"
- :addselect="addselect"
- :valzaiqing="valzaiqing"
- :headerobj="headerobj"
- :activeIndex="activeIndex"
- @leftsimulation="leftsimulation"
- @headerclick="headerclick"
- @handleSelect="handleSelect"
- @childfun="childfun"
- @moxingclick="moxingclick"
- :classradio="classradio"
- ></Dialoges>
-
- <MenuMine ref="menumine"/>
- <MenuSensor ref="menusen"/>
- <!-- right -->
- <!-- <firstLeft/> -->
- <!-- </div> -->
- <!-- 底部按钮三个页面 -->
- <firstLeft ref="firstleftref" :classradio="classradio" :aid="aid" />
- <towright ref="towrightref" :classradio="classradio" :aid="aid" />
- <result ref="resultbidui" @titleclick="titleclick" :classradio="classradio"></result>
- <!-- <threeright ref="threerightref" :classradio="classradio" :aid="aid" /> -->
- </div>
- </div>
- </el-main>
- <div class="footer">
- <Index ref="indexref" @indexchange="indexchange" @hiadden="hiadden"/>
- </div>
- </el-container>
- <!-- </v-scale-screen> -->
- </div>
- </template>
- <script setup>
- import { ref, onMounted, reactive, nextTick } from "vue";
- import { RouterView, RouterLink, useRouter } from "vue-router";
- import VScaleScreen from 'v-scale-screen'
- import '@/utils/flexible'
- // import NavigateBar from "@/components/layout/NavigateBar.vue";
- import Dialoges from "./InfoDialoges.vue";
- import logo from "@/assets/logo.png";
- import { ElMessage, ElButton, ElDialog, ElSelect, formEmits } from 'element-plus'
- // import myIndex from "./index"
- import Index from "./index/index.vue"
- import SourceDisaster from "./components/InfoDisaster.vue";
- import InfoBoundary from "./components/InfoBoundary.vue";
- import InfoAnimation from "./components/InfoAnimation.vue";
- import InfoVtkmodel from "./components/InfoVtkmodel.vue";
- import MenuMine from "./components/MenuMine.vue"
- import MenuSensor from "./components/MenuSensor.vue"
- import result from "./result.vue";
- import firstLeft from "./index/first-left.vue"
- import towright from "./index/tow-right.vue"
- import threeright from "./index/three-right.vue"
- import Vector from "@/assets/img/Vector.png";
- import s1 from "@/assets/img/s1.png";
- import s2 from "@/assets/img/s2.png";
- import s3 from "@/assets/img/s3.png";
- import s4 from "@/assets/img/s4.png";
- import b from "@/assets/img/Group1317.png";
- import { timestampToTime,formatTime } from "@/js/lindex.js";
- import mitts from "@/utils/Bus";
- import { contains } from "@kitware/vtk.js/Common/DataModel/BoundingBox";
- // import { vtkmodel } from "@/control/vtkModel.js";
- let lliudialog = ref();
- let sourcedis = ref();
- let classradio = ref();
- let boundary = ref();
- let tanimation = ref();
- let menumine=ref();
- let menusen=ref();
- let indexref=ref();
- const title = "灾情推演软件";
- const activeIndex = ref("1");
- const activeIndex2 = ref("1");
- let titlefalse = ref(false);
- let resultbidui = ref();
- let mnindex = ref("");
- let resultleft = ref({});
- let datares=ref({});
- let firstleftref=ref();
- let towrightref=ref();
- let threerightref=ref();
- let resultright = ref({});
- let headertime=ref({
- timing: null,
- loading: true,
- dateDay: null,
- dateYear: null,
- dateWeek: null,
- weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
- })
- let bgk2false=ref(true)
- let headerobj = ref({
- time: "",
- name: "",
- });
- let valzaiqing = ref("");
- let router = useRouter();
- let sgdata = ref({});
- let aid = ref();
- onMounted(() => {
- timeFn();
- // childfun();
- });
- // 跳转页面,{ aid:aid.value}
- const handleSelectzt=(val)=>{
- router.push({ path: "/" ,query:{classradio:val}});
- }
- // 当前时间
- const timeFn=()=> {
- headertime.value.timing = setInterval(() => {
- headertime.value.dateDay = formatTime(new Date(), "HH: mm: ss");
- headertime.value.dateYear = formatTime(new Date(), "yyyy-MM-dd");
- headertime.value.dateWeek = headertime.value.weekday[new Date().getDay()];
- }, 1000);
- }
- // const tiaozhuan = () => {
- // activeIndex.value = "1";
- // handleSelect( activeIndex.value);
- // const key = activeIndex.value;
- // sourcedis.value.changeModel();
- // sourcedis.value.accident3(key);
- // boundary.value.accident4(key);
- // lliudialog.value.accident2(key);
- // tanimation.value.monitor = false;
- // router.push({ path: "/configurator" });
- // };
- const addselect = () => {
- classradio.value = lliudialog.value.classradio;
- };
- // 获取模拟数据对比
- const leftsimulation = (res,data) => {
- if (mnindex.value == "1") {
- resultleft.value.coids = res.coids;
- resultleft.value.totaltime = res.totaltime;
- resultleft.value.reportstep = res.reportstep;
- resultleft.value.pickertime = res.acctime;
- resultleft.value.aid = res.aid;
- resultbidui.value.mntext1=data.name;
-
-
- } else {
- resultright.value.coids = res.coids;
- resultright.value.totaltime = res.totaltime;
- resultright.value.reportstep = res.reportstep;
- resultright.value.pickertime = res.acctime;
- resultright.value.aid = res.aid;
- resultbidui.value.mntext2=data.name;
- }
- //TODO
- if(resultleft.value.aid==''||resultright.value.aid==''||resultleft.value.aid==undefined||resultright.value.aid==undefined){
-
- }else{
- if (resultleft.value.coids != resultright.value.coids) {
- ElMessage.error('污染物不一样,无法进行比较')
- return;
- }
- if (resultleft.value.totaltime != resultright.value.totaltime) {
- ElMessage.error('模拟时长不一样,无法进行比较')
- return;
- }
- if (resultleft.value.reportstep != resultright.value.reportstep) {
- ElMessage.error('输出步长不一样,无法进行比较')
- return;
- }
- if (resultleft.value.pickertime != resultright.value.pickertime ) {
- ElMessage.error('事故时间不一样,无法进行比较')
- return;
- }
-
- //TODO 获取物理量
- resultbidui.value.timeline=res.acctime;
- resultbidui.value.oldtime=res.acctime;
- // resultbidui.value.zdtime=res.acctime;
- resultbidui.value.endtime= Number(res.totaltime)/Number(res.reportstep);
- resultbidui.value.initAid(resultleft.value.aid,resultright.value.aid);
- resultbidui.value.clickflat=true;
- }
- };
- //判断两个对象是否相等
- const objequality = () => {};
- const moxingclick = (val) => {
- titlefalse.value = val;
- };
- // const qingsel=()=>{
- // lliudialog.value.dialogVisible = true;
- // }
- //点击头部弹出弹框
- const bgkchange= ()=>{
- }
- const titleclick = (val, index) => {
- mnindex.value = index;
- valzaiqing.value = val;
- if (val == "模拟数据") {
- lliudialog.value.dialogVisible = true;
- } else {
- lliudialog.value.dialogVisible = true;
- clearInterval();
- }
- };
- //获取aid
- const aidlist = () => {
- sgdata.value = lliudialog.value.sgdata;
- aid.value = sgdata.value.aid;
- };
- // index组件的方法
- const indexchange=(key)=>{
- if(key==0){
- firstleftref.value.firstshow=true;
- towrightref.value.towshow=false;
- // threerightref.value.threeshow=false;
- resultbidui.value.accident6(key, aid.value);
- }else if(key==1){
- firstleftref.value.firstshow=false;
- towrightref.value.towshow=true;
- resultbidui.value.accident6(key, aid.value);
- // threerightref.value.threeshow=false;
- }else if(key==2){
- firstleftref.value.firstshow=false;
- towrightref.value.towshow=false;
- resultbidui.value.accident6(key, aid.value);
- }
- else{
- firstleftref.value.firstshow=false;
- towrightref.value.towshow=false;
- resultbidui.value.accident6(key, aid.value);
- // threerightref.value.threeshow=false;
- }
- }
- // 获取子组件的方法
- const childfun = () => {
- bgk2false.value=false;
- indexref.value.showhadend()
- indexchange(indexref.value.btnindex);
- if(classradio.value=='Gass'){
- sourcedis.value.Gassgetdata(aid.value);
- }else{
- sourcedis.value.handledisaster(aid.value);
- }
- boundary.value.addboundary(aid.value);
- sourcedis.value.accident3(activeIndex.value);
- boundary.value.accident4(activeIndex.value);
- };
- const headerclick = (data) => {
- console.log(data);
- headerobj.value.name = data.name;
- headerobj.value.time = data.time;
- aid.value = data.aid;
- };
- //首页组件调用的方法
- const handindodialoges=()=>{
- }
- //清空灾情推演隐藏
- const hiadden= (key)=>{
- boundary.value.accident4(key);
- sourcedis.value.accident3(key);
- lliudialog.value.accident2(key);
- }
- const handleSelect = (key) => {
- router.push({ path: "/" ,query:{classradio:key}});
- bgk2false.value=true;
- indexref.value.btnlistshow=false;
- if( bgk2false.value==true){
- activeIndex.value='11'
- }
-
- activeIndex.value =key;
- switch (key) {
- case "1":
- classradio.value="Water";
- lliudialog.value.classclick( classradio.value);
- menumine.value.dialogVisible=false;
- menusen.value.sendialogVisible=false;
- break;
- case "2":
- classradio.value="Fire";
- lliudialog.value.classclick( classradio.value);
- menumine.value.dialogVisible=false;
- menusen.value.sendialogVisible=false;
- break;
- case "3":
- classradio.value="Gass";
- console.log( classradio.value);
- lliudialog.value.classclick( classradio.value);
- menumine.value.dialogVisible=false;
- menusen.value.sendialogVisible=false;
- break;
- case "4":
- classradio.value="Model";
- menumine.value.dialogVisible=true;
- menusen.value.sendialogVisible=true;
- boundary.value.accident4(key);
- sourcedis.value.accident3(key);
- lliudialog.value.accident2(key);
- break;
- case "5":
- default:
- break;
- }
- };
- </script>
- <style lang="scss" scoped>
- .title_wrap{
- display: flex;
- justify-content: center;
- color: #fff;
- }
- .appmian {
- .el-main {
- --el-main-padding: 0 !important;
- position: absolute;
- top: 60px;
- left: 0;
- }
- .el-container {
- padding: 0;
- margin: 0;
- width: 100%;
- position: absolute;
- z-index: 206;
- top: 0;
- }
- }
- .ve_menu_logo {
- width: 100%;
- height: 70px;
- background: #0d1639;
- white-space: nowrap;
- text-align: left;
- overflow: hidden;
- display: flex;
- background: #0d1639;
- box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
- border-radius: 0px 0px 0px 0px;
- border-bottom: 1px solid;
- box-sizing: border-box;
- border-image: linear-gradient(28deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0)) 1 1;
- .ve_title {
- }
- .ve_logo_img {
- padding-left: 30px;
- padding-right: 30px;
- display: inline-block;
- box-sizing: border-box;
- vertical-align: middle;
- padding: 15px;
- }
- .ve_logo_title {
- width: 160px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- display: inline-block;
- margin: 0;
- vertical-align: middle;
- color: #68adff;
- font-size: 20px;
- }
- .el-menu-demo {
- width: 60% !important;
- height: 70px;
- border: none !important;
- background: rgba(12, 97, 197, 0);
- .el-menu-item {
- position: relative;
- width: 97px;
- font-family: Microsoft YaHei UI, Microsoft YaHei UI;
- font-weight: bold;
- font-size: 13px;
- color: #68adff;
- line-height: 15px;
- text-align: center;
- font-style: normal;
- text-transform: none;
- width: 110px;
- height: 70px;
- border-radius: 0px 0px 0px 0px;
- border: none;
- }
- .is-active {
- width: 110px;
- height: 70px;
- background: radial-gradient(ellipse at 54px 0px, #3aa0ff -37%, #123066 53%);
- border-radius: 0px 0px 0px 0px;
- border: 1px solid;
- border-left: 1px solid rgba(16, 92, 240, 1);
- border-right: 1px solid rgba(18, 48, 102, 1);
- border-image: linear-gradient(347deg, rgba(16, 92, 240, 1), rgba(18, 48, 102, 1)) 1
- 1;
- &:after {
- width: 24px;
- height: 1px;
- background-color: #fff;
- -webkit-transition: all ease-out 0.2s;
- transition: all ease-out 0.2s;
- content: "";
- position: absolute;
- left: 50%;
- bottom: 15px;
- webkit-transform: translate(-50%, 0%);
- -moz-transform: translate(-50%, 0%);
- transform: translate(-50%, 0%);
- }
- }
- }
- .ve_right {
- // width: 350px;
- height: 70px;
- overflow: hidden;
- position: absolute;
- right: 0;
- display: flex;
- .ve_time {
- width: 190px;
- height: 55px;
- padding-top: 15px;
- height: 70px;
- overflow: hidden;
- border-radius: 0px 0px 0px 0px;
- border-left: 2px solid rgba(12, 97, 197, 0.2);
- border-right: 2px solid rgba(12, 97, 197, 0.2);
- box-sizing: border-box;
- padding: 15px 5px;
- // border-image: linear-gradient(347deg, rgba(31, 107, 255, 1), rgba(164, 195, 255, 1)) 1 1;
- span {
- display: block;
- font-family: Microsoft YaHei UI, Microsoft YaHei UI;
- color: #ffffff;
- text-align: center;
- font-style: normal;
- text-transform: none;
- }
- .l_huoqing {
- font-size: 13px;
- line-height: 15px;
- font-weight: bold;
- line-height: 2;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .l_time {
- font-size: 12px;
- line-height: 14px;
- font-weight: 400;
- }
- }
- .ve_timeioc {
- width: 150px;
- height: 70px;
- // border-radius: 0px 0px 0px 0px;
- // border: 1px solid;
- // border-image: linear-gradient(347deg, rgba(16, 92, 240, 1), rgba(164, 195, 255, 1)) 1 1;
- font-family: Microsoft YaHei UI, Microsoft YaHei UI;
- font-weight: bold;
- font-size: 13px;
- color: #68adff;
- line-height: 15px;
- text-align: center;
- font-style: normal;
- text-transform: none;
- display: flex;
- justify-content: center;
- align-items: center;
- span {
- padding-left: 15px;
- }
- }
- }
- }
- </style>
- <style>
- @import '../../src/style/style.css';
- body {
- width: 100%;
- height: 100vh;
- background: #161a2a;
- }
- button:focus,
- button:focus-visible {
- outline: none;
- }
- .l_Dialog {
- position: relative;
- }
- .main-conyeny{
- position: absolute;
- z-index: 206;
- top: 70px;
- }
- .L_aside {
- margin-top: 10px;
- overflow: hidden;
- }
- </style>
|