appmian.vue 14 KB

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