tky-index.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  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 style="float:right">
  55. <el-button v-if="!playback.isAnimRunning && !playback.anim" type="primary" size="mini" @click="hitoryClick">开始回放</el-button>
  56. <el-button v-if="playback.anim" type="primary" size="mini" @click="stopPlayback">停止回放</el-button>
  57. <el-button v-if="!playback.isAnimRunning && playback.anim" type="primary" size="mini" @click="goon">继续</el-button>
  58. <el-button v-if="playback.isAnimRunning && playback.anim" type="danger" size="mini" @click="pause">暂停</el-button>
  59. <el-button v-if="playback.anim" type="primary" size="mini" @click="speedUp">加速</el-button>
  60. <el-button v-if="playback.anim" type="primary" size="mini" @click="speedDown">减速</el-button>
  61. <el-button type="primary" size="mini" @click="zoomIn">放大</el-button>
  62. <el-button type="primary" size="mini" @click="zoomOut">缩小</el-button>
  63. </div>
  64. </div>
  65. <div ref="canvasdiv" style="background: #0AA4BC">
  66. <New2d v-if="modelVisible" ref="towD" @playbacking="playbacking" @returndata="returndata" />
  67. <Kiosk2dModel v-if="!modelVisible" />
  68. </div>
  69. </el-col>
  70. </el-row>
  71. <div class="boxfoot" />
  72. </div>
  73. </el-col>
  74. <el-col :xs="6" :sm="6" :md="6">
  75. <div class="boxall">
  76. <el-row :gutter="8" style="margin-top:6px">
  77. <el-col :sm="12" :md="12">
  78. <img src="../../../assets/jqj1.png" width="100%" height="210">
  79. </el-col>
  80. <el-col :sm="12" :md="12" style="padding-bottom: 8px;">
  81. <img src="../../../assets/jqj2.jpg" width="100%" height="210">
  82. </el-col>
  83. <el-col :sm="12" :md="12">
  84. <img src="../../../assets/jqj3.jpg" width="100%" height="210">
  85. </el-col>
  86. <el-col :sm="12" :md="12">
  87. <img src="../../../assets/jqj4.jpg" width="100%" height="210">
  88. </el-col>
  89. </el-row>
  90. <div class="boxfoot" />
  91. </div>
  92. </el-col>
  93. </el-row>
  94. <el-row>
  95. <el-col :lg="24" :sm="24" :xs="24" :xl="24" :md="24">
  96. <div class="boxall">
  97. <el-row :gutter="16">
  98. <el-col :lg="16" :sm="16" :xs="16" :xl="16" :md="16">
  99. <el-row>
  100. <el-col :lg="24" :sm="24" :xs="24" :xl="24" :md="24">
  101. <box icon="el-icon-help" title="限位状态" class="boxColor">
  102. <div>
  103. <LimitState ref="limitState" />
  104. </div>
  105. </box>
  106. </el-col>
  107. </el-row>
  108. <el-row :gutter="16">
  109. <el-col :lg="12" :sm="12" :xs="12" :xl="12" :md="12">
  110. <box icon="el-icon-help" title="基本信息" class="boxInfo">
  111. <div>
  112. <THAInfo ref="thaInfo" />
  113. </div>
  114. </box>
  115. </el-col>
  116. <el-col :lg="12" :sm="12" :xs="12" :xl="12" :md="12">
  117. <box icon="el-icon-help" title="主梁和支座" class="boxInfo">
  118. <div>
  119. <BeamSupport ref="beamSupport" />
  120. </div>
  121. </box>
  122. </el-col>
  123. </el-row>
  124. </el-col>
  125. <el-col :lg="8" :sm="8" :xs="8" :xl="8" :md="8">
  126. <box icon="el-icon-help" title="起吊系统" class="boxColor">
  127. <div>
  128. <TacklingSys ref="tacklingSys" />
  129. </div>
  130. </box>
  131. </el-col>
  132. </el-row>
  133. <div class="boxfoot" />
  134. </div>
  135. </el-col>
  136. </el-row>
  137. </div>
  138. <el-dialog title="预警详情" :close-on-click-modal="false" :visible.sync="proDucitonVisible" class="roll-dialog" top="20vh" width="50%">
  139. <el-table v-loading="listLoading" row-key="id" :data="warnings" border stripe fit highlight-current-row height="400px">
  140. <el-table-column label="序号" type="index" align="center" />
  141. <el-table-column label="报警时间" prop="warningDate" align="center">
  142. <template slot-scope="{row}">
  143. {{ row.warningDate |datetimeseconds }}
  144. </template>
  145. </el-table-column>
  146. <el-table-column label="报警记录" prop="warningRecord" align="center" />
  147. <el-table-column label="解除报警时间" align="center">
  148. <template slot-scope="{row}">
  149. {{ row.relieveDate |datetimeseconds }}
  150. </template>
  151. </el-table-column>
  152. <el-table-column label="是否解除" align="center">
  153. <template slot-scope="{row}">
  154. <el-tag size="mini" :type="row.isAlarm?'success':'danger'">{{ row.isAlarm?"已解除":"未解除" }}</el-tag>
  155. </template>
  156. </el-table-column>
  157. </el-table>
  158. <div slot="footer" class="dialog-footer">
  159. <el-button @click="proDucitonVisible = false">取消</el-button>
  160. </div>
  161. </el-dialog>
  162. </el-container>
  163. </el-container>
  164. </div>
  165. </template>
  166. <script>
  167. import Box from '@/components/Box/Box'
  168. import waves from '@/directive/waves' // waves directive
  169. import THAInfo from '@/views/grider-erections/gride-work-info/components/THAInfo'
  170. import New2d from '@/views/grider-erections/gride-work-info/components//new-2d.vue'
  171. import BeamSupport from '@/views/grider-erections/gride-work-info/components/beam-support.vue'
  172. import TacklingSys from '@/views/grider-erections/gride-work-info/components/tackling-sys.vue'
  173. import LimitState from '@/views/grider-erections/gride-work-info/components/limit-state.vue'
  174. import Kiosk2dModel from '@/views/grider-erections/gride-work-info/components/kiosk-2d-model.vue'
  175. import * as griderErectionApi from '@/api/grider-erection'
  176. import _ from 'lodash'
  177. export default {
  178. directives: { waves },
  179. components: {
  180. Box, //, InnerSidebar, ProjectSectionDeviceTree
  181. New2d,
  182. THAInfo,
  183. BeamSupport,
  184. TacklingSys,
  185. LimitState,
  186. Kiosk2dModel
  187. },
  188. data() {
  189. return {
  190. griderErections: [
  191. {
  192. value: 'EA64ABA4-3514-9D82-0D8C-3A03141B7962',
  193. label: '架桥机-HSH-LC01-SXJ900',
  194. type: 1
  195. },
  196. {
  197. value: 'E0F30D4B-55B5-0C56-4841-3A0314301ED1',
  198. label: '架桥机-HSH-LC02-YTJ',
  199. type: 2
  200. }
  201. ],
  202. beams: [
  203. {
  204. value: '2022060101',
  205. label: '2022060101'
  206. }
  207. ],
  208. query: {
  209. deviceManageId: 'EA64ABA4-3514-9D82-0D8C-3A03141B7962',
  210. beamCode: '2022060101'
  211. },
  212. listLoading: false,
  213. proDucitonVisible: false,
  214. modelVisible: true,
  215. data: {},
  216. noGuide: {},
  217. warnings: [],
  218. playback: { anim: null, isAnimRunning: false }
  219. }
  220. },
  221. created() {
  222. },
  223. async mounted() {
  224. this.loading = true
  225. // try {
  226. // await this.$store.dispatch('user/clientCredentials')
  227. // this.loading = false
  228. // } catch (ex) {
  229. // console.log(ex)
  230. // }
  231. griderErectionApi.getList(this.query).then(res => {
  232. this.data = res
  233. if (res.splitTypeNoGuideBeams.length > 0) {
  234. this.noGuide = res.splitTypeNoGuideBeams[res.splitTypeNoGuideBeams.length - 1]
  235. this.returndata(res.splitTypeNoGuideBeams[res.splitTypeNoGuideBeams.length - 1])
  236. }
  237. })
  238. },
  239. methods: {
  240. hitoryClick() {
  241. this.$refs.towD.playBack(this.data.splitTypeNoGuideBeams)
  242. },
  243. playbacking(data) {
  244. this.playback = data
  245. },
  246. stopPlayback() {
  247. this.$refs.towD.stopPlayback()
  248. },
  249. pause() {
  250. this.$refs.towD.suspend()
  251. },
  252. goon() {
  253. this.$refs.towD.goon()
  254. },
  255. zoomIn() {
  256. this.$refs.towD.zoomIn()
  257. },
  258. zoomOut() {
  259. this.$refs.towD.zoomOut()
  260. },
  261. speedUp() {
  262. this.$refs.towD.speedUp()
  263. },
  264. speedDown() {
  265. this.$refs.towD.speedDown()
  266. },
  267. returndata(data) {
  268. this.$refs.limitState.show(data)
  269. this.$refs.thaInfo.show(data)
  270. this.$refs.beamSupport.show(data)
  271. this.$refs.tacklingSys.show(data)
  272. },
  273. warningClick() {
  274. this.proDucitonVisible = true
  275. this.listLoading = true
  276. griderErectionApi.getWarnings(this.query)
  277. .then(res => {
  278. this.warnings = res
  279. this.listLoading = false
  280. })
  281. },
  282. deviceChange(id) {
  283. var grider = _.find(this.griderErections, ['value', id])
  284. if (grider.type === 1) {
  285. this.modelVisible = true
  286. } else {
  287. this.modelVisible = false
  288. }
  289. }
  290. }
  291. }
  292. </script>
  293. <style lang="scss" scoped>
  294. ::v-deep .resize-fit-container {
  295. width: 100%;
  296. padding: 8px;
  297. overflow-y: auto;
  298. background: #181833;
  299. }
  300. // .el-table {
  301. // line-height: 1em;
  302. // }
  303. .content-height-fit {
  304. height: calc(100vh - 0px) !important;
  305. }
  306. // ::v-deep .el-table__body-wrapper {
  307. // &::-webkit-scrollbar { // 整个滚动条
  308. // width: 0; // 纵向滚动条的宽度
  309. // background: rgba(213,215,220,0.3);
  310. // border: none;
  311. // }
  312. // &::-webkit-scrollbar-track { // 滚动条轨道
  313. // border: none;
  314. // }
  315. // }
  316. ::v-deep .el-table th.gutter{
  317. display: none;
  318. width:0
  319. }
  320. ::v-deep .el-table colgroup col[name='gutter']{
  321. display: none;
  322. width: 0;
  323. }
  324. ::v-deep .el-table__body{
  325. width: 100% !important;
  326. }
  327. .boxall {
  328. margin-top: 8px;
  329. border: 2px solid #1b5677;
  330. padding: 0rem .3rem .3rem;
  331. position: relative;
  332. //margin-bottom: 1rem;
  333. height: 445px;
  334. }
  335. .boxCenter{
  336. border: 3px solid #0A3054;
  337. padding: 0rem .3rem .3rem;
  338. position: relative;
  339. width: 80%;
  340. margin: auto;
  341. //margin-bottom: 1rem;
  342. height: 120px;
  343. margin-top: 20px;
  344. }
  345. .box-warning{
  346. color: #fff;
  347. margin-top: 10px;
  348. margin-left: 5px;
  349. }
  350. .left-div{
  351. //border-bottom: 1px solid;
  352. margin: 5px 25px;
  353. color: #fff;
  354. }
  355. .left-foot{
  356. //border-bottom: 1px solid;
  357. margin-top: 0px;
  358. margin-left: 25px;
  359. color: #fff;
  360. }
  361. .boxall:before,
  362. .boxall:after {
  363. position: absolute;
  364. width: 1rem;
  365. height: 1rem;
  366. content: "";
  367. border-top: 3px solid #02a6b5;
  368. top: 0;
  369. }
  370. .boxall:before,
  371. .boxfoot:before {
  372. border-left: 3px solid #02a6b5;
  373. left: 0;
  374. }
  375. .boxall:after,
  376. .boxfoot:after {
  377. border-right: 3px solid #02a6b5;
  378. right: 0;
  379. }
  380. .boxfoot {
  381. position: absolute;
  382. bottom: 0;
  383. width: 100%;
  384. left: 0;
  385. }
  386. .boxfoot:before,
  387. .boxfoot:after {
  388. position: absolute;
  389. width: 1rem;
  390. height: 1rem;
  391. content: "";
  392. border-bottom: 3px solid #02a6b5;
  393. bottom: 0;
  394. }
  395. .titleup{
  396. padding: 6px 0px;
  397. color: white;
  398. }
  399. .boxColor{
  400. background: #162B56;
  401. margin-bottom:0px;
  402. margin-top: 20px;
  403. }
  404. .boxInfo {
  405. background: #162B56;
  406. margin-bottom: 0px;
  407. margin-top: 35px;
  408. }
  409. ::v-deep .card-header {
  410. background-color: transparent;
  411. border-bottom: 1px solid rgba(0,0,0,.125);
  412. padding: 0.25rem 1.25rem;
  413. position: relative;
  414. border-top-left-radius: .25rem;
  415. border-top-right-radius: .25rem;
  416. }
  417. ::v-deep .card-title {
  418. float: left;
  419. font-size: 1.1rem;
  420. font-weight: bold;
  421. color: white;
  422. margin: 0;
  423. }
  424. ::v-deep .card-body {
  425. -ms-flex: 1 1 auto;
  426. -webkit-box-flex: 1;
  427. flex: 1 1 auto;
  428. min-height: 1px;
  429. padding: 0.25rem;
  430. }
  431. </style>