e76bf2668c889b8f0c57333f2e1bbd61cc12a282.svn-base 8.3 KB

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