appmian.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  1. <template>
  2. <div class="appmian" >
  3. <!-- <v-scale-screen width="1920" height="1080" style="margin: 0;"> -->
  4. <el-container>
  5. <el-header>
  6. <div class="bgk1">
  7. <div class="d-flex jc-center title_wrap">
  8. <div class="timers">
  9. <span>{{ headerobj.name }}</span>
  10. {{ headertime.dateYear }} {{ headertime.dateDay }}
  11. </div>
  12. <!-- <RouterLink :to="{path:'/myHome'}">跳转到目标页</RouterLink> -->
  13. <div class="titlebtn titleanniu imgtupian" @click="handleSelect('1')" >突水推演</div>
  14. <div class="titlebtn titleanniu imgtupian" style="margin-right: 20px;" @click="handleSelect('2')">火灾推演</div>
  15. <div class="d-flex jc-center s-content">
  16. <div class="title tiletimg">
  17. <div class="ve_logo_img">
  18. <el-image style="height: 100%" :src="logo" fit="contain"></el-image>
  19. </div>
  20. <span class="title-text">矿道灾情软件推演</span>
  21. </div>
  22. </div>
  23. <div class="titlebtn titleanniu imgtupian2" @click="handleSelect('3')" >瓦斯爆炸推演</div>
  24. <div class="titlebtn titleanniu imgtupian2" @click="handleSelect('4')">模型库</div>
  25. </div>
  26. </div>
  27. </el-header>
  28. <el-main>
  29. <div class="maincontent">
  30. <div class="mainpdding">
  31. <source-disaster ref="sourcedis" :classradio="classradio" />
  32. <info-boundary ref="boundary" :classradio="classradio" />
  33. <info-animation ref="tanimation" :classradio="classradio" :aid="aid" />
  34. <InfoVtkmodel ref="vtkmodel" />
  35. <Dialoges
  36. ref="lliudialog"
  37. :addselect="addselect"
  38. :valzaiqing="valzaiqing"
  39. :headerobj="headerobj"
  40. :activeIndex="activeIndex"
  41. @leftsimulation="leftsimulation"
  42. @headerclick="headerclick"
  43. @handleSelect="handleSelect"
  44. @childfun="childfun"
  45. @moxingclick="moxingclick"
  46. :classradio="classradio"
  47. ></Dialoges>
  48. <MenuMine ref="menumine"/>
  49. <MenuSensor ref="menusen"/>
  50. <!-- right -->
  51. <!-- <firstLeft/> -->
  52. <!-- </div> -->
  53. <!-- 底部按钮三个页面 -->
  54. <firstLeft ref="firstleftref" :classradio="classradio" :aid="aid" />
  55. <towright ref="towrightref" :classradio="classradio" :aid="aid" />
  56. <result ref="resultbidui" @titleclick="titleclick" :classradio="classradio"></result>
  57. <!-- <threeright ref="threerightref" :classradio="classradio" :aid="aid" /> -->
  58. </div>
  59. </div>
  60. </el-main>
  61. <div class="footer">
  62. <Index ref="indexref" @indexchange="indexchange" @hiadden="hiadden"/>
  63. </div>
  64. </el-container>
  65. <!-- </v-scale-screen> -->
  66. </div>
  67. </template>
  68. <script setup>
  69. import { ref, onMounted, reactive, nextTick } from "vue";
  70. import { RouterView, RouterLink, useRouter } from "vue-router";
  71. import VScaleScreen from 'v-scale-screen'
  72. import '@/utils/flexible'
  73. // import NavigateBar from "@/components/layout/NavigateBar.vue";
  74. import Dialoges from "./InfoDialoges.vue";
  75. import logo from "@/assets/logo.png";
  76. import { ElMessage, ElButton, ElDialog, ElSelect, formEmits } from 'element-plus'
  77. // import myIndex from "./index"
  78. import Index from "./index/index.vue"
  79. import SourceDisaster from "./components/InfoDisaster.vue";
  80. import InfoBoundary from "./components/InfoBoundary.vue";
  81. import InfoAnimation from "./components/InfoAnimation.vue";
  82. import InfoVtkmodel from "./components/InfoVtkmodel.vue";
  83. import MenuMine from "./components/MenuMine.vue"
  84. import MenuSensor from "./components/MenuSensor.vue"
  85. import result from "./result.vue";
  86. import firstLeft from "./index/first-left.vue"
  87. import towright from "./index/tow-right.vue"
  88. import threeright from "./index/three-right.vue"
  89. import Vector from "@/assets/img/Vector.png";
  90. import s1 from "@/assets/img/s1.png";
  91. import s2 from "@/assets/img/s2.png";
  92. import s3 from "@/assets/img/s3.png";
  93. import s4 from "@/assets/img/s4.png";
  94. import b from "@/assets/img/Group1317.png";
  95. import { timestampToTime,formatTime } from "@/js/lindex.js";
  96. import mitts from "@/utils/Bus";
  97. import { contains } from "@kitware/vtk.js/Common/DataModel/BoundingBox";
  98. // import { vtkmodel } from "@/control/vtkModel.js";
  99. let lliudialog = ref();
  100. let sourcedis = ref();
  101. let classradio = ref();
  102. let boundary = ref();
  103. let tanimation = ref();
  104. let menumine=ref();
  105. let menusen=ref();
  106. let indexref=ref();
  107. const title = "灾情推演软件";
  108. const activeIndex = ref("1");
  109. const activeIndex2 = ref("1");
  110. let titlefalse = ref(false);
  111. let resultbidui = ref();
  112. let mnindex = ref("");
  113. let resultleft = ref({});
  114. let datares=ref({});
  115. let firstleftref=ref();
  116. let towrightref=ref();
  117. let threerightref=ref();
  118. let resultright = ref({});
  119. let headertime=ref({
  120. timing: null,
  121. loading: true,
  122. dateDay: null,
  123. dateYear: null,
  124. dateWeek: null,
  125. weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
  126. })
  127. let bgk2false=ref(true)
  128. let headerobj = ref({
  129. time: "",
  130. name: "",
  131. });
  132. let valzaiqing = ref("");
  133. let router = useRouter();
  134. let sgdata = ref({});
  135. let aid = ref();
  136. onMounted(() => {
  137. timeFn();
  138. // childfun();
  139. });
  140. // 跳转页面,{ aid:aid.value}
  141. const handleSelectzt=(val)=>{
  142. router.push({ path: "/" ,query:{classradio:val}});
  143. }
  144. // 当前时间
  145. const timeFn=()=> {
  146. headertime.value.timing = setInterval(() => {
  147. headertime.value.dateDay = formatTime(new Date(), "HH: mm: ss");
  148. headertime.value.dateYear = formatTime(new Date(), "yyyy-MM-dd");
  149. headertime.value.dateWeek = headertime.value.weekday[new Date().getDay()];
  150. }, 1000);
  151. }
  152. // const tiaozhuan = () => {
  153. // activeIndex.value = "1";
  154. // handleSelect( activeIndex.value);
  155. // const key = activeIndex.value;
  156. // sourcedis.value.changeModel();
  157. // sourcedis.value.accident3(key);
  158. // boundary.value.accident4(key);
  159. // lliudialog.value.accident2(key);
  160. // tanimation.value.monitor = false;
  161. // router.push({ path: "/configurator" });
  162. // };
  163. const addselect = () => {
  164. classradio.value = lliudialog.value.classradio;
  165. };
  166. // 获取模拟数据对比
  167. const leftsimulation = (res,data) => {
  168. if (mnindex.value == "1") {
  169. resultleft.value.coids = res.coids;
  170. resultleft.value.totaltime = res.totaltime;
  171. resultleft.value.reportstep = res.reportstep;
  172. resultleft.value.pickertime = res.acctime;
  173. resultleft.value.aid = res.aid;
  174. resultbidui.value.mntext1=data.name;
  175. } else {
  176. resultright.value.coids = res.coids;
  177. resultright.value.totaltime = res.totaltime;
  178. resultright.value.reportstep = res.reportstep;
  179. resultright.value.pickertime = res.acctime;
  180. resultright.value.aid = res.aid;
  181. resultbidui.value.mntext2=data.name;
  182. }
  183. //TODO
  184. if(resultleft.value.aid==''||resultright.value.aid==''||resultleft.value.aid==undefined||resultright.value.aid==undefined){
  185. }else{
  186. if (resultleft.value.coids != resultright.value.coids) {
  187. ElMessage.error('污染物不一样,无法进行比较')
  188. return;
  189. }
  190. if (resultleft.value.totaltime != resultright.value.totaltime) {
  191. ElMessage.error('模拟时长不一样,无法进行比较')
  192. return;
  193. }
  194. if (resultleft.value.reportstep != resultright.value.reportstep) {
  195. ElMessage.error('输出步长不一样,无法进行比较')
  196. return;
  197. }
  198. if (resultleft.value.pickertime != resultright.value.pickertime ) {
  199. ElMessage.error('事故时间不一样,无法进行比较')
  200. return;
  201. }
  202. //TODO 获取物理量
  203. resultbidui.value.timeline=res.acctime;
  204. resultbidui.value.oldtime=res.acctime;
  205. // resultbidui.value.zdtime=res.acctime;
  206. resultbidui.value.endtime= Number(res.totaltime)/Number(res.reportstep);
  207. resultbidui.value.initAid(resultleft.value.aid,resultright.value.aid);
  208. resultbidui.value.clickflat=true;
  209. }
  210. };
  211. //判断两个对象是否相等
  212. const objequality = () => {};
  213. const moxingclick = (val) => {
  214. titlefalse.value = val;
  215. };
  216. // const qingsel=()=>{
  217. // lliudialog.value.dialogVisible = true;
  218. // }
  219. //点击头部弹出弹框
  220. const bgkchange= ()=>{
  221. }
  222. const titleclick = (val, index) => {
  223. mnindex.value = index;
  224. valzaiqing.value = val;
  225. if (val == "模拟数据") {
  226. lliudialog.value.dialogVisible = true;
  227. } else {
  228. lliudialog.value.dialogVisible = true;
  229. clearInterval();
  230. }
  231. };
  232. //获取aid
  233. const aidlist = () => {
  234. sgdata.value = lliudialog.value.sgdata;
  235. aid.value = sgdata.value.aid;
  236. };
  237. // index组件的方法
  238. const indexchange=(key)=>{
  239. if(key==0){
  240. firstleftref.value.firstshow=true;
  241. towrightref.value.towshow=false;
  242. // threerightref.value.threeshow=false;
  243. resultbidui.value.accident6(key, aid.value);
  244. }else if(key==1){
  245. firstleftref.value.firstshow=false;
  246. towrightref.value.towshow=true;
  247. resultbidui.value.accident6(key, aid.value);
  248. // threerightref.value.threeshow=false;
  249. }else if(key==2){
  250. firstleftref.value.firstshow=false;
  251. towrightref.value.towshow=false;
  252. resultbidui.value.accident6(key, aid.value);
  253. }
  254. else{
  255. firstleftref.value.firstshow=false;
  256. towrightref.value.towshow=false;
  257. resultbidui.value.accident6(key, aid.value);
  258. // threerightref.value.threeshow=false;
  259. }
  260. }
  261. // 获取子组件的方法
  262. const childfun = () => {
  263. bgk2false.value=false;
  264. indexref.value.showhadend()
  265. indexchange(indexref.value.btnindex);
  266. if(classradio.value=='Gass'){
  267. sourcedis.value.Gassgetdata(aid.value);
  268. }else{
  269. sourcedis.value.handledisaster(aid.value);
  270. }
  271. boundary.value.addboundary(aid.value);
  272. sourcedis.value.accident3(activeIndex.value);
  273. boundary.value.accident4(activeIndex.value);
  274. };
  275. const headerclick = (data) => {
  276. console.log(data);
  277. headerobj.value.name = data.name;
  278. headerobj.value.time = data.time;
  279. aid.value = data.aid;
  280. };
  281. //首页组件调用的方法
  282. const handindodialoges=()=>{
  283. }
  284. //清空灾情推演隐藏
  285. const hiadden= (key)=>{
  286. boundary.value.accident4(key);
  287. sourcedis.value.accident3(key);
  288. lliudialog.value.accident2(key);
  289. }
  290. const handleSelect = (key) => {
  291. router.push({ path: "/" ,query:{classradio:key}});
  292. bgk2false.value=true;
  293. indexref.value.btnlistshow=false;
  294. if( bgk2false.value==true){
  295. activeIndex.value='11'
  296. }
  297. activeIndex.value =key;
  298. switch (key) {
  299. case "1":
  300. classradio.value="Water";
  301. lliudialog.value.classclick( classradio.value);
  302. menumine.value.dialogVisible=false;
  303. menusen.value.sendialogVisible=false;
  304. break;
  305. case "2":
  306. classradio.value="Fire";
  307. lliudialog.value.classclick( classradio.value);
  308. menumine.value.dialogVisible=false;
  309. menusen.value.sendialogVisible=false;
  310. break;
  311. case "3":
  312. classradio.value="Gass";
  313. console.log( classradio.value);
  314. lliudialog.value.classclick( classradio.value);
  315. menumine.value.dialogVisible=false;
  316. menusen.value.sendialogVisible=false;
  317. break;
  318. case "4":
  319. classradio.value="Model";
  320. menumine.value.dialogVisible=true;
  321. menusen.value.sendialogVisible=true;
  322. boundary.value.accident4(key);
  323. sourcedis.value.accident3(key);
  324. lliudialog.value.accident2(key);
  325. break;
  326. case "5":
  327. default:
  328. break;
  329. }
  330. };
  331. </script>
  332. <style lang="scss" scoped>
  333. .title_wrap{
  334. display: flex;
  335. justify-content: center;
  336. color: #fff;
  337. }
  338. .appmian {
  339. .el-main {
  340. --el-main-padding: 0 !important;
  341. position: absolute;
  342. top: 60px;
  343. left: 0;
  344. }
  345. .el-container {
  346. padding: 0;
  347. margin: 0;
  348. width: 100%;
  349. position: absolute;
  350. z-index: 206;
  351. top: 0;
  352. }
  353. }
  354. .ve_menu_logo {
  355. width: 100%;
  356. height: 70px;
  357. background: #0d1639;
  358. white-space: nowrap;
  359. text-align: left;
  360. overflow: hidden;
  361. display: flex;
  362. background: #0d1639;
  363. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  364. border-radius: 0px 0px 0px 0px;
  365. border-bottom: 1px solid;
  366. box-sizing: border-box;
  367. border-image: linear-gradient(28deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0)) 1 1;
  368. .ve_title {
  369. }
  370. .ve_logo_img {
  371. padding-left: 30px;
  372. padding-right: 30px;
  373. display: inline-block;
  374. box-sizing: border-box;
  375. vertical-align: middle;
  376. padding: 15px;
  377. }
  378. .ve_logo_title {
  379. width: 160px;
  380. white-space: nowrap;
  381. overflow: hidden;
  382. text-overflow: ellipsis;
  383. display: inline-block;
  384. margin: 0;
  385. vertical-align: middle;
  386. color: #68adff;
  387. font-size: 20px;
  388. }
  389. .el-menu-demo {
  390. width: 60% !important;
  391. height: 70px;
  392. border: none !important;
  393. background: rgba(12, 97, 197, 0);
  394. .el-menu-item {
  395. position: relative;
  396. width: 97px;
  397. font-family: Microsoft YaHei UI, Microsoft YaHei UI;
  398. font-weight: bold;
  399. font-size: 13px;
  400. color: #68adff;
  401. line-height: 15px;
  402. text-align: center;
  403. font-style: normal;
  404. text-transform: none;
  405. width: 110px;
  406. height: 70px;
  407. border-radius: 0px 0px 0px 0px;
  408. border: none;
  409. }
  410. .is-active {
  411. width: 110px;
  412. height: 70px;
  413. background: radial-gradient(ellipse at 54px 0px, #3aa0ff -37%, #123066 53%);
  414. border-radius: 0px 0px 0px 0px;
  415. border: 1px solid;
  416. border-left: 1px solid rgba(16, 92, 240, 1);
  417. border-right: 1px solid rgba(18, 48, 102, 1);
  418. border-image: linear-gradient(347deg, rgba(16, 92, 240, 1), rgba(18, 48, 102, 1)) 1
  419. 1;
  420. &:after {
  421. width: 24px;
  422. height: 1px;
  423. background-color: #fff;
  424. -webkit-transition: all ease-out 0.2s;
  425. transition: all ease-out 0.2s;
  426. content: "";
  427. position: absolute;
  428. left: 50%;
  429. bottom: 15px;
  430. webkit-transform: translate(-50%, 0%);
  431. -moz-transform: translate(-50%, 0%);
  432. transform: translate(-50%, 0%);
  433. }
  434. }
  435. }
  436. .ve_right {
  437. // width: 350px;
  438. height: 70px;
  439. overflow: hidden;
  440. position: absolute;
  441. right: 0;
  442. display: flex;
  443. .ve_time {
  444. width: 190px;
  445. height: 55px;
  446. padding-top: 15px;
  447. height: 70px;
  448. overflow: hidden;
  449. border-radius: 0px 0px 0px 0px;
  450. border-left: 2px solid rgba(12, 97, 197, 0.2);
  451. border-right: 2px solid rgba(12, 97, 197, 0.2);
  452. box-sizing: border-box;
  453. padding: 15px 5px;
  454. // border-image: linear-gradient(347deg, rgba(31, 107, 255, 1), rgba(164, 195, 255, 1)) 1 1;
  455. span {
  456. display: block;
  457. font-family: Microsoft YaHei UI, Microsoft YaHei UI;
  458. color: #ffffff;
  459. text-align: center;
  460. font-style: normal;
  461. text-transform: none;
  462. }
  463. .l_huoqing {
  464. font-size: 13px;
  465. line-height: 15px;
  466. font-weight: bold;
  467. line-height: 2;
  468. white-space: nowrap;
  469. overflow: hidden;
  470. text-overflow: ellipsis;
  471. }
  472. .l_time {
  473. font-size: 12px;
  474. line-height: 14px;
  475. font-weight: 400;
  476. }
  477. }
  478. .ve_timeioc {
  479. width: 150px;
  480. height: 70px;
  481. // border-radius: 0px 0px 0px 0px;
  482. // border: 1px solid;
  483. // border-image: linear-gradient(347deg, rgba(16, 92, 240, 1), rgba(164, 195, 255, 1)) 1 1;
  484. font-family: Microsoft YaHei UI, Microsoft YaHei UI;
  485. font-weight: bold;
  486. font-size: 13px;
  487. color: #68adff;
  488. line-height: 15px;
  489. text-align: center;
  490. font-style: normal;
  491. text-transform: none;
  492. display: flex;
  493. justify-content: center;
  494. align-items: center;
  495. span {
  496. padding-left: 15px;
  497. }
  498. }
  499. }
  500. }
  501. </style>
  502. <style>
  503. @import '../../src/style/style.css';
  504. body {
  505. width: 100%;
  506. height: 100vh;
  507. background: #161a2a;
  508. }
  509. button:focus,
  510. button:focus-visible {
  511. outline: none;
  512. }
  513. .l_Dialog {
  514. position: relative;
  515. }
  516. .main-conyeny{
  517. position: absolute;
  518. z-index: 206;
  519. top: 70px;
  520. }
  521. .L_aside {
  522. margin-top: 10px;
  523. overflow: hidden;
  524. }
  525. </style>