tky-index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465
  1. <template>
  2. <div>
  3. <el-container class="content-height-fit">
  4. <el-container class="resize-fit-container">
  5. <div class="app-container">
  6. <el-row :gutter="16">
  7. <el-col :sm="18" :md="18">
  8. <el-select v-model="query.deviceManageId" size="mini" placeholder="请选择设备" @change="deviceChange">
  9. <el-option
  10. v-for="item in griderErections"
  11. :key="item.value"
  12. :label="item.label"
  13. :value="item.value"
  14. />
  15. </el-select>
  16. <el-tag type="success" style="margin-left: 6px;" size="mini">在线</el-tag>
  17. <el-select v-model="query.beamCode" size="mini" style="float:right;margin-right: 6px;" placeholder="请选择梁片编码">
  18. <el-option
  19. v-for="item in beams"
  20. :key="item.value"
  21. :label="item.label"
  22. :value="item.value"
  23. />
  24. </el-select>
  25. </el-col>
  26. <el-col :sm="6" :md="6">
  27. <span style="color: white;font-size: 18px;">视频监控</span>
  28. </el-col>
  29. </el-row>
  30. <el-row>
  31. <el-col :lg="18" :sm="18" :xs="18" :xl="18" :md="18" style="padding-right: 8px">
  32. <div class="boxall">
  33. <el-row>
  34. <el-col :lg="4" :sm="4" :xs="4" :xl="4" :md="4">
  35. <div class="boxCenter" style="cursor:pointer " @click="warningClick">
  36. <div class="box-warning"><i class="el-icon-warning" /><span style="margin-left:5px">报警信息</span></div>
  37. <div class="left-div"><span style="font-size: 25px;color: yellow;">{{ data.warningCount }}</span>次</div>
  38. <div class="left-foot">已解除报警{{ data.doneWarningCount }}次</div>
  39. </div>
  40. <div class="boxCenter">
  41. <div class="box-warning"><i class="el-icon-timer" /><span style="margin-left:5px">工作时长</span></div>
  42. <div class="left-div"><span style="font-size: 25px;color: yellow;">{{ data.timeCount }}</span>小时</div>
  43. <div class="left-foot">累计工作{{ data.allTimeCount }}小时</div>
  44. </div>
  45. <div class="boxCenter">
  46. <div class="box-warning"><i class="el-icon-refresh" /><span style="margin-left:5px">运梁次数</span></div>
  47. <div class="left-div"><span style="font-size: 25px;color: yellow;">{{ data.cycleCount }}</span>次</div>
  48. <div class="left-foot">累计运梁{{ data.allCycleCount }}次</div>
  49. </div>
  50. </el-col>
  51. <el-col :lg="20" :sm="20" :xs="20" :xl="20" :md="20">
  52. <div class="titleup">
  53. <span>最近更新时间:</span><span style="color:yellow;font-weight: bold;">{{ noGuide.uploadTime | datetimeseconds }}</span>
  54. </div>
  55. <div ref="canvasdiv" style="background: #0AA4BC">
  56. <baidu-map
  57. style="width:100%;height:400px"
  58. class="map"
  59. :ak="baiduKey"
  60. :map-type="mapType"
  61. :zoom="14"
  62. center="北京"
  63. :scroll-wheel-zoom="true"
  64. >
  65. <bm-scale anchor="BMAP_ANCHOR_TOP_RIGHT" />
  66. <bm-navigation anchor="BMAP_ANCHOR_BOTTOM_RIGHT" />
  67. <bm-map-type :map-types="['BMAP_EARTH_MAP', 'BMAP_EARTH_MAP']" anchor="BMAP_ANCHOR_TOP_RIGHT" />
  68. </baidu-map>
  69. </div>
  70. </el-col>
  71. </el-row>
  72. <div class="boxfoot" />
  73. </div>
  74. </el-col>
  75. <el-col :xs="6" :sm="6" :md="6">
  76. <div class="boxall">
  77. <el-row :gutter="8" style="margin-top:6px">
  78. <el-col :sm="12" :md="12">
  79. <img src="../../../assets/ylc1.jpg" width="100%" height="210">
  80. </el-col>
  81. <el-col :sm="12" :md="12" style="padding-bottom: 8px;">
  82. <img src="../../../assets/ylc2.jpg" width="100%" height="210">
  83. </el-col>
  84. <el-col :sm="12" :md="12">
  85. <img src="../../../assets/ylc3.jpg" width="100%" height="210">
  86. </el-col>
  87. <el-col :sm="12" :md="12">
  88. <img src="../../../assets/ylc4.jpg" width="100%" height="210">
  89. </el-col>
  90. </el-row>
  91. <div class="boxfoot" />
  92. </div>
  93. </el-col>
  94. </el-row>
  95. <el-row>
  96. <el-col :lg="24" :sm="24" :xs="24" :xl="24" :md="24">
  97. <div class="boxall">
  98. <el-row :gutter="16">
  99. <el-col :lg="16" :sm="16" :xs="16" :xl="16" :md="16">
  100. <el-row>
  101. <el-col :lg="24" :sm="24" :xs="24" :xl="24" :md="24">
  102. <box icon="el-icon-help" title="限位状态" class="boxColor">
  103. <div>
  104. <LimitState ref="limitState" />
  105. </div>
  106. </box>
  107. </el-col>
  108. </el-row>
  109. <el-row :gutter="16">
  110. <el-col :lg="12" :sm="12" :xs="12" :xl="12" :md="12">
  111. <box icon="el-icon-help" title="基本信息" class="boxInfo">
  112. <div>
  113. <THAInfo ref="thaInfo" />
  114. </div>
  115. </box>
  116. </el-col>
  117. <el-col :lg="12" :sm="12" :xs="12" :xl="12" :md="12">
  118. <box icon="el-icon-help" title="前车或后车压力" class="boxInfo">
  119. <div>
  120. <BeamSupport ref="beamSupport" />
  121. </div>
  122. </box>
  123. </el-col>
  124. </el-row>
  125. </el-col>
  126. <el-col :lg="8" :sm="8" :xs="8" :xl="8" :md="8">
  127. <box icon="el-icon-help" title="前车或后车均衡力" class="boxColor">
  128. <div>
  129. <TacklingSys ref="tacklingSys" />
  130. </div>
  131. </box>
  132. </el-col>
  133. </el-row>
  134. <div class="boxfoot" />
  135. </div>
  136. </el-col>
  137. </el-row>
  138. </div>
  139. <el-dialog title="预警详情" :close-on-click-modal="false" :visible.sync="proDucitonVisible" class="roll-dialog" top="20vh" width="50%">
  140. <el-table v-loading="listLoading" row-key="id" :data="warnings" border stripe fit highlight-current-row height="400px">
  141. <el-table-column label="序号" type="index" align="center" />
  142. <el-table-column label="报警时间" prop="warningDate" align="center">
  143. <template slot-scope="{row}">
  144. {{ row.warningDate |datetimeseconds }}
  145. </template>
  146. </el-table-column>
  147. <el-table-column label="报警记录" prop="warningRecord" align="center" />
  148. <el-table-column label="解除报警时间" align="center">
  149. <template slot-scope="{row}">
  150. {{ row.relieveDate |datetimeseconds }}
  151. </template>
  152. </el-table-column>
  153. <el-table-column label="是否解除" align="center">
  154. <template slot-scope="{row}">
  155. <el-tag size="mini" :type="row.isAlarm?'success':'danger'">{{ row.isAlarm?"已解除":"未解除" }}</el-tag>
  156. </template>
  157. </el-table-column>
  158. </el-table>
  159. <div slot="footer" class="dialog-footer">
  160. <el-button @click="proDucitonVisible = false">取消</el-button>
  161. </div>
  162. </el-dialog>
  163. </el-container>
  164. </el-container>
  165. </div>
  166. </template>
  167. <script>
  168. import Box from '@/components/Box/Box'
  169. import waves from '@/directive/waves' // waves directive
  170. import THAInfo from '@/views/grider-erections/beam-carrier-work-info/components/THAInfo.vue'
  171. import BaiduMap from 'vue-baidu-map/components/map/Map.vue'
  172. import BmScale from 'vue-baidu-map/components/controls/Scale'
  173. import BmMapType from 'vue-baidu-map/components/controls/MapType'
  174. import BmNavigation from 'vue-baidu-map/components/controls/Navigation'
  175. import BeamSupport from '@/views/grider-erections/beam-carrier-work-info/components/beam-support.vue'
  176. import TacklingSys from '@/views/grider-erections/beam-carrier-work-info/components/tackling-sys.vue'
  177. import LimitState from '@/views/grider-erections/beam-carrier-work-info/components/limit-state.vue'
  178. import * as griderErectionApi from '@/api/grider-erection'
  179. import _ from 'lodash'
  180. export default {
  181. directives: { waves },
  182. components: {
  183. Box, //, InnerSidebar, ProjectSectionDeviceTree
  184. THAInfo,
  185. BeamSupport,
  186. TacklingSys,
  187. LimitState,
  188. BmMapType,
  189. BaiduMap,
  190. BmScale,
  191. BmNavigation
  192. },
  193. data() {
  194. return {
  195. mapType: 'BMAP_SATELLITE_MAP',
  196. griderErections: [
  197. {
  198. value: 'EA64ABA4-3514-9D82-0D8C-3A03141B7962',
  199. label: '运梁车-HSH-LC01-SXJ900',
  200. type: 1
  201. },
  202. {
  203. value: 'E0F30D4B-55B5-0C56-4841-3A0314301ED1',
  204. label: '运梁车-HSH-LC02-YTJ',
  205. type: 2
  206. }
  207. ],
  208. beams: [
  209. {
  210. value: '2022060101',
  211. label: '2022060101'
  212. }
  213. ],
  214. query: {
  215. deviceManageId: 'EA64ABA4-3514-9D82-0D8C-3A03141B7962',
  216. beamCode: '2022060101'
  217. },
  218. listLoading: false,
  219. proDucitonVisible: false,
  220. modelVisible: true,
  221. data: {},
  222. noGuide: {},
  223. warnings: [],
  224. playback: { anim: null, isAnimRunning: false }
  225. }
  226. },
  227. computed: {
  228. baiduKey() {
  229. return process.env.VUE_APP_BD_MAP_KEY
  230. }
  231. },
  232. created() {
  233. },
  234. async mounted() {
  235. this.loading = true
  236. try {
  237. await this.$store.dispatch('user/clientCredentials')
  238. this.loading = false
  239. } catch (ex) {
  240. console.log(ex)
  241. }
  242. griderErectionApi.getList(this.query).then(res => {
  243. this.data = res
  244. if (res.splitTypeNoGuideBeams.length > 0) {
  245. this.noGuide = res.splitTypeNoGuideBeams[res.splitTypeNoGuideBeams.length - 1]
  246. this.returndata(res.splitTypeNoGuideBeams[res.splitTypeNoGuideBeams.length - 1])
  247. }
  248. })
  249. },
  250. methods: {
  251. hitoryClick() {
  252. this.$refs.towD.playBack(this.data.splitTypeNoGuideBeams)
  253. },
  254. playbacking(data) {
  255. this.playback = data
  256. },
  257. stopPlayback() {
  258. this.$refs.towD.stopPlayback()
  259. },
  260. pause() {
  261. this.$refs.towD.suspend()
  262. },
  263. goon() {
  264. this.$refs.towD.goon()
  265. },
  266. zoomIn() {
  267. this.$refs.towD.zoomIn()
  268. },
  269. zoomOut() {
  270. this.$refs.towD.zoomOut()
  271. },
  272. speedUp() {
  273. this.$refs.towD.speedUp()
  274. },
  275. speedDown() {
  276. this.$refs.towD.speedDown()
  277. },
  278. returndata(data) {
  279. this.$refs.limitState.show(data)
  280. this.$refs.thaInfo.show(data)
  281. this.$refs.beamSupport.show(data)
  282. this.$refs.tacklingSys.show(data)
  283. },
  284. warningClick() {
  285. this.proDucitonVisible = true
  286. this.listLoading = true
  287. griderErectionApi.getWarnings(this.query)
  288. .then(res => {
  289. this.warnings = res
  290. this.listLoading = false
  291. })
  292. },
  293. deviceChange(id) {
  294. var grider = _.find(this.griderErections, ['value', id])
  295. if (grider.type === 1) {
  296. this.modelVisible = true
  297. } else {
  298. this.modelVisible = false
  299. }
  300. }
  301. }
  302. }
  303. </script>
  304. <style lang="scss" scoped>
  305. ::v-deep .resize-fit-container {
  306. width: 100%;
  307. padding: 8px;
  308. overflow-y: auto;
  309. background: #181833;
  310. }
  311. // .el-table {
  312. // line-height: 1em;
  313. // }
  314. .content-height-fit {
  315. height: calc(100vh - 0px) !important;
  316. }
  317. // ::v-deep .el-table__body-wrapper {
  318. // &::-webkit-scrollbar { // 整个滚动条
  319. // width: 0; // 纵向滚动条的宽度
  320. // background: rgba(213,215,220,0.3);
  321. // border: none;
  322. // }
  323. // &::-webkit-scrollbar-track { // 滚动条轨道
  324. // border: none;
  325. // }
  326. // }
  327. ::v-deep .el-table th.gutter{
  328. display: none;
  329. width:0
  330. }
  331. ::v-deep .el-table colgroup col[name='gutter']{
  332. display: none;
  333. width: 0;
  334. }
  335. ::v-deep .el-table__body{
  336. width: 100% !important;
  337. }
  338. .boxall {
  339. margin-top: 8px;
  340. border: 2px solid #1b5677;
  341. padding: 0rem .3rem .3rem;
  342. position: relative;
  343. //margin-bottom: 1rem;
  344. height: 445px;
  345. }
  346. .boxCenter{
  347. border: 3px solid #0A3054;
  348. padding: 0rem .3rem .3rem;
  349. position: relative;
  350. width: 80%;
  351. margin: auto;
  352. //margin-bottom: 1rem;
  353. height: 120px;
  354. margin-top: 20px;
  355. }
  356. .box-warning{
  357. color: #fff;
  358. margin-top: 10px;
  359. margin-left: 5px;
  360. }
  361. .left-div{
  362. //border-bottom: 1px solid;
  363. margin: 5px 25px;
  364. color: #fff;
  365. }
  366. .left-foot{
  367. //border-bottom: 1px solid;
  368. margin-top: 0px;
  369. margin-left: 25px;
  370. color: #fff;
  371. }
  372. .boxall:before,
  373. .boxall:after {
  374. position: absolute;
  375. width: 1rem;
  376. height: 1rem;
  377. content: "";
  378. border-top: 3px solid #02a6b5;
  379. top: 0;
  380. }
  381. .boxall:before,
  382. .boxfoot:before {
  383. border-left: 3px solid #02a6b5;
  384. left: 0;
  385. }
  386. .boxall:after,
  387. .boxfoot:after {
  388. border-right: 3px solid #02a6b5;
  389. right: 0;
  390. }
  391. .boxfoot {
  392. position: absolute;
  393. bottom: 0;
  394. width: 100%;
  395. left: 0;
  396. }
  397. .boxfoot:before,
  398. .boxfoot:after {
  399. position: absolute;
  400. width: 1rem;
  401. height: 1rem;
  402. content: "";
  403. border-bottom: 3px solid #02a6b5;
  404. bottom: 0;
  405. }
  406. .titleup{
  407. padding: 6px 0px;
  408. color: white;
  409. }
  410. .boxColor{
  411. background: #162B56;
  412. margin-bottom:0px;
  413. margin-top: 20px;
  414. }
  415. .boxInfo {
  416. background: #162B56;
  417. margin-bottom: 0px;
  418. margin-top: 35px;
  419. }
  420. ::v-deep .card-header {
  421. background-color: transparent;
  422. border-bottom: 1px solid rgba(0,0,0,.125);
  423. padding: 0.25rem 1.25rem;
  424. position: relative;
  425. border-top-left-radius: .25rem;
  426. border-top-right-radius: .25rem;
  427. }
  428. ::v-deep .card-title {
  429. float: left;
  430. font-size: 1.1rem;
  431. font-weight: bold;
  432. color: white;
  433. margin: 0;
  434. }
  435. ::v-deep .card-body {
  436. -ms-flex: 1 1 auto;
  437. -webkit-box-flex: 1;
  438. flex: 1 1 auto;
  439. min-height: 1px;
  440. padding: 0.25rem;
  441. }
  442. ::v-deep .BMap_cpyCtrl{
  443. display: none !important;
  444. }
  445. ::v-deep .anchorBL{
  446. display:none !important;
  447. }
  448. ::v-deep .BMap_stdMpZoom{
  449. display:none !important;
  450. }
  451. ::v-deep .BMap_stdMpPan{
  452. display:none !important;
  453. }
  454. </style>