4d8b8441de24b2bd0fa1c2d172066aa0e1a0e41f.svn-base 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. <template>
  2. <div id="eventDetailBody" style="padding: 3px;height:400px;" class="problem_detail_wrapper">
  3. <div style="width:46%;height:450px;float:left;border:1px solid #d5d5ff;margin-right:5px;">
  4. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">基本信息</p>
  5. <el-form label-position="right" label-width="140px" style="height:100%;" :model="problemDetail">
  6. <el-form-item label="问题标题:">
  7. <p>{{problemDetail.cpTitle}}</p>
  8. </el-form-item>
  9. <el-form-item label="问题描述:">
  10. <p>{{problemDetail.cpDesc}}</p>
  11. </el-form-item>
  12. <el-form-item label="填报人姓名:">
  13. <p>{{problemDetail.cpResnm}}</p>
  14. </el-form-item>
  15. <el-form-item label="记录时间:">
  16. <p>{{problemDetail.cpIttm}}</p>
  17. </el-form-item>
  18. <el-form-item label="发生问题位置经度:">
  19. <p>{{problemDetail.cpLgtd}}</p>
  20. </el-form-item>
  21. <el-form-item label="发生问题位置纬度:">
  22. <p>{{problemDetail.cpLttd}}</p>
  23. </el-form-item>
  24. </el-form>
  25. </div>
  26. <div style="width:50%;height:450px;float:left;border:1px solid #d5d5ff;">
  27. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
  28. <el-tabs style="height: 400px;margin:5px;">
  29. <el-tab-pane :label="picturetabName" style="height: 350px;">
  30. <el-carousel :interval="4000" height="350px" id="detailImg">
  31. <el-carousel-item v-for="(item,index) in pictureArray" :key="index" >
  32. <img style="height:100%;margin-left:15%" :src="`${hostUrl}/${item.filePath}`" alt>
  33. </el-carousel-item>
  34. <el-carousel-item v-if="pictureArray.length==0">
  35. <p>暂无图片信息</p>
  36. </el-carousel-item>
  37. </el-carousel>
  38. </el-tab-pane>
  39. <el-tab-pane :label="audiotabName">
  40. <elaudio v-for="(audio,index) in audioArray" :key="index" style="margin-left:15%" :theUrl="`${hostUrl}/${audio.filePath}`"></elaudio>
  41. <el-carousel-item v-if="audioArray.length==0">
  42. <p>暂无音频信息</p>
  43. </el-carousel-item>
  44. </el-tab-pane>
  45. <el-tab-pane :label="videotabName">
  46. <el-carousel :interval="4000" height="350px">
  47. <el-carousel-item v-for="(item,index) in videoArray" :key="index" >
  48. <video-player class="vjs-custom-skin"
  49. ref="videoPlayer"
  50. style="margin-left:15%"
  51. :options="item"
  52. :playsinline="true"
  53. >
  54. </video-player>
  55. </el-carousel-item>
  56. <el-carousel-item v-if="videoArray.length==0">
  57. <p>暂无视频信息</p>
  58. </el-carousel-item>
  59. </el-carousel>
  60. </el-tab-pane>
  61. <el-tab-pane :label="filetabName">
  62. <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
  63. <el-table-column header-align="center" align="center" label="文档">
  64. <template slot-scope="scope">
  65. <p>
  66. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank" rel="noopener noreferrer">
  67. {{scope.row.fileName}}
  68. </a>
  69. </p>
  70. </template>
  71. </el-table-column>
  72. </el-table>
  73. </el-tab-pane>
  74. </el-tabs>
  75. <!-- <p style="margin-top:10px;margin-bottom: 10px"><i class="el-icon-caret-right"></i><span style="width:120px;padding-left: 10px">图像资料</span><span class="hrs"></span></p>
  76. <p style="margin-top:10px;margin-bottom: 10px"><i class="el-icon-caret-right"></i><span style="width:120px;padding-left: 10px">音频资料</span><span class="hrs"></span></p>
  77. <p style="margin-top:10px;margin-bottom: 10px"><i class="el-icon-caret-right"></i><span style="width:120px;padding-left: 10px">视频资料</span><span class="hrs"></span></p>
  78. -->
  79. </div>
  80. <!-- <tr>
  81. <td class="name">图像 &nbsp;</td>
  82. <td colspan="3"></td>
  83. </tr>
  84. <tr style id="photo">
  85. <td colspan="4">
  86. <el-carousel v-if="problemDetail.gwComFiles && problemDetail.gwComFiles.length" :interval="4000" type="card" height="300px">
  87. <el-carousel-item v-for="(item,index) in problemDetail.gwComFiles" :key="index">
  88. <a :href="item.gwComFiles" target="_blank">
  89. <!-- <img style="width:100%;height:100%;" :src="`http://10.1.102.136:8101/${item.filePath}`" alt> -->
  90. <!-- <img style="width:100%;height:100%;" :src="`${hostUrl}/${item.filePath}`" alt> -->
  91. <!-- <img style="width:100%;height:100%;" :src="item.filePath" alt>
  92. </a>
  93. </el-carousel-item>
  94. </el-carousel>
  95. <p v-else style="margin-left: auto;margin-right: auto;color: #acacac;">暂无图片
  96. </p> -->
  97. </div>
  98. </template>
  99. <script>
  100. import Viewer from 'viewerjs';
  101. import 'viewerjs/dist/viewer.css';
  102. import {hostUrl} from "@util/global_variable.js";
  103. import { gettongYongDetail} from "../../api/duChaAPI.js";
  104. // import elaudio from '../widgets/elAudio.vue'
  105. export default {
  106. props: ['problemId'],
  107. components: {
  108. elaudio: resolve => {
  109. require(["../../widgets/elAudio.vue"], resolve);
  110. },
  111. },
  112. data() {
  113. return {
  114. activeName: "0",
  115. superviseinspect: {},
  116. fileList: [],
  117. groupingList: [],
  118. fileListloading: false,
  119. groupListloading: false,
  120. problemDetail:{
  121. checkPoint:'',
  122. collTime:'',
  123. commonFileIds:'',
  124. cwsCode:'',
  125. cwsName:'',
  126. dataStat:'',
  127. endTime:'',
  128. fileNo:'',
  129. fileNoNumber:'',
  130. gwComFiles:'',
  131. ifCasePblm:'',
  132. inspAddDesc:'',
  133. inspGroupId:'',
  134. inspPblmCate:'',
  135. inspPblmCode:'',
  136. inspPblmDesc:'',
  137. inspPblmName:'',
  138. inspPblmOrgName:'',
  139. inspPblmType:'',
  140. inspPblmsName:'',
  141. nm:'',
  142. note:'',
  143. objId:'',
  144. objNm:'',
  145. objType:'',
  146. pblmDesc:'',
  147. pblmId:'',
  148. pblmLat:'',
  149. pblmLong:'',
  150. pblmPersName:'',
  151. pblmStat:'',
  152. pblmsId:'',
  153. pblmsTypeId:'',
  154. persName:'',
  155. pguid:'',
  156. recPers:'',
  157. regid:'',
  158. reviConc:'',
  159. reviOpin:'',
  160. reviOrgGuid:'',
  161. srcDesc:'',
  162. startTime:'',
  163. state:'',
  164. villType:'',
  165. villageCode:'',
  166. },
  167. pictureArray:[],
  168. audioArray:[],
  169. videoArray:[],
  170. fileArray:[],
  171. audiotabName: "",
  172. videotabName: "",
  173. filetabName:"",
  174. picturetabName: "",
  175. playerOptions: {
  176. height: '120',
  177. autoplay: true,
  178. muted: true,
  179. language: 'en',
  180. playbackRates: [0.7, 1.0, 1.5, 2.0],
  181. sources: [{
  182. type: "video/mp4",
  183. // mp4
  184. src: "http://vjs.zencdn.net/v/oceans.mp4",
  185. // webm
  186. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  187. },
  188. {
  189. type: "video/mp4",
  190. // mp4
  191. src: "http://vjs.zencdn.net/v/oceans.mp4",
  192. // webm
  193. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  194. },
  195. {
  196. type: "video/mp4",
  197. // mp4
  198. src: "http://vjs.zencdn.net/v/oceans.mp4",
  199. // webm
  200. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  201. },
  202. {
  203. type: "video/mp4",
  204. // mp4
  205. src: "http://vjs.zencdn.net/v/oceans.mp4",
  206. // webm
  207. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  208. }],
  209. },
  210. };
  211. },
  212. computed:{
  213. hostUrl(){
  214. return hostUrl
  215. }
  216. },
  217. mounted:function(){
  218. this.problemDetail = {};
  219. this.pictureArray = [];
  220. this.audioArray = [];
  221. this.videoArray = [];
  222. this.fileArray = [];
  223. this.showDetails();
  224. },
  225. watch:{
  226. problemId:function(){
  227. this.problemDetail = {};
  228. this.pictureArray = [];
  229. this.audioArray = [];
  230. this.videoArray = [];
  231. this.fileArray = [];
  232. this.showDetails();
  233. }
  234. },
  235. methods: {
  236. init() {
  237. this.activeName = "0";
  238. },
  239. showDetails() {
  240. gettongYongDetail(this.problemId).then(res => {
  241. this.problemDetail = res.data;
  242. // pictureArray
  243. // audioArray
  244. // videoArray
  245. res.data.fileList.forEach(
  246. (item) =>{
  247. if(item.fileExt == 'mp3'){
  248. this.audioArray.push(item);
  249. }else if(item.fileExt == 'jpg' || item.fileExt == 'JPEG' || item.fileExt == 'jpeg' || item.fileExt == 'JPG' || item.fileExt == 'png' || item.fileExt == 'PNG'){
  250. this.pictureArray.push(item);
  251. this.$nextTick(function(){
  252. var ViewerDom = document.getElementById('detailImg');
  253. var viewer = new Viewer(ViewerDom, {
  254. // hide:function(){ //在图片消失的时候销毁viewer
  255. // viewer.destroy();
  256. // }
  257. })
  258. });
  259. }else if(item.fileExt == 'mp4'){
  260. this.videoArray.push(
  261. {
  262. height: '350',
  263. autoplay: false,
  264. muted: true,
  265. language: 'en',
  266. playbackRates: [0.7, 1.0, 1.5, 2.0],
  267. sources: [{
  268. type: "video/mp4",
  269. // mp4
  270. src: `${this.hostUrl}/${item.filePath}`,
  271. // webm
  272. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  273. }],
  274. },
  275. );
  276. }else{
  277. this.fileArray.push(item);
  278. }
  279. }
  280. );
  281. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  282. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  283. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  284. this.filetabName = "其它资料(" + this.fileArray.length + ")";
  285. });
  286. },
  287. }
  288. };
  289. </script>
  290. <style scoped>
  291. @import '../../assets/style/global.css';
  292. .el-form-item {
  293. width: 100%;
  294. margin-bottom: 0;
  295. }
  296. </style>