video.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  1. <template>
  2. <div class="video-page">
  3. <header></header>
  4. <div class="tab">
  5. <el-select v-model="conditions.goafOrebelt" placeholder="矿带" @change="changeArea(1)" style="width:120px" clearable>
  6. <el-option v-for="(item,index) in goafOrebelts" :key="index" :value="item" :label="item" />
  7. </el-select>
  8. <el-select v-model="conditions.goafOrebody" placeholder="矿体" @change="changeArea(2)" style="width:120px;margin:0 12px;">
  9. <el-option v-for="(item,index) in goafOrebodys" :key="index" :value="item.goafOrebody" :label="item.goafOrebody" />
  10. </el-select>
  11. <el-select v-model="conditions.goafOreheight" placeholder="中段" @change="changeArea(3)" style="width:120px">
  12. <el-option v-for="(item,index) in goafOreheights" :key="index" :value="item.goafOreheight" :label="item.goafOreheight" />
  13. </el-select>
  14. </div>
  15. <div class="container">
  16. <div class="lf">
  17. <div class="search-container">
  18. <el-select v-model="conditions.goafId" placeholder="采空区编号" @change="changeArea(4)" style="width:210px;margin:0 12px;">
  19. <el-option v-for="item in goafNames" :key="item.goafId" :value="item.goafId" :label="item.goafName" />
  20. </el-select>
  21. <div class="bt search" @click="searchSubmit">查询</div>
  22. <div class="bt" @click="resetSubmit">重置</div>
  23. </div>
  24. <div class="lf-container">
  25. <div class="video-container">
  26. <div class="item" v-for="(item,index) in 10" :key="index" @click="showVideo(item)">
  27. <video src="https://www.runoob.com/try/demo_source/movie.mp4" poster="./images/video.png">
  28. <source src="movie.mp4" type="video/mp4">
  29. </video>
  30. <p>{Ⅲ号-770-32008}:封堵口</p>
  31. </div>
  32. </div>
  33. <div class="el-pagination-wrap">
  34. <el-pagination small layout="prev, pager, next" :total="50" />
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. <div class="video-dialog" v-if="videoDialogVisible">
  40. <div class="header">
  41. <div class="name">{{ video.name }}</div>
  42. <div class="close" @click="videoDialogVisible=false"><el-icon><Close /></el-icon></div>
  43. </div>
  44. <!-- <video :src="video.src" id="video" controls></video> -->
  45. <HkwsVideo></HkwsVideo>
  46. </div>
  47. </div>
  48. </template>
  49. <script>
  50. import HkwsVideo from '@/components/HkwsVideo'
  51. import { getGoafBaseInfo } from '@/api/goaf/info'
  52. export default {
  53. name:"particulars_video",
  54. components:{
  55. HkwsVideo
  56. },
  57. data(){
  58. return{
  59. activeId:'1',
  60. activetab:'1',
  61. video:{
  62. src:"",
  63. name:""
  64. },
  65. videoDialogVisible:false,
  66. tabs:[
  67. {name:"Ⅲ号",id:"1"},
  68. {name:"770",id:"2"},
  69. {name:"32001",id:"3"},
  70. ],
  71. conditions: {
  72. page: 1,
  73. limit: 10,
  74. goafId: '',
  75. goafOrebelt: '',
  76. goafOrebody: '',
  77. goafOreheight: '',
  78. goafName:"",
  79. goafDevName:""
  80. },
  81. goafList: [],
  82. goafOrebelts: [],
  83. goafOrebodys: [],
  84. goafOreheights: [],
  85. goafNames: [],
  86. }
  87. },
  88. created(){
  89. this.init()
  90. },
  91. methods:{
  92. init(){
  93. getGoafBaseInfo().then((res) => {
  94. const goafOrebelts = res.data.map(item => item.goafOrebelt)
  95. this.goafOrebelts = [...new Set(goafOrebelts)]
  96. this.goafList = res.data
  97. })
  98. },
  99. changeHead(item){
  100. this.activeId=item.id
  101. },
  102. searchSubmit(){
  103. this.getData()
  104. },
  105. resetSubmit(){
  106. this.conditions={
  107. page: 1,
  108. limit: 10,
  109. goafId: '',
  110. goafOrebelt: '',
  111. goafOrebody: '',
  112. goafOreheight: '',
  113. goafName:"",
  114. goafDevName:""
  115. }
  116. this.goafOrebodys=[]
  117. this.goafOreheights=[]
  118. this.goafNames=[]
  119. this.getData()
  120. },
  121. getData(){
  122. },
  123. showVideo(item){
  124. this.video={
  125. src:'https://www.runoob.com/try/demo_source/movie.mp4',
  126. name:"{Ⅲ号-770-32008}:封堵口"
  127. }
  128. this.videoDialogVisible=true;
  129. },
  130. changeArea(type) {
  131. const goafs = this.deeepClone(this.goafList)
  132. let goafOrebodys = this.deeepClone(this.goafOrebodys)
  133. let goafOreheights = this.deeepClone(this.goafOreheights)
  134. let goafNames = this.deeepClone(this.goafNames)
  135. if (type === 1) {
  136. goafOrebodys = goafs.filter(item => item.goafOrebelt === this.conditions.goafOrebelt)
  137. goafOrebodys = this.unique(goafOrebodys, 'goafOrebody')
  138. this.goafOrebodys = goafOrebodys
  139. this.goafOreheights = []
  140. this.goafNames = []
  141. this.conditions.goafOrebody = ''
  142. this.conditions.goafOreheight = ''
  143. this.conditions.goafName = ''
  144. this.conditions.goafId = ''
  145. } else if (type === 2) {
  146. goafOreheights = goafs.filter(item => (item.goafOrebody === this.conditions.goafOrebody) && (item.goafOrebelt === this.conditions.goafOrebelt))
  147. goafOreheights = this.unique(goafOrebodys, 'goafOreheight')
  148. this.goafOreheights = goafOreheights
  149. this.goafNames = []
  150. this.conditions.goafOreheight = ''
  151. this.conditions.goafName = ''
  152. this.conditions.goafId = ''
  153. } else if (type === 3) {
  154. goafNames = goafs.filter(item => (item.goafOreheight === this.conditions.goafOreheight) && (item.goafOrebody === this.conditions.goafOrebody) && (item.goafOrebelt === this.conditions.goafOrebelt))
  155. this.goafNames = goafNames
  156. this.conditions.goafName = ''
  157. this.conditions.goafId = ''
  158. } else {
  159. for (let i = 0; i < goafNames.length; i++) {
  160. if (this.conditions.goafId === goafNames[i].goafId) {
  161. this.conditions.goafName = goafNames[i].goafName
  162. }
  163. }
  164. }
  165. this.$forceUpdate()
  166. },
  167. unique(arr = [], name = 'name') {
  168. const res = new Map()
  169. return arr.filter((item) => !res.has(item[name]) && res.set(item[name], 1))
  170. },
  171. deeepClone(params) {
  172. return JSON.parse(JSON.stringify(params))
  173. }
  174. }
  175. }
  176. </script>
  177. <style lang="scss" scoped>
  178. .video-page{
  179. .search-item{
  180. display: flex;
  181. justify-content: center;
  182. align-items: center;
  183. margin-bottom: 14px;
  184. span{
  185. font-family: 'Ping Hei';
  186. font-size: 14px;
  187. line-height: 1;
  188. color: rgba(255, 255, 255, 0.7);
  189. }
  190. }
  191. .input,.select,.el-date-editor{
  192. width: 180px;
  193. margin-right:16px;
  194. color: #fff;
  195. }
  196. ::v-deep{
  197. .el-input__wrapper{
  198. background-color: rgba(8, 128, 255, 0.2);
  199. border: 0;
  200. box-shadow: none;
  201. }
  202. .el-input__inner{
  203. color: #fff;
  204. }
  205. }
  206. .video-dialog{
  207. position: fixed;
  208. z-index: 999;
  209. left: 0;
  210. top: 0;
  211. right: 0;
  212. bottom: 0;
  213. background-color: rgba(5, 25, 51, 0.98);
  214. .name{
  215. color: #fff;
  216. font-size: 20px;
  217. line-height:1 ;
  218. text-indent: 20px;
  219. }
  220. .header{
  221. display: flex;
  222. justify-content: space-between;
  223. align-items: center;
  224. .close{
  225. height: 50px;
  226. line-height: 50px;
  227. display: inline-block;
  228. padding: 10px 20px;
  229. cursor: pointer;
  230. color: #fff;
  231. font-size: 36px;
  232. }
  233. }
  234. #video{
  235. display: block;
  236. width: 80%;
  237. max-height: 80vh;
  238. box-shadow: 2px 2px 4px rgba(0,0,0,0.6);
  239. margin: 10px auto;
  240. }
  241. }
  242. header{
  243. display: flex;
  244. justify-content: center;
  245. align-items: center;
  246. padding-top: 0.5vh;
  247. padding-top:36px;
  248. }
  249. .tab{
  250. padding-top: 1.5vh;
  251. .item{
  252. display: inline-block;
  253. padding: 5px 10px;
  254. color: #fff;
  255. font-size: 16px;
  256. background: #003B7A;
  257. border: 1px solid #004EA2;
  258. letter-spacing: 0.6px;
  259. margin-right: 24px;
  260. border-radius: 4px 15px 8px 4px;
  261. cursor: pointer;
  262. &.active{
  263. background: #0083CF;
  264. border: 1px solid #0097DD;
  265. }
  266. }
  267. }
  268. .container{
  269. display: flex;
  270. .lf{
  271. width: 100%;
  272. padding-left: 100px;
  273. .search-container{
  274. padding:4.4vh 0 5vh 0;
  275. box-sizing: border-box;
  276. display: flex;
  277. flex-wrap: wrap;
  278. .input,.select,.el-date-editor{
  279. width: 220px;
  280. height: 36px;
  281. margin-right:16px;
  282. color: #fff;
  283. }
  284. ::v-deep{
  285. .el-input__wrapper{
  286. background-color: rgba(8, 128, 255, 0.2);
  287. border: 0;
  288. box-shadow: none;
  289. }
  290. .el-input__inner{
  291. color: #fff;
  292. }
  293. }
  294. .bt{
  295. width: 100px;
  296. height: 36px;
  297. line-height: 36px;
  298. text-align: center;
  299. color: #fff;
  300. font-size: 14px;
  301. background: rgba(8, 128, 255, 0.2);
  302. border-radius: 4px;
  303. cursor: pointer;
  304. &.search{
  305. background: linear-gradient(rgba(94, 226, 255, 1),rgba(79, 175, 255, 1));
  306. margin-right:14px;
  307. }
  308. }
  309. }
  310. .lf-container{
  311. .video-container{
  312. display: flex;
  313. justify-content: flex-start;
  314. align-items: center;
  315. flex-wrap: wrap;
  316. margin-top: 5vh;
  317. .item{
  318. width: 20%;
  319. display: flex;
  320. justify-content: center;
  321. align-items: center;
  322. flex-direction: column;
  323. padding: 20px;
  324. box-sizing: border-box;
  325. color: #fff;
  326. font-size: 14px;
  327. video{
  328. display: block;
  329. width: 100%;
  330. cursor: pointer;
  331. }
  332. p{
  333. padding-top: 10px;
  334. }
  335. }
  336. }
  337. .el-pagination-wrap{
  338. float: right;
  339. margin-top: 5vh;
  340. ::v-deep{
  341. .el-pager li,button{
  342. background-color: #00539F;
  343. margin-left: 10px;
  344. color: rgba(255, 255, 255, 0.75);
  345. &.is-active{
  346. background-color: rgba(0, 131, 207, 1);
  347. }
  348. }
  349. }
  350. }
  351. }
  352. }
  353. }
  354. }
  355. </style>