index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485
  1. <template>
  2. <div class="right-section">
  3. <div class="task-header">
  4. <div class="task-item">
  5. <div class="icon">
  6. <div class="icon1"></div>
  7. </div>
  8. <div class="task-text gradient-text">任务下达</div>
  9. </div>
  10. <div class="task-item">
  11. <div class="icon">
  12. <div class="icon2"></div>
  13. </div>
  14. <div class="task-text gradient-text">粤政伊群聊</div>
  15. </div>
  16. <div class="task-item">
  17. <div class="icon">
  18. <div class="icon3"></div>
  19. </div>
  20. <div class="task-text gradient-text">通讯录</div>
  21. </div>
  22. <div class="task-item">
  23. <div class="icon">
  24. <div class="icon4"></div>
  25. </div>
  26. <div class="task-text gradient-text">启动预警</div>
  27. </div>
  28. <div class="task-item">
  29. <div class="icon">
  30. <div class="icon5"></div>
  31. </div>
  32. <div class="task-text gradient-text">知识库</div>
  33. </div>
  34. <div class="back-btn">
  35. <div class="btn-text">返回上级</div>
  36. </div>
  37. </div>
  38. <div class="video-card">
  39. <div class="title gradient-text">视频监控</div>
  40. <div class="card-content video-list">
  41. <div v-for="(item, index) in videoMonitorState.listData" :key="index" class="video-box" @click="showVideoDialog(item)">
  42. <div class="video-content">
  43. <div style="width: 550px; height: 300px; position: relative">
  44. <HKVideo :dot_data="item" :width="550" :height="300" />
  45. <div class="video-label">
  46. <span class="label">{{ item.name }}</span>
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. <JointDuty />
  54. <!-- <div class="message-card">-->
  55. <!-- <div class="title gradient-text">动态消息</div>-->
  56. <!-- <div class="message-menu">-->
  57. <!-- <div :class="menuState.activeIndex === 0 ? 'menu-item menu-active' : 'menu-item'" @click="menuState.activeIndex = 0">消息动态</div>-->
  58. <!-- <div :class="menuState.activeIndex === 1 ? 'menu-item menu-active' : 'menu-item'" @click="menuState.activeIndex = 1">任务跟踪</div>-->
  59. <!-- <div :class="menuState.activeIndex === 2 ? 'menu-item menu-active' : 'menu-item'" @click="menuState.activeIndex = 2">资源调度</div>-->
  60. <!-- </div>-->
  61. <!-- <div v-show="menuState.activeIndex === 0" class="message-content">-->
  62. <!-- <div v-for="(item, index) in menuState.messageData" :key="index" class="message-item">-->
  63. <!-- <i :class="getIconClass(item.type)"></i>-->
  64. <!-- <div class="message-box">-->
  65. <!-- <div :class="getTagClass(item.type)">{{ item.text }}</div>-->
  66. <!-- <div class="message-time">{{ item.time }}</div>-->
  67. <!-- </div>-->
  68. <!-- </div>-->
  69. <!-- </div>-->
  70. <!-- </div>-->
  71. </div>
  72. <Dialog v-model="videoMonitorState.showListDialog" title="视频监控">
  73. <videoList />
  74. </Dialog>
  75. </template>
  76. <script lang="ts" setup>
  77. import router from '@/router';
  78. import { getEmergencyVideoCata} from '@/api/routineCommandMap';
  79. import JointDuty from '@/views/emergencyCommandMap/RightSection/JointDuty.vue';
  80. const goToHome = () => {
  81. router.push({ path: '/' });
  82. };
  83. // 视频监控
  84. const videoMonitorState = reactive({
  85. listData: [],
  86. showListDialog: false,
  87. showDetailDialog: false,
  88. detailData: { name: '', url: '' }
  89. });
  90. // 显示视频列表
  91. const showVideoMonitorList = () => {
  92. videoMonitorState.showListDialog = true;
  93. };
  94. // 显示视频弹窗
  95. const showVideoDialog = (item) => {
  96. videoMonitorState.detailData = item;
  97. videoMonitorState.showDetailDialog = true;
  98. };
  99. // 动态消息
  100. const menuState = reactive({
  101. activeIndex: 0,
  102. // type 1success 2 primary 3 warning 4danger
  103. messageData: []
  104. });
  105. // 获取消息动态图标
  106. const getIconClass = (type) => {
  107. let className = 'message-primary';
  108. if (type === '1') {
  109. className = 'message-success';
  110. } else if (type === '2') {
  111. className = 'message-primary';
  112. } else if (type === '3') {
  113. className = 'message-warning';
  114. } else if (type === '4') {
  115. className = 'message-danger';
  116. }
  117. return className;
  118. };
  119. // 获取消息动态tag
  120. const getTagClass = (type) => {
  121. let className = 'tag-primary';
  122. if (type === '1') {
  123. className = 'tag-success';
  124. } else if (type === '2') {
  125. className = 'tag-primary';
  126. } else if (type === '3') {
  127. className = 'tag-warning';
  128. } else if (type === '4') {
  129. className = 'tag-danger';
  130. }
  131. return className
  132. };
  133. // 初始化数据
  134. const initData = () => {
  135. // 预案管理数据
  136. getEmergencyVideoCata({
  137. current: 1,
  138. size: 8
  139. }).then((res) => {
  140. videoMonitorState.listData = res.rows;
  141. });
  142. // 动态消息
  143. menuState.messageData = [
  144. { type: '1', text: '结束处置', time: '2024-07-04 13:25:49' },
  145. { type: '2', text: '发起粤政易群聊', time: '2024-07-04 13:25:49' },
  146. { type: '3', text: '发起视频会商', time: '2024-07-04 13:25:49' },
  147. { type: '4', text: '启动二级响应预案', time: '2024-07-04 13:25:49' },
  148. { type: '4', text: '事件接报,详情:广东省茂名市茂南区东荟城发生洪涝灾害', time: '2024-07-04 13:25:49' }
  149. ];
  150. };
  151. onMounted(() => {
  152. initData();
  153. });
  154. </script>
  155. <style lang="scss" scoped>
  156. .right-section {
  157. width: 2668px;
  158. height: 100%;
  159. display: flex;
  160. flex-direction: column;
  161. font-size: 74px;
  162. padding-top: 57px;
  163. .task-header {
  164. display: flex;
  165. justify-content: space-around; /* 使按钮在div内均匀分布 */
  166. align-items: center; /* 使按钮垂直居中 */
  167. width: 100%;
  168. margin-bottom: 62px;
  169. .task-item {
  170. display: flex;
  171. flex-direction: column;
  172. justify-content: center;
  173. align-items: center;
  174. .icon {
  175. position: relative;
  176. width: 170px;
  177. height: 170px;
  178. //padding-left: 60px;
  179. }
  180. .icon1,
  181. .icon2,
  182. .icon3,
  183. .icon4,
  184. .icon5 {
  185. position: absolute;
  186. width: 224px;
  187. height: 238px;
  188. }
  189. .icon1 {
  190. background: url('@/assets/images/emergencyCommandMap/icon1.png') no-repeat 100% 100%;
  191. }
  192. .icon2 {
  193. background: url('@/assets/images/emergencyCommandMap/icon2.png') no-repeat 100% 100%;
  194. }
  195. .icon3 {
  196. background: url('@/assets/images/emergencyCommandMap/icon3.png') no-repeat 100% 100%;
  197. }
  198. .icon4 {
  199. background: url('@/assets/images/emergencyCommandMap/icon4.png') no-repeat 100% 100%;
  200. }
  201. .icon5 {
  202. background: url('@/assets/images/emergencyCommandMap/icon5.png') no-repeat 100% 100%;
  203. }
  204. .task-text gradient-text {
  205. font-size: 60px !important;
  206. }
  207. }
  208. .back-btn {
  209. width: 521px;
  210. height: 194px;
  211. line-height: 175px;
  212. padding-left: 175px;
  213. background: url('@/assets/images/emergencyCommandMap/backBtn.png') no-repeat 100% 100%;
  214. .btn-text {
  215. font-family: 'SourceHanSansCN';
  216. font-size: 48px;
  217. /* 设置字体透明 */
  218. color: transparent;
  219. /* 设置线性渐变,从红色渐变到蓝色 */
  220. background-image: linear-gradient(to right, #fff 40%, #b7ddfd 50%, #82c5fd 100%);
  221. /* 使用 -webkit-background-clip 属性将背景剪裁至文本形状 */
  222. -webkit-background-clip: text;
  223. /* 非Webkit内核浏览器需要使用标准前缀 */
  224. background-clip: text;
  225. /* 把当前元素设置为行内块,以便能够应用背景 */
  226. display: inline-block;
  227. }
  228. }
  229. }
  230. .video-card {
  231. width: 2601px;
  232. height: 879px;
  233. background: url('@/assets/images/emergencyCommandMap/videoBox1.png') no-repeat 100% 100%;
  234. position: relative;
  235. .video-list {
  236. display: flex;
  237. flex-wrap: wrap;
  238. padding-top: 100px;
  239. padding-left: 60px;
  240. .video-box {
  241. width: 600px;
  242. height: 356px;
  243. margin-right: 35.06px;
  244. cursor: pointer;
  245. background: url('@/assets/images/emergencyCommandMap/videoBg.png') no-repeat 100% 100%;
  246. padding: 14.5px 9px;
  247. &:nth-child(1),
  248. &:nth-child(2),
  249. &:nth-child(3),
  250. &:nth-child(4) {
  251. margin-bottom: 3.5px;
  252. }
  253. &:nth-child(4),
  254. &:nth-child(8) {
  255. margin-right: 0;
  256. }
  257. .video-content {
  258. width: 582px;
  259. height: 327px;
  260. background: url('@/assets/images/emergencyCommandMap/videoBox2.png') no-repeat 100% 100%;
  261. display: flex;
  262. justify-content: center;
  263. align-items: center;
  264. position: relative;
  265. }
  266. .video-label {
  267. position: absolute;
  268. bottom: 0;
  269. right: 0;
  270. display: flex;
  271. .label {
  272. width: 410px;
  273. height: 50px;
  274. line-height: 50px;
  275. font-size: 32px;
  276. white-space: nowrap;
  277. overflow: hidden;
  278. text-overflow: ellipsis;
  279. padding-left: 10px;
  280. color: #fff;
  281. background-color: rgba(0, 0, 0, 0.4);
  282. }
  283. &::before {
  284. content: '';
  285. width: 0;
  286. height: 0;
  287. border-bottom: 50px solid rgba(0, 0, 0, 0.4);
  288. border-left: 50px solid transparent;
  289. }
  290. }
  291. }
  292. }
  293. }
  294. .message-card {
  295. width: 2668px;
  296. height: 884px;
  297. background: url('@/assets/images/emergencyCommandMap/messageBox.png') no-repeat 100% 100%;
  298. position: relative;
  299. padding-bottom: 40px;
  300. }
  301. .title {
  302. position: absolute;
  303. top: 6px;
  304. left: 141px;
  305. font-size: 60px;
  306. }
  307. .message-menu {
  308. display: flex;
  309. margin-top: 95px;
  310. margin-left: 50px;
  311. .menu-item {
  312. width: 349px;
  313. height: 118px;
  314. padding-left: 68px;
  315. line-height: 145px;
  316. background: url('@/assets/images/emergencyCommandMap/tab.png');
  317. opacity: 0.7;
  318. font-size: 44px;
  319. color: #fff;
  320. font-family: 'YouSheBiaoTiHei';
  321. cursor: pointer;
  322. margin-left: -40px;
  323. &:first-child {
  324. margin-left: 0;
  325. }
  326. &:hover {
  327. width: 349px;
  328. height: 122px;
  329. background: url('@/assets/images/emergencyCommandMap/tabActive.png');
  330. opacity: 1;
  331. }
  332. }
  333. .menu-active {
  334. width: 349px;
  335. height: 122px;
  336. background: url('@/assets/images/emergencyCommandMap/tabActive.png');
  337. opacity: 1;
  338. }
  339. }
  340. .message-content {
  341. margin-left: 155px;
  342. overflow: auto;
  343. height: 625px;
  344. .message-item {
  345. display: flex;
  346. align-items: center;
  347. margin-top: 11.5px;
  348. .message-success {
  349. width: 115px;
  350. height: 114px;
  351. background: url('@/assets/images/emergencyCommandMap/message_success.png') no-repeat;
  352. }
  353. .message-primary {
  354. width: 115px;
  355. height: 114px;
  356. background: url('@/assets/images/emergencyCommandMap/message_primary.png') no-repeat;
  357. }
  358. .message-warning {
  359. width: 115px;
  360. height: 114px;
  361. background: url('@/assets/images/emergencyCommandMap/message_warning.png') no-repeat;
  362. }
  363. .message-danger {
  364. width: 111px;
  365. height: 112px;
  366. background: url('@/assets/images/emergencyCommandMap/message_danger.png') no-repeat;
  367. }
  368. .message-box {
  369. width: 2136px;
  370. min-height: 114px;
  371. background: url('@/assets/images/emergencyCommandMap/messagBox2.png') no-repeat;
  372. margin-left: -30px;
  373. color: #fff;
  374. font-size: 38px;
  375. font-family: 'PingFang SC', sans-serif;
  376. display: flex;
  377. justify-content: space-between;
  378. align-items: center;
  379. padding: 0 320px 0 78px;
  380. .tag-success {
  381. border-radius: 15px;
  382. background: #104f72;
  383. padding: 10px 15px;
  384. }
  385. .tag-primary {
  386. border-radius: 15px;
  387. background: #0c3d90;
  388. padding: 10px 15px;
  389. }
  390. .tag-warning {
  391. border-radius: 15px;
  392. background: #3a495c;
  393. padding: 10px 15px;
  394. }
  395. .tag-danger {
  396. border-radius: 15px;
  397. background: #3b2d65;
  398. padding: 10px 20px;
  399. }
  400. .message-time {
  401. color: #00e8ff;
  402. font-family: 'BEBAS-1';
  403. font-size: 32px;
  404. }
  405. }
  406. }
  407. }
  408. }
  409. .card {
  410. width: 100%;
  411. background-color: #ffffff;
  412. border-radius: 26px;
  413. padding: 46px 69px;
  414. margin-bottom: 69px;
  415. animation-name: slide;
  416. .header-container {
  417. width: 100%;
  418. display: flex;
  419. //justify-content: space-between;
  420. align-items: center;
  421. padding: 10px;
  422. }
  423. .custom-button {
  424. width: 100px;
  425. height: 80px;
  426. font-size: 14px;
  427. }
  428. .card-header {
  429. width: 100%;
  430. display: flex;
  431. justify-content: space-between;
  432. align-items: center;
  433. }
  434. &:last-child {
  435. margin-bottom: 0;
  436. }
  437. &:nth-child(1) {
  438. animation-duration: 0.5s;
  439. }
  440. &:nth-child(2) {
  441. height: 667.5px;
  442. animation-duration: 1s;
  443. }
  444. &:nth-child(3) {
  445. height: 667.5px;
  446. animation-duration: 1.5s;
  447. }
  448. }
  449. @keyframes slide {
  450. 0% {
  451. transform: translateX(100%);
  452. }
  453. 80% {
  454. transform: translateX(-92px);
  455. }
  456. 100% {
  457. transform: translateX(0);
  458. }
  459. }
  460. .more {
  461. color: #1890ff;
  462. cursor: pointer;
  463. }
  464. </style>