video.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"/>
  6. <title>远程巡店</title>
  7. <script src="js/vue@2.6.11"></script>
  8. <script src="js/uni.webview.1.5.2.js"></script>
  9. <!-- antd ui -->
  10. <script type="text/javascript" charset="utf-8" src="js/moment.min.js"></script>
  11. <script type="text/javascript" charset="utf-8" src="js/moment-with-locales.min.js"></script>
  12. <link rel="stylesheet" href="antd/antd.min.css" />
  13. <script type="text/javascript" charset="utf-8" src="antd/antd.min.js"></script>
  14. <!-- 播放器 -->
  15. <link rel="stylesheet" href="aliplayer/aliplayer-min.css" />
  16. <script type="text/javascript" charset="utf-8" src="aliplayer/aliplayer-h5-min.js"></script>
  17. <!-- 页面样式 -->
  18. <link rel="stylesheet/less" type="text/css" href="css/styles.less" />
  19. <script src="js/less.min.js"></script>
  20. </head>
  21. <body>
  22. <div class="storeCheck" id="app">
  23. <!-- 播放器 -->
  24. <div class="videoPlay">
  25. <!-- 云台控制 -->
  26. <div class="control-yt" v-show="showYt&&!showYtbtns" @click="openYt"></div>
  27. <div class="control-yt-close" v-show="showYtbtns" @click="openYt"></div>
  28. <div v-show="showYtbtns" @click="kzYt(1)" class="ytBtns yt-left"></div>
  29. <div v-show="showYtbtns" @click="kzYt(2)" class="ytBtns yt-right"></div>
  30. <div v-show="showYtbtns" @click="kzYt(3)" class="ytBtns yt-top"></div>
  31. <div v-show="showYtbtns" @click="kzYt(4)" class="ytBtns yt-bottom"></div>
  32. <!-- 播放器 -->
  33. <div class="prism-player" id="player-con"></div>
  34. </div>
  35. <!-- 工作区 -->
  36. <div class="checkWork">
  37. <!-- 统计及摄像头切换 -->
  38. <div class="checkWork-head">
  39. <div class="checkWork-head-row">
  40. <!-- 机位 -->
  41. <div>
  42. <div>机位:</div>
  43. <div>
  44. <a-dropdown>
  45. <a-menu slot="overlay">
  46. <a-menu-item key="1"> 收银台 </a-menu-item>
  47. <a-menu-item key="2"> 接车区 </a-menu-item>
  48. <a-menu-item key="3"> 洗车工位 </a-menu-item>
  49. <a-menu-item key="4"> 维修工位 </a-menu-item>
  50. <a-menu-item key="5"> 客户休息区 </a-menu-item>
  51. </a-menu>
  52. <a-button block> 收银台 <a-icon type="down" /> </a-button>
  53. </a-dropdown>
  54. </div>
  55. </div>
  56. <!-- 预置位 -->
  57. <div>
  58. <div>预置位:</div>
  59. <div>
  60. <a-dropdown>
  61. <a-menu slot="overlay">
  62. <a-menu-item key="1"> 预置位1 </a-menu-item>
  63. <a-menu-item key="2"> 预置位2 </a-menu-item>
  64. <a-menu-item key="3"> 预置位3 </a-menu-item>
  65. </a-menu>
  66. <a-button block> 请选择 <a-icon type="down" /> </a-button>
  67. </a-dropdown>
  68. </div>
  69. </div>
  70. </div>
  71. <div class="checkWork-head-row">
  72. <div>
  73. <div>进度:2/13</div>
  74. <div>耗时:3时5分钟</div>
  75. <div>得分:10.2/22.3</div>
  76. </div>
  77. <div>
  78. <div>不适用:0</div>
  79. <div>不合格:3</div>
  80. <div>合格:5</div>
  81. </div>
  82. </div>
  83. </div>
  84. <!-- 打分 -->
  85. <div class="checkWork-body">
  86. <div class="checkWork-body-tabs">
  87. <div class="tabs-items active">
  88. <div>正常营业</div>
  89. <div>0/4</div>
  90. </div>
  91. <div class="tabs-items">
  92. <div>正常营业</div>
  93. <div>0/4</div>
  94. </div>
  95. <div class="tabs-items">
  96. <div>正常营业</div>
  97. <div>0/4</div>
  98. </div>
  99. <div class="tabs-items">
  100. <div>正常营业</div>
  101. <div>0/4</div>
  102. </div>
  103. <div class="tabs-items">
  104. <div>正常营业</div>
  105. <div>0/4</div>
  106. </div>
  107. <div class="tabs-items">
  108. <div>正常营业</div>
  109. <div>0/4</div>
  110. </div>
  111. <div class="tabs-items">
  112. <div>正常营业</div>
  113. <div>0/4</div>
  114. </div>
  115. <div class="tabs-items">
  116. <div>正常营业</div>
  117. <div>0/4</div>
  118. </div>
  119. </div>
  120. <div class="checkWork-body-tabCons">
  121. <div class="tabCons-items">
  122. <div>
  123. <div><b>正常营业</b></div>
  124. <div><a-icon type="camera" style="font-size: 30px;" /></div>
  125. </div>
  126. <div>
  127. <div>分值:10 <a-icon @click="openEditFs" type="edit" style="font-size: 20px;margin-left: 10px;"/></div>
  128. <div>
  129. <a-icon type="minus-circle" style="font-size: 30px;color: #13C2C2;margin-right: 15px;"/>
  130. </div>
  131. <div>
  132. <a-icon type="close-circle" style="font-size: 30px;color: #ff0000;margin-right: 15px;"/>
  133. </div>
  134. <div>
  135. <a-icon type="check-circle" style="font-size: 30px;color: #00be00;"/>
  136. </div>
  137. </div>
  138. </div>
  139. <div class="tabCons-items">
  140. <div>
  141. <div><b>正常营业</b></div>
  142. <div><a-icon type="camera" style="font-size: 30px;" /></div>
  143. </div>
  144. <div>
  145. <div>分值:10 <a-icon type="edit" style="font-size: 20px;margin-left: 10px;"/></div>
  146. <div>
  147. <a-icon type="minus-circle" style="font-size: 30px;color: #13C2C2;margin-right: 15px;"/>
  148. </div>
  149. <div>
  150. <a-icon type="close-circle" style="font-size: 30px;color: #ff0000;margin-right: 15px;"/>
  151. </div>
  152. <div>
  153. <a-icon type="check-circle" style="font-size: 30px;color: #00be00;"/>
  154. </div>
  155. </div>
  156. </div>
  157. <div class="tabCons-items">
  158. <div>
  159. <div><b>正常营业</b></div>
  160. <div><a-icon type="camera" style="font-size: 30px;" /></div>
  161. </div>
  162. <div>
  163. <div>分值:10 <a-icon type="edit" style="font-size: 20px;margin-left: 10px;"/></div>
  164. <div>
  165. <a-icon type="minus-circle" style="font-size: 30px;color: #13C2C2;margin-right: 15px;"/>
  166. </div>
  167. <div>
  168. <a-icon type="close-circle" style="font-size: 30px;color: #ff0000;margin-right: 15px;"/>
  169. </div>
  170. <div>
  171. <a-icon type="check-circle" style="font-size: 30px;color: #00be00;"/>
  172. </div>
  173. </div>
  174. </div>
  175. <div class="tabCons-items">
  176. <div>
  177. <div><b>正常营业</b></div>
  178. <div><a-icon type="camera" style="font-size: 30px;" /></div>
  179. </div>
  180. <div>
  181. <div>分值:10 <a-icon type="edit" style="font-size: 20px;margin-left: 10px;"/></div>
  182. <div>
  183. <a-icon type="minus-circle" style="font-size: 30px;color: #13C2C2;margin-right: 15px;"/>
  184. </div>
  185. <div>
  186. <a-icon type="close-circle" style="font-size: 30px;color: #ff0000;margin-right: 15px;"/>
  187. </div>
  188. <div>
  189. <a-icon type="check-circle" style="font-size: 30px;color: #00be00;"/>
  190. </div>
  191. </div>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. <script>
  198. var vm = new Vue({
  199. el: '#app',
  200. data: {
  201. player: null,
  202. showYt: false,
  203. showYtbtns: false
  204. },
  205. mounted () {
  206. this.videoInit()
  207. },
  208. methods: {
  209. // 初始化播放器
  210. videoInit(){
  211. const _this = this
  212. // 设置标题
  213. document.title = '远程巡店'
  214. // 初始化播放器
  215. _this.player = new Aliplayer({
  216. 'id': 'player-con',
  217. 'source': 'https://play.zyucgj.com/live/34020000001320000001.m3u8?auth_key=1599027535-0-0-621dab70e039a552649ccd535d1cc3f9',
  218. 'width': '100%',
  219. 'height': '240px',
  220. 'autoplay': false,
  221. 'isLive': true,
  222. 'rePlay': true,
  223. 'playsinline': true,
  224. 'preload': true,
  225. 'language': 'zh-cn',
  226. 'useH5Prism': true,
  227. 'extraInfo': {
  228. 'crossOrigin': 'anonymous'
  229. },
  230. 'skinLayout': [
  231. {
  232. 'name': 'bigPlayButton',
  233. 'align': 'cc'
  234. },
  235. {
  236. 'name': 'errorDisplay',
  237. 'align': 'tlabs',
  238. 'x': 0,
  239. 'y': 0
  240. },
  241. {
  242. 'name': 'infoDisplay'
  243. },
  244. {
  245. 'name': 'controlBar',
  246. 'align': 'blabs',
  247. 'x': 0,
  248. 'y': 0,
  249. 'children': [
  250. {
  251. 'name': 'fullScreenButton',
  252. 'align': 'tr',
  253. 'x': 15,
  254. 'y': 10
  255. },
  256. {
  257. 'name': 'volume',
  258. 'align': 'tr',
  259. 'x': 15,
  260. 'y': 8
  261. },
  262. {
  263. 'name': 'snapshot',
  264. 'align': 'tl',
  265. 'x': 15,
  266. 'y': 8
  267. }
  268. ]
  269. }
  270. ]
  271. }, function (player) {
  272. _this.sendMsg('The player is created')
  273. }
  274. )
  275. /* h5截图按钮, 截图成功回调 */
  276. _this.player.on('snapshoted', function (data) {
  277. const pictureData = data.paramData.base64
  278. _this.sendMsg('截图成功回调')
  279. })
  280. // 控制栏
  281. _this.player.on('playing', function () {
  282. _this.showYt = true
  283. })
  284. _this.player.on('error',function(e){
  285. console.log(JSON.stringify(e),'error')
  286. })
  287. },
  288. // 发送消息给app
  289. sendMsg (msg) {
  290. uni.postMessage({
  291. data: {
  292. action: 'message',
  293. msg: msg
  294. }
  295. })
  296. },
  297. // 显示云台控制按钮
  298. openYt () {
  299. this.showYtbtns = !this.showYtbtns
  300. },
  301. // 控制云台
  302. kzYt (index) {
  303. const cmd = ['left', 'right', 'up', 'down']
  304. this.sendMsg('控制云台' + cmd[index - 1])
  305. },
  306. // 修改分数
  307. openEditFs(){
  308. this.$confirm({
  309. title: 'Confirm',
  310. content: 'Bla bla ...',
  311. okText: '确认',
  312. cancelText: '取消',
  313. });
  314. }
  315. }
  316. })
  317. </script>
  318. </body>
  319. </html>