appmian.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. <template>
  2. <div class="appmian">
  3. <el-container>
  4. <el-header>
  5. <div class="ve_menu_logo">
  6. <div class="ve_title">
  7. <div class="ve_logo_img">
  8. <el-image style="height: 100%" :src="logo" fit="contain"></el-image>
  9. </div>
  10. <h3 class="ve_logo_title">
  11. {{ title }}
  12. </h3>
  13. </div>
  14. <el-menu :default-active="activeIndex" class="el-menu-demo" mode="horizontal" :popper-offset="2"
  15. style="width:780px" background-color="#0D1639 " active-background-color="#0E50C8"
  16. text-color="#68ADFF" active-text-color="#fff" @select="handleSelect">
  17. <el-menu-item index="1">灾害源设置</el-menu-item>
  18. <el-menu-item index="2">边界设置</el-menu-item>
  19. <el-menu-item index="3">灾害推演</el-menu-item>
  20. <el-menu-item index="4">推演结果</el-menu-item>
  21. <el-menu-item index="5">结果对比</el-menu-item>
  22. </el-menu>
  23. <div class="ve_right">
  24. <div class="ve_timeioc" v-if=" aid==null" @click="qingsel">
  25. <span>请选择</span>
  26. </div>
  27. <div v-else>
  28. <div class="ve_time" v-show="titlefalse" @click="titleclick()" >
  29. <span class="l_huoqing">{{ headerobj.name }}</span>
  30. <span class="l_time">{{ headerobj.time }}</span>
  31. </div>
  32. </div>
  33. <!-- <router-link to="/configurator"> -->
  34. <div class="ve_timeioc" @click="tiaozhuan()">
  35. <el-image :src="Vector" fit="contain"></el-image>
  36. <span>模型库</span>
  37. </div>
  38. <!-- </router-link> -->
  39. </div>
  40. </div>
  41. </el-header>
  42. <el-main>
  43. <Dialoges ref="lliudialog" :addselect="addselect" :headerobj="headerobj" @headerclick="headerclick" @handleSelect="handleSelect"
  44. @childfun="childfun" @moxingclick="moxingclick"></Dialoges>
  45. <source-disaster ref="sourcedis" :classradio="classradio" :aid="aid" />
  46. <info-boundary ref="boundary" :classradio="classradio" :aid="aid" />
  47. <info-animation ref="tanimation" :classradio="classradio" :aid="aid" />
  48. <InfoVtkmodel ref="vtkmodel" />
  49. <result ref="resultbidui"></result>
  50. </el-main>
  51. </el-container>
  52. </div>
  53. </template>
  54. <script setup>
  55. import { ref, onMounted, reactive, nextTick } from "vue";
  56. import { RouterView, RouterLink, useRouter } from "vue-router"
  57. // import NavigateBar from "@/components/layout/NavigateBar.vue";
  58. import Dialoges from "./InfoDialoges.vue"
  59. import logo from "@/assets/logo.png";
  60. // import myIndex from "./index"
  61. import SourceDisaster from "./components/InfoDisaster.vue"
  62. import InfoBoundary from "./components/InfoBoundary.vue"
  63. import InfoAnimation from "./components/InfoAnimation.vue"
  64. import InfoVtkmodel from "./components/InfoVtkmodel.vue"
  65. import result from "./result.vue"
  66. import Vector from "@/assets/img/Vector.png";
  67. import { timestampToTime } from '@/js/lindex.js'
  68. import mitts from "@/utils/Bus"
  69. // import { vtkmodel } from "@/control/vtkModel.js";
  70. let lliudialog = ref();
  71. let sourcedis = ref();
  72. const title = "灾情推演软件";
  73. const activeIndex = ref('1')
  74. const activeIndex2 = ref('1')
  75. let classradio = ref()
  76. let boundary = ref();
  77. let tanimation = ref();
  78. let titlefalse = ref(false);
  79. let resultbidui=ref();
  80. let headerobj = ref({
  81. time: '',
  82. name: "",
  83. })
  84. let router = useRouter();
  85. let sgdata = ref({});
  86. let aid = ref();
  87. onMounted(() => {
  88. });
  89. // 跳转页面,{ aid:aid.value}
  90. const tiaozhuan = () => {
  91. activeIndex.value="1";
  92. const key =activeIndex.value;
  93. sourcedis.value.changeModel();
  94. sourcedis.value.accident3(key);
  95. boundary.value.accident4(key);
  96. lliudialog.value.accident2(key);
  97. tanimation.value.monitor = false;
  98. router.push({ path:"/configurator"})
  99. // console.log(router.push("/configurator"))
  100. // console.log(router.push("/configurator"))
  101. }
  102. const addselect = () => {
  103. classradio.value = lliudialog.value.classradio;
  104. }
  105. const moxingclick = (val) => {
  106. titlefalse.value = val;
  107. }
  108. const qingsel=()=>{
  109. lliudialog.value.dialogVisible = true;
  110. }
  111. //点击头部弹出弹框
  112. const titleclick = () => {
  113. lliudialog.value.dialogVisible = true;
  114. }
  115. //获取aid
  116. const aidlist = () => {
  117. sgdata.value = lliudialog.value.sgdata;
  118. aid.value = sgdata.value.aid
  119. }
  120. // 获取子组件的方法
  121. const childfun = () => {
  122. sourcedis.value.handledisaster(aid.value);
  123. boundary.value.addboundary(aid.value);
  124. sourcedis.value.accident3();
  125. }
  126. const headerclick = (data) => {
  127. console.log(data);
  128. headerobj.value.name = data.name;
  129. headerobj.value.time = data.time;
  130. aid.value = data.aid
  131. }
  132. const handleSelect = (key) => {
  133. activeIndex.value='';
  134. switch (key) {
  135. case '1':
  136. sourcedis.value.changeModel();
  137. sourcedis.value.accident3(key);
  138. boundary.value.accident4(key);
  139. lliudialog.value.accident2(key);
  140. tanimation.value.monitor = false;
  141. resultbidui.value.accident6(key)
  142. activeIndex.value='1';
  143. break;
  144. case '2':
  145. boundary.value.changeModel();
  146. boundary.value.accident4(key);
  147. sourcedis.value.accident3(key);
  148. lliudialog.value.accident2(key);
  149. tanimation.value.monitor = false;
  150. resultbidui.value.accident6(key)
  151. activeIndex.value='2'
  152. break;
  153. case '3':
  154. lliudialog.value.changeModel();
  155. boundary.value.accident4(key);
  156. sourcedis.value.accident3(key);
  157. lliudialog.value.accident2(key);
  158. tanimation.value.monitor = false;
  159. activeIndex.value='3';
  160. resultbidui.value.accident6(key)
  161. break;
  162. case '4':
  163. boundary.value.accident4(key);
  164. tanimation.value.accident5(aid.value);
  165. sourcedis.value.accident3(key);
  166. lliudialog.value.accident2(key);
  167. resultbidui.value.accident6(key)
  168. activeIndex.value='4'
  169. break;
  170. case '5':
  171. sourcedis.value.changeModel();
  172. sourcedis.value.accident3(key);
  173. boundary.value.accident4(key);
  174. lliudialog.value.accident2(key);
  175. resultbidui.value.accident6(key)
  176. tanimation.value.monitor = false;
  177. activeIndex.value='5';
  178. default:
  179. break;
  180. }
  181. }
  182. </script>
  183. <style lang="scss" scoped>
  184. .appmian {
  185. .el-main {
  186. --el-main-padding: 0 !important;
  187. }
  188. .el-header {
  189. padding: 0;
  190. margin: 0;
  191. width: 100%;
  192. position: absolute;
  193. z-index: 206;
  194. top: 0;
  195. }
  196. }
  197. .ve_menu_logo {
  198. width: 100%;
  199. height: 70px;
  200. background: #0D1639;
  201. white-space: nowrap;
  202. text-align: left;
  203. overflow: hidden;
  204. display: flex;
  205. background: #0D1639;
  206. box-shadow: inset 0px 0px 17px 5px rgba(12, 97, 197, 0.2);
  207. border-radius: 0px 0px 0px 0px;
  208. border-bottom: 1px solid;
  209. box-sizing: border-box;
  210. border-image: linear-gradient(28deg, rgba(31, 107, 255, 1), rgba(31, 107, 255, 0)) 1 1;
  211. .ve_title {}
  212. .ve_logo_img {
  213. padding-left: 30px;
  214. height: 100%;
  215. display: inline-block;
  216. box-sizing: border-box;
  217. vertical-align: middle;
  218. padding: 15px;
  219. }
  220. .ve_logo_title {
  221. width: 160px;
  222. white-space: nowrap;
  223. overflow: hidden;
  224. text-overflow: ellipsis;
  225. display: inline-block;
  226. margin: 0;
  227. vertical-align: middle;
  228. color: #68ADFF;
  229. font-size: 20px;
  230. }
  231. .el-menu-demo {
  232. width: 60% !important;
  233. height: 70px;
  234. border: none !important;
  235. background: rgba(12, 97, 197, 0);
  236. .el-menu-item {
  237. position: relative;
  238. width: 97px;
  239. font-family: Microsoft YaHei UI, Microsoft YaHei UI;
  240. font-weight: bold;
  241. font-size: 13px;
  242. color: #68ADFF;
  243. line-height: 15px;
  244. text-align: center;
  245. font-style: normal;
  246. text-transform: none;
  247. width: 110px;
  248. height: 70px;
  249. border-radius: 0px 0px 0px 0px;
  250. border: none;
  251. }
  252. .is-active {
  253. width: 110px;
  254. height: 70px;
  255. background: radial-gradient(ellipse at 54px 0px, #3AA0FF -37%, #123066 53%);
  256. border-radius: 0px 0px 0px 0px;
  257. border: 1px solid;
  258. border-left: 1px solid rgba(16, 92, 240, 1);
  259. border-right: 1px solid rgba(18, 48, 102, 1);
  260. border-image: linear-gradient(347deg, rgba(16, 92, 240, 1), rgba(18, 48, 102, 1)) 1 1;
  261. &:after {
  262. width: 24px;
  263. height: 1px;
  264. background-color: #fff;
  265. -webkit-transition: all ease-out 0.2s;
  266. transition: all ease-out 0.2s;
  267. content: "";
  268. position: absolute;
  269. left: 50%;
  270. bottom: 15px;
  271. webkit-transform: translate(-50%, 0%);
  272. -moz-transform: translate(-50%, 0%);
  273. transform: translate(-50%, 0%);
  274. }
  275. }
  276. }
  277. .ve_right {
  278. // width: 350px;
  279. height: 70px;
  280. overflow: hidden;
  281. position: absolute;
  282. right: 0;
  283. display: flex;
  284. .ve_time {
  285. height: 55px;
  286. padding-top: 15px;
  287. height: 70px;
  288. border-radius: 0px 0px 0px 0px;
  289. border-left: 2px solid rgba(12, 97, 197, 0.20);
  290. border-right: 2px solid rgba(12, 97, 197, 0.20);
  291. ;
  292. box-sizing: border-box;
  293. padding: 15px 22px;
  294. // border-image: linear-gradient(347deg, rgba(31, 107, 255, 1), rgba(164, 195, 255, 1)) 1 1;
  295. span {
  296. display: block;
  297. font-family: Microsoft YaHei UI, Microsoft YaHei UI;
  298. color: #FFFFFF;
  299. text-align: center;
  300. font-style: normal;
  301. text-transform: none;
  302. }
  303. .l_huoqing {
  304. font-size: 13px;
  305. line-height: 15px;
  306. font-weight: bold;
  307. line-height: 2;
  308. }
  309. .l_time {
  310. font-size: 12px;
  311. line-height: 14px;
  312. font-weight: 400;
  313. }
  314. }
  315. .ve_timeioc {
  316. width: 150px;
  317. height: 70px;
  318. // border-radius: 0px 0px 0px 0px;
  319. // border: 1px solid;
  320. // border-image: linear-gradient(347deg, rgba(16, 92, 240, 1), rgba(164, 195, 255, 1)) 1 1;
  321. font-family: Microsoft YaHei UI, Microsoft YaHei UI;
  322. font-weight: bold;
  323. font-size: 13px;
  324. color: #68ADFF;
  325. line-height: 15px;
  326. text-align: center;
  327. font-style: normal;
  328. text-transform: none;
  329. display: flex;
  330. justify-content: center;
  331. align-items: center;
  332. span {
  333. padding-left: 15px;
  334. }
  335. }
  336. }
  337. }
  338. </style>
  339. <style>
  340. body {
  341. width: 100%;
  342. height: 100vh;
  343. background: #161A2A;
  344. }
  345. button:focus,
  346. button:focus-visible {
  347. outline: none;
  348. }
  349. .l_Dialog {
  350. position: absolute;
  351. z-index: 206;
  352. top: 0;
  353. }
  354. </style>