Home.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420
  1. <template>
  2. <div class="home-wrapper">
  3. <div class="aside aside-left" :class="{ collapse: layoutStore.leftCollapse }">
  4. <!-- 左侧面板 -->
  5. <Transition name="emerge-left">
  6. <PanelLeft v-if="layoutStore.leftPanelType === 'default'" />
  7. </Transition>
  8. <Transition name="emerge-left">
  9. <PanelKyhs v-if="layoutStore.leftPanelType === 'kyhs'" />
  10. </Transition>
  11. <Transition name="emerge-left">
  12. <PanelQjchs v-if="layoutStore.leftPanelType === 'qjchs'" />
  13. </Transition>
  14. <Transition name="emerge-left">
  15. <PanelHxhs v-if="layoutStore.leftPanelType === 'hxhs'" />
  16. </Transition>
  17. <Transition name="emerge-left">
  18. <PanelSgzy v-if="layoutStore.leftPanelType === 'sgzy'" />
  19. </Transition>
  20. <Transition name="emerge-left">
  21. <PanelKypm v-if="layoutStore.leftPanelType === 'kypm'" />
  22. </Transition>
  23. <Transition name="emerge-left">
  24. <PanelSjwg v-if="layoutStore.leftPanelType === 'kytc'" />
  25. </Transition>
  26. </div>
  27. <div class="aside aside-right" :class="{ collapse: layoutStore.rightCollapse }">
  28. <div class="title-main rtl">飞行动态</div>
  29. <ul class="b-fxdt flex justify-between">
  30. <li v-for="item in panelData.flightSummary" class="relative">
  31. <img :src="item.icon" alt="" />
  32. <div class="absolute">
  33. <span>{{ item.label }}</span>
  34. <div>
  35. <!-- <span>{{ item.count }}</span> -->
  36. <NumberScroll :value="item.count" />
  37. <span>{{ item.unit }}</span>
  38. </div>
  39. </div>
  40. </li>
  41. </ul>
  42. <div class="title-main rtl">实时飞行动态</div>
  43. <ScrollTable :table-data="panelData.flightActivity">
  44. <template #headRow>
  45. <tr>
  46. <th>无人机编号</th>
  47. <th>飞行单位/人</th>
  48. <th>航线名称</th>
  49. <th>飞行状态</th>
  50. </tr>
  51. </template>
  52. <template #bodyRow="{ rows }">
  53. <tr v-for="item in rows" :key="item.uavCode" @click="CheckUav(item)" class="cursor-pointer">
  54. <td>{{ item.uavCode }}</td>
  55. <td>{{ item.unit }}</td>
  56. <td>{{ item.routeName }}</td>
  57. <td>
  58. <span
  59. class="tag-text"
  60. :class="{ orange: item.status === '计划终止', yellow: item.status === '已降落' }"
  61. >{{ item.status }}</span
  62. >
  63. </td>
  64. </tr>
  65. </template>
  66. </ScrollTable>
  67. <div class="title-main rtl">飞行告警信息</div>
  68. <ScrollTable :tableData="panelData.flightWarning">
  69. <template #headRow>
  70. <tr>
  71. <th>时间</th>
  72. <th>无人机编号</th>
  73. <th>飞行单位/人</th>
  74. <th>告警类型</th>
  75. </tr>
  76. </template>
  77. <template #bodyRow="{ rows }">
  78. <tr v-for="item in rows" :key="item.uavCode" @click="CheckUav(item)" class="cursor-pointer">
  79. <td>{{ item.time }}</td>
  80. <td>{{ item.uavCode }}</td>
  81. <td>{{ item.unit }}</td>
  82. <td>
  83. <span class="tag-text red">{{ item.type }}</span>
  84. </td>
  85. </tr>
  86. </template>
  87. </ScrollTable>
  88. <div class="title-main rtl">各类预警类型占比次数</div>
  89. <div class="b-wgzb">
  90. <video autoplay muted loop id="bg-wgzb">
  91. <source src="@/assets/images/motion/bg-uav.webm" type="video/webm" />
  92. </video>
  93. <ul>
  94. <li v-for="item in panelData.violationSummary">
  95. <span>{{ item.label }}</span>
  96. <div>
  97. <!-- <span>{{ item.count }}</span> -->
  98. <NumberScroll :value="item.count" />
  99. <div>
  100. <span>{{
  101. Math.round((item.count / panelData.violationSummary.reduce((pre, item) => pre + item.count, 0)) * 100)
  102. }}</span>
  103. <span>%</span>
  104. </div>
  105. </div>
  106. </li>
  107. </ul>
  108. </div>
  109. </div>
  110. <!-- 工具栏 -->
  111. <ToolList />
  112. <!-- 无人机详情 -->
  113. <Transition name="emerge-left">
  114. <FloatPanelUav
  115. class="f-panel-left"
  116. v-if="layoutStore.floatPanels.uav"
  117. @close="layoutStore.toggleFloatPanel('uav', false)" />
  118. </Transition>
  119. <!-- 空域栅格 -->
  120. <Transition name="emerge-bottom">
  121. <FloatPanelKysg v-if="layoutStore.floatPanels.kysg" />
  122. </Transition>
  123. <!-- 空域分层 -->
  124. <Transition name="emerge-left">
  125. <FloatPanelFcky v-if="layoutStore.floatPanels.fcky" />
  126. </Transition>
  127. <!-- 网格查询 -->
  128. <Transition name="emerge-left">
  129. <FloatPanelCube v-if="layoutStore.floatPanels.cube" />
  130. </Transition>
  131. <!-- gis 态势监视-选项面板 -->
  132. <Transition name="emerge-right">
  133. <FloatPanelTsjsGis v-if="layoutStore.floatPanels.tsjs_gis && layoutStore.sceneType === 'gis'" />
  134. </Transition>
  135. <!-- ue 态势监视 -->
  136. <Transition name="emerge-left">
  137. <FloatPanelTsjs v-if="layoutStore.uavMonitorOn" />
  138. </Transition>
  139. </div>
  140. </template>
  141. <script setup>
  142. import { reactive, onMounted } from 'vue'
  143. import { getAssetsFile } from '@/utils/require'
  144. import ToolList from './cpns/ToolList.vue'
  145. // import { setSdtj } from '@/echarts/options.js'
  146. // import getUeFn from '@/utils/UIInteractions'
  147. import useLayoutStore from '@/store/layout'
  148. import PanelLeft from './cpns/PanelLeft.vue'
  149. import PanelKyhs from './cpns/PanelKyhs.vue'
  150. import PanelQjchs from './cpns/PanelQjchs.vue'
  151. import PanelHxhs from './cpns/PanelHxhs.vue'
  152. import PanelSgzy from './cpns/PanelSgzy.vue'
  153. import PanelKypm from './cpns/PanelKypm.vue'
  154. import PanelSjwg from './cpns/PanelSjwg.vue'
  155. import FloatPanelUav from './cpns/FloatPanelUav.vue'
  156. import FloatPanelKysg from './cpns/FloatPanelKysg.vue'
  157. import FloatPanelFcky from './cpns/FloatPanelFcky.vue'
  158. import FloatPanelCube from './cpns/FloatPanelCube.vue'
  159. import FloatPanelTsjs from './cpns/FloatPanelTsjs.vue'
  160. import NumberScroll from '@/components/NumberScroll.vue'
  161. import FloatPanelTsjsGis from './cpns/FloatPanelTsjsGis.vue'
  162. import ScrollTable from '@/components/ScrollTable.vue'
  163. const layoutStore = useLayoutStore()
  164. const panelData = reactive({
  165. flightSummary: [
  166. { label: '飞行计划总数', count: 37, unit: '次', icon: getAssetsFile('page/bg-fxjhzs.png') },
  167. { label: '告警总数', count: 7, unit: '个', icon: getAssetsFile('page/bg-gjzs.png') },
  168. ],
  169. flightActivity: [
  170. { uavCode: 'BM11344738556', unit: '美团无人机', routeName: '合生汇-黄兴公园', status: '飞行中' },
  171. { uavCode: 'BM11344744657', unit: '美团无人机', routeName: '合生汇-黄兴公园', status: '已降落' },
  172. { uavCode: 'BM11342293853', unit: '美团无人机', routeName: '合生汇-黄兴公园', status: '计划终止' },
  173. { uavCode: 'BM11344738559', unit: '美团无人机', routeName: '合生汇-黄兴公园', status: '飞行中' },
  174. { uavCode: 'BM11344738563', unit: '美团无人机', routeName: '合生汇-黄兴公园', status: '飞行中' },
  175. { uavCode: 'BM11344738561', unit: '美团无人机', routeName: '合生汇-黄兴公园', status: '已降落' },
  176. ],
  177. flightWarning: [
  178. { time: '11:20:09', uavCode: 'BM11344738556', unit: '美团无人机1', type: '无人机碰撞' },
  179. { time: '11:08:23', uavCode: 'BM11344738559', unit: '美团无人机4', type: '电量低' },
  180. { time: '10:52:45', uavCode: 'BM11344738561', unit: '美团无人机6', type: '偏离航线' },
  181. { time: '10:49:24', uavCode: 'BM11344738557', unit: '美团无人机2', type: '无人机碰撞' },
  182. { time: '10:36:02', uavCode: 'BM11344738558', unit: '美团无人机3', type: '电量低' },
  183. { time: '10:11:45', uavCode: 'BM11344738562', unit: '美团无人机7', type: '天气预警' },
  184. { time: '10:08:08', uavCode: 'BM11344738560', unit: '美团无人机5', type: '电量低' },
  185. ],
  186. violationSummary: [
  187. { label: '无人机碰撞', count: 2 },
  188. { label: '电量低', count: 3 },
  189. { label: '偏离航线', count: 1 },
  190. { label: '天气预警', count: 1 },
  191. ],
  192. })
  193. function CheckUav(item) {
  194. layoutStore.toggleFloatPanel('uav', true)
  195. }
  196. onMounted(() => {})
  197. </script>
  198. <style lang="scss" scoped>
  199. .home-wrapper {
  200. transition:
  201. left 0.5s ease-out,
  202. right 0.5s ease-out;
  203. .aside {
  204. position: absolute;
  205. height: calc(100vh - var(--header-height) - var(--page-margin-y));
  206. width: var(--aside-width);
  207. padding: 15px 20px 20px;
  208. transition: all 0.5s ease;
  209. background: linear-gradient(to bottom, rgba(0, 10, 30, 0.1) 0%, rgba(0, 10, 30, 0.4) 5%);
  210. border-radius: 0px 0px 12px 12px;
  211. z-index: 3;
  212. }
  213. .aside-left {
  214. left: 0;
  215. &.collapse {
  216. left: calc(0px - var(--aside-width));
  217. }
  218. }
  219. .aside-right {
  220. right: 0;
  221. display: flex;
  222. flex-direction: column;
  223. justify-content: space-between;
  224. &.collapse {
  225. right: calc(0px - var(--aside-width));
  226. }
  227. }
  228. .b-fxdt {
  229. li {
  230. img {
  231. width: 250px;
  232. height: 110px;
  233. margin-left: -10px;
  234. }
  235. & > div {
  236. bottom: 5px;
  237. left: 100px;
  238. z-index: 9;
  239. & > span {
  240. display: block;
  241. font-size: 20px;
  242. text-shadow: 1px 2px 0px rgba(17, 20, 22, 0.22);
  243. }
  244. & > div {
  245. span:first-child {
  246. font-size: 30px;
  247. background: linear-gradient(80deg, rgba(29, 128, 224, 0.9) 0%, rgba(255, 255, 255, 0.9) 100%);
  248. -webkit-background-clip: text !important;
  249. -webkit-text-fill-color: transparent;
  250. margin-right: 5px;
  251. }
  252. span:last-child {
  253. font-family: PingFang;
  254. font-size: 14px;
  255. text-shadow: 1px 2px 0px rgba(17, 20, 22, 0.22);
  256. }
  257. }
  258. }
  259. &:last-child > div {
  260. & > span {
  261. color: #e9ebcf;
  262. }
  263. & > div > span:first-child {
  264. background: linear-gradient(80deg, rgba(215, 215, 169, 0.9) 0%, rgba(255, 255, 255, 0.9) 100%);
  265. }
  266. }
  267. }
  268. }
  269. .tag-text {
  270. display: block;
  271. height: 20px;
  272. min-width: 75px;
  273. width: fit-content;
  274. padding: 0 10px;
  275. border-radius: 10px;
  276. border: 1px solid #7ed893;
  277. font-weight: bold;
  278. font-size: 14px;
  279. line-height: 18px;
  280. color: #7ed893;
  281. text-align: center;
  282. &.red {
  283. color: #e34b4b;
  284. border-color: #e34b4b;
  285. }
  286. &.orange {
  287. color: #e08d8d;
  288. border-color: #e08d8d;
  289. }
  290. &.yellow {
  291. color: #cdd072;
  292. border-color: #cdd072;
  293. }
  294. }
  295. .tbody-row3 {
  296. max-height: 150px;
  297. overflow: hidden;
  298. }
  299. .b-wgzb {
  300. height: 200px;
  301. position: relative;
  302. #bg-wgzb {
  303. position: absolute;
  304. left: 0;
  305. top: -80px;
  306. }
  307. ul {
  308. display: flex;
  309. flex-wrap: wrap;
  310. align-content: space-between;
  311. height: 100%;
  312. padding: 15px;
  313. li {
  314. width: 50%;
  315. height: fit-content;
  316. display: flex;
  317. flex-direction: column;
  318. & > span {
  319. display: block;
  320. width: 104px;
  321. height: 28px;
  322. margin-left: 20px;
  323. background: url('../../assets/images/page/bg-label.png');
  324. background-size: cover !important;
  325. line-height: 28px;
  326. font-size: 16px;
  327. text-align: center;
  328. }
  329. & > div {
  330. width: 163px;
  331. height: 45px;
  332. padding-left: 20px;
  333. display: flex;
  334. align-items: center;
  335. background: url('../../assets/images/page/bg-text-line.png');
  336. background-size: cover !important;
  337. & > span {
  338. font-size: 20px;
  339. margin-right: 13px;
  340. }
  341. & > div {
  342. width: 47px;
  343. height: 20px;
  344. background: linear-gradient(0deg, rgba(78, 113, 183, 0.7), rgba(158, 183, 234, 0.1));
  345. border-radius: 10px;
  346. border: 1px solid;
  347. // border-image: linear-gradient(0deg, #2C53A1, #97B1E4) 1 1;
  348. color: #97b4ed;
  349. font-size: 18px;
  350. line-height: 18px;
  351. text-align: center;
  352. & > span:last-child {
  353. font-size: 14px;
  354. margin-left: 1px;
  355. }
  356. }
  357. }
  358. &:nth-child(2n) {
  359. align-items: end;
  360. & > span {
  361. margin-right: 20px;
  362. background: url('../../assets/images/page/bg-label2.png');
  363. }
  364. & > div {
  365. padding-right: 20px;
  366. justify-content: end;
  367. background: url('../../assets/images/page/bg-text-line2.png');
  368. }
  369. }
  370. }
  371. }
  372. }
  373. }
  374. </style>