cfd2fee2ce3a827931ad51952ae90f1de268bb3a.svn-base 9.4 KB

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