home.vue 12 KB

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