66e63e0edf2ae3a83aff7e1fecada990d30c67fd.svn-base 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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-tab-pane label="现场检查表上传">
  75. <pblmConfirmShett :openType="false" :currentObjectId="problemDetail.objId" :key="problemDetail.objId"></pblmConfirmShett>
  76. </el-tab-pane>
  77. </el-tabs>
  78. </div>
  79. </div>
  80. </template>
  81. <script>
  82. import Viewer from 'viewerjs';
  83. import 'viewerjs/dist/viewer.css';
  84. import {showDetailsXq} from "../../api/duChaAPI.js";
  85. import {hostUrl} from "@util/global_variable.js";
  86. export default {
  87. props: ["details", 'problemId', 'objType'],
  88. components: {
  89. elaudio: resolve => {
  90. require(["../../widgets/elAudio.vue"], resolve);
  91. },
  92. pblmConfirmShett: resolve => {
  93. require(["../duChaDuiXiang/pblmConfirmShett"], resolve);
  94. }
  95. },
  96. data() {
  97. return {
  98. testHeight: window.innerHeight * 0.6,
  99. activeName: "0",
  100. superviseinspect: {},
  101. fileList: [],
  102. groupingList: [],
  103. fileListloading: false,
  104. groupListloading: false,
  105. problemDetail: {
  106. checkPoint: '',
  107. collTime: '',
  108. commonFileIds: '',
  109. cwsCode: '',
  110. cwsName: '',
  111. dataStat: '',
  112. endTime: '',
  113. fileNo: '',
  114. fileNoNumber: '',
  115. gwComFiles: '',
  116. ifCasePblm: '',
  117. inspAddDesc: '',
  118. inspGroupId: '',
  119. inspPblmCate: '',
  120. inspPblmCode: '',
  121. inspPblmDesc: '',
  122. inspPblmName: '',
  123. inspPblmOrgName: '',
  124. inspPblmType: '',
  125. inspPblmsName: '',
  126. nm: '',
  127. note: '',
  128. objId: '',
  129. objNm: '',
  130. objType: '',
  131. pblmDesc: '',
  132. pblmId: '',
  133. pblmLat: '',
  134. pblmLong: '',
  135. pblmPersName: '',
  136. pblmStat: '',
  137. pblmsId: '',
  138. pblmsTypeId: '',
  139. persName: '',
  140. pguid: '',
  141. recPers: '',
  142. regid: '',
  143. reviConc: '',
  144. reviOpin: '',
  145. reviOrgGuid: '',
  146. srcDesc: '',
  147. startTime: '',
  148. state: '',
  149. villType: '',
  150. villageCode: '',
  151. },
  152. pictureArray: [],
  153. audioArray: [],
  154. videoArray: [],
  155. fileArray: [],
  156. audiotabName: "",
  157. videotabName: "",
  158. picturetabName: "",
  159. filetabName: "",
  160. playerOptions: {
  161. height: '120',
  162. autoplay: true,
  163. muted: true,
  164. language: 'en',
  165. playbackRates: [0.7, 1.0, 1.5, 2.0],
  166. labelName: '',
  167. sources: [{
  168. type: "video/mp4",
  169. src: "http://vjs.zencdn.net/v/oceans.mp4"
  170. },
  171. {
  172. type: "video/mp4",
  173. src: "http://vjs.zencdn.net/v/oceans.mp4"
  174. },
  175. {
  176. type: "video/mp4",
  177. src: "http://vjs.zencdn.net/v/oceans.mp4"
  178. },
  179. {
  180. type: "video/mp4",
  181. src: "http://vjs.zencdn.net/v/oceans.mp4"
  182. }],
  183. },
  184. };
  185. },
  186. computed: {
  187. hostUrl() {
  188. return hostUrl
  189. }
  190. },
  191. mounted: function () {
  192. this.problemDetail = {};
  193. this.pictureArray = [];
  194. this.audioArray = [];
  195. this.videoArray = [];
  196. this.fileArray = [];
  197. this.showDetails();
  198. },
  199. watch: {
  200. problemId: function () {
  201. this.problemDetail = {};
  202. this.pictureArray = [];
  203. this.audioArray = [];
  204. this.videoArray = [];
  205. this.fileArray = [];
  206. this.showDetails();
  207. }
  208. },
  209. methods: {
  210. init() {
  211. this.activeName = "0";
  212. },
  213. showDetails() {
  214. showDetailsXq(this.problemId).then(res => {
  215. this.problemDetail = res.data;
  216. console.log(this.hostUrl);
  217. if (res.data.gwComFiles) {
  218. res.data.gwComFiles.forEach(
  219. (item) => {
  220. if (item.fileExt == 'mp3' || item.fileExt == 'MP3' || item.fileExt == 'm4a') {
  221. this.audioArray.push(item);
  222. } else if (item.fileExt == 'jpg' || item.fileExt == 'JPEG' || item.fileExt == 'jpeg' || item.fileExt == 'JPG' || item.fileExt == 'png' || item.fileExt == 'PNG') {
  223. this.pictureArray.push(item);
  224. this.$nextTick(function(){
  225. var ViewerDom = document.getElementById('detailImg');
  226. var viewer = new Viewer(ViewerDom, {
  227. // hide:function(){ //在图片消失的时候销毁viewer
  228. // viewer.destroy();
  229. // }
  230. })
  231. });
  232. } else if (item.fileExt == 'mp4' || item.fileExt == 'MP4') {
  233. this.videoArray.push(
  234. {
  235. height: '350',
  236. autoplay: false,
  237. muted: true,
  238. language: 'en',
  239. playbackRates: [0.7, 1.0, 1.5, 2.0],
  240. sources: [{
  241. type: "video/mp4",
  242. // mp4
  243. src: `${this.hostUrl}/${item.filePath}`,
  244. // webm
  245. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  246. }],
  247. },
  248. );
  249. } else {
  250. this.fileArray.push(item);
  251. }
  252. }
  253. );
  254. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  255. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  256. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  257. this.filetabName = "其他资料(" + this.fileArray.length + ")";
  258. }
  259. });
  260. },
  261. }
  262. };
  263. </script>
  264. <style scoped>
  265. @import '../../assets/style/global.css';
  266. .el-form-item {
  267. width: 100%;
  268. margin-bottom: 0;
  269. }
  270. </style>