b80946e87330d00e74e0c69d51d2d59e0bbb5e53.svn-base 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. <template>
  2. <div id="eventDetailBody" style="padding: 3px;" :style="{'height':testHeight+'px',}" class="problem_detail_wrapper">
  3. <div :style="{'height':testHeight+'px',}" style="width:100%;float:left;border:1px solid #d5d5ff;">
  4. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
  5. <el-tabs style="overflow-y: auto;margin:5px;" :style="{'max-height':testHeight-40 +'px',}">
  6. <el-tab-pane :label="picturetabName" style="height: 350px;">
  7. <el-carousel :interval="4000" height="350px">
  8. <el-carousel-item v-for="(item,index) in pictureArray" :key="index">
  9. <a :href="`${hostUrl}/${item.filePath}`" target="_blank">
  10. <img style="height:100%;" :src="`${hostUrl}/${item.filePath}`" alt>
  11. </a>
  12. </el-carousel-item>
  13. <el-carousel-item v-if="pictureArray.length==0">
  14. <p>暂无图片信息</p>
  15. </el-carousel-item>
  16. </el-carousel>
  17. </el-tab-pane>
  18. <el-tab-pane :label="audiotabName">
  19. <elaudio v-for="(audio,index) in audioArray" :key="index" style="margin-left:15%"
  20. :theUrl="`${hostUrl}/${audio.filePath}`"></elaudio>
  21. <p v-if="audioArray.length==0">暂无音频信息</p>
  22. </el-tab-pane>
  23. <el-tab-pane :label="videotabName">
  24. <el-carousel :interval="4000" height="350px">
  25. <el-carousel-item v-for="(item,index) in videoArray" :key="index">
  26. <video-player class="vjs-custom-skin" ref="videoPlayer" :options="item" :playsinline="true">
  27. </video-player>
  28. </el-carousel-item>
  29. <el-carousel-item v-if="videoArray.length==0">
  30. <p>暂无视频信息</p>
  31. </el-carousel-item>
  32. </el-carousel>
  33. </el-tab-pane>
  34. <el-tab-pane :label="filetabName">
  35. <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
  36. <el-table-column header-align="center" align="center" label="文档">
  37. <template slot-scope="scope">
  38. <p>
  39. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank"
  40. rel="noopener noreferrer">
  41. {{scope.row.fileName}}
  42. </a>
  43. </p>
  44. </template>
  45. </el-table-column>
  46. </el-table>
  47. </el-tab-pane>
  48. </el-tabs>
  49. </div>
  50. </div>
  51. </template>
  52. <script>
  53. import request from '../../utils/gw_ajax_request'
  54. import {showDetailsXq1} from "@api/InspectionReport.js";
  55. import { hostUrl } from "@util/global_variable.js";
  56. // import elaudio from '../widgets/elAudio.vue'
  57. export default {
  58. props: ["details", 'problemId', 'objType', 'pType'],
  59. components: {
  60. elaudio: resolve => {
  61. require(["../../widgets/elAudio.vue"], resolve);
  62. },
  63. },
  64. data() {
  65. return {
  66. isShow: true,
  67. testHeight: window.innerHeight * 0.6,
  68. activeName: "0",
  69. superviseinspect: {},
  70. fileList: [],
  71. groupingList: [],
  72. fileListloading: false,
  73. groupListloading: false,
  74. problemDetail: {
  75. checkPoint: '',
  76. collTime: '',
  77. commonFileIds: '',
  78. cwsCode: '',
  79. cwsName: '',
  80. dataStat: '',
  81. endTime: '',
  82. fileNo: '',
  83. fileNoNumber: '',
  84. gwComFileList: '',
  85. ifCasePblm: '',
  86. inspAddDesc: '',
  87. inspGroupId: '',
  88. inspPblmCate: '',
  89. inspPblmCode: '',
  90. inspPblmDesc: '',
  91. inspPblmName: '',
  92. inspPblmOrgName: '',
  93. inspPblmType: '',
  94. inspPblmsName: '',
  95. nm: '',
  96. note: '',
  97. objId: '',
  98. objNm: '',
  99. objType: '',
  100. pblmDesc: '',
  101. pblmId: '',
  102. pblmLat: '',
  103. pblmLong: '',
  104. pblmPersName: '',
  105. pblmStat: '',
  106. pblmsId: '',
  107. pblmsTypeId: '',
  108. persName: '',
  109. pguid: '',
  110. recPers: '',
  111. regid: '',
  112. reviConc: '',
  113. reviOpin: '',
  114. reviOrgGuid: '',
  115. srcDesc: '',
  116. startTime: '',
  117. state: '',
  118. villType: '',
  119. villageCode: '',
  120. },
  121. pictureArray: [],
  122. audioArray: [],
  123. videoArray: [],
  124. fileArray: [],
  125. audiotabName: "",
  126. videotabName: "",
  127. picturetabName: "",
  128. filetabName: "",
  129. playerOptions: {
  130. height: '120',
  131. autoplay: true,
  132. muted: true,
  133. language: 'en',
  134. playbackRates: [0.7, 1.0, 1.5, 2.0],
  135. labelName: '',
  136. sources: [{
  137. type: "video/mp4",
  138. // mp4
  139. src: "http://vjs.zencdn.net/v/oceans.mp4",
  140. // webm
  141. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  142. },
  143. {
  144. type: "video/mp4",
  145. // mp4
  146. src: "http://vjs.zencdn.net/v/oceans.mp4",
  147. // webm
  148. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  149. },
  150. {
  151. type: "video/mp4",
  152. // mp4
  153. src: "http://vjs.zencdn.net/v/oceans.mp4",
  154. // webm
  155. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  156. },
  157. {
  158. type: "video/mp4",
  159. // mp4
  160. src: "http://vjs.zencdn.net/v/oceans.mp4",
  161. // webm
  162. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  163. }],
  164. },
  165. };
  166. },
  167. computed: {
  168. hostUrl() {
  169. return hostUrl
  170. }
  171. },
  172. mounted: function () {
  173. this.problemDetail = {};
  174. this.pictureArray = [];
  175. this.audioArray = [];
  176. this.videoArray = [];
  177. this.fileArray = [];
  178. if(this.problemId){
  179. this.showDetails();
  180. }
  181. if (this.objType == 53 || this.objType == 54 || this.objType == 55 || this.objType == 56 || this.objType == 57) {
  182. this.isShow = false;
  183. }
  184. },
  185. watch: {
  186. problemId(val) {
  187. this.problemDetail = {};
  188. this.pictureArray = [];
  189. this.audioArray = [];
  190. this.videoArray = [];
  191. this.fileArray = [];
  192. if(val){
  193. this.showDetails();
  194. }
  195. }
  196. },
  197. methods: {
  198. init() {
  199. this.activeName = "0";
  200. },
  201. showDetails() {
  202. var params = {
  203. bizId:this.problemId
  204. }
  205. request.post(`/file/findAllFile`,params).then(res => {
  206. if (res.success) {
  207. this.pictureArray = [];
  208. this.videoArray = [];
  209. this.audioArray = [];
  210. this.fileArray = [];
  211. res.data.forEach(item => {
  212. if (
  213. item.fileExt == "jpg" ||
  214. item.fileExt == "JPG" ||
  215. item.fileExt == "png" ||
  216. item.fileExt == "PNG" ||
  217. item.fileExt == "JPEG" ||
  218. item.fileExt == "jpeg"
  219. ) {
  220. this.pictureArray.push(item);
  221. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  222. this.videoArray.push({
  223. height: "320",
  224. width: "500",
  225. id: item.id,
  226. bizId: item.bizId,
  227. autoplay: false,
  228. muted: true,
  229. language: "en",
  230. playbackRates: [0.7, 1.0, 1.5, 2.0],
  231. sources: [
  232. {
  233. type: "video/mp4",
  234. src: this.hostUrl + item.filePath
  235. }
  236. ]
  237. });
  238. }else if (
  239. item.fileExt == "mp3" ||
  240. item.fileExt == "MP3" ||
  241. item.fileExt == "m4a"
  242. ) {
  243. this.audioArray.push(item);
  244. }else{
  245. this.fileArray.push(item);
  246. }
  247. });
  248. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  249. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  250. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  251. this.filetabName = "其他资料(" + this.fileArray.length + ")";
  252. }
  253. })
  254. },
  255. }
  256. };
  257. </script>
  258. <style scoped>
  259. @import '../../assets/style/global.css';
  260. .el-form-item {
  261. width: 100%;
  262. margin-bottom: 0;
  263. }
  264. </style>