35cdc2f4e4e67649c4f503f8f5953bf3b31d15cc.svn-base 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. <template>
  2. <div id="eventDetailBody" style="padding: 3px;" :style="{'height':testHeight+'px',}">
  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',}" style="overflow-y: auto;height:100%;margin:5px;" :model="problemDetail">
  6. <el-form-item :label="objType == '25' ? '督查对象名称:' : '督查对象名称:'">
  7. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);">{{problemDetail.nm}}</p>
  8. </el-form-item>
  9. <el-form-item label="问题类别:">
  10. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);">{{problemDetail.inspPblmsName}}</p>
  11. </el-form-item>
  12. <el-form-item label="检查事项:">
  13. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);">{{problemDetail.checkPoint}}</p>
  14. </el-form-item>
  15. <el-form-item label="详细描述:">
  16. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);">{{problemDetail.inspPblmDesc}}</p>
  17. </el-form-item>
  18. <el-form-item label="上报人:">
  19. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);;">{{problemDetail.persName}}</p>
  20. </el-form-item>
  21. </el-form>
  22. </div>
  23. <div :style="{'height':testHeight+'px',}" style="width:50%;float:left;border:1px solid #d5d5ff;">
  24. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
  25. <el-tabs style="overflow-y: auto;margin:5px;" :style="{'max-height':testHeight-40 +'px',}">
  26. <el-tab-pane :label="picturetabName" style="height: 350px;">
  27. <el-carousel :interval="4000" height="350px" id="detailImg">
  28. <el-carousel-item v-for="(item,index) in pictureArray" :key="index" >
  29. <!-- <a :href="`${hostUrl}/${item.filePath}`" target="_blank">-->
  30. <img style="height:100%;" :src="`${hostUrl}/${item.filePath}`" alt>
  31. <!-- </a>-->
  32. </el-carousel-item>
  33. <el-carousel-item v-if="pictureArray.length==0">
  34. <p>暂无图片信息</p>
  35. </el-carousel-item>
  36. </el-carousel>
  37. </el-tab-pane>
  38. <el-tab-pane :label="audiotabName">
  39. <elaudio v-for="(audio,index) in audioArray" :key="index" style="margin-left:15%" :theUrl="`${hostUrl}/${audio.filePath}`"></elaudio>
  40. <p v-if="audioArray.length==0">暂无音频信息</p>
  41. </el-tab-pane>
  42. <el-tab-pane :label="videotabName">
  43. <el-carousel :interval="4000" height="350px">
  44. <el-carousel-item v-for="(item,index) in videoArray" :key="index" >
  45. <video-player class="vjs-custom-skin"
  46. ref="videoPlayer"
  47. :options="item"
  48. :playsinline="true"
  49. >
  50. </video-player>
  51. </el-carousel-item>
  52. <el-carousel-item v-if="videoArray.length==0">
  53. <p>暂无视频信息</p>
  54. </el-carousel-item>
  55. </el-carousel>
  56. </el-tab-pane>
  57. <el-tab-pane :label="filetabName">
  58. <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
  59. <el-table-column header-align="center" align="center" label="文档">
  60. <template slot-scope="scope">
  61. <p>
  62. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank" rel="noopener noreferrer">
  63. {{scope.row.fileName}}
  64. </a>
  65. </p>
  66. </template>
  67. </el-table-column>
  68. </el-table>
  69. </el-tab-pane>
  70. </el-tabs>
  71. </div>
  72. </div>
  73. </template>
  74. <script>
  75. import Viewer from 'viewerjs';
  76. import 'viewerjs/dist/viewer.css';
  77. import {
  78. deleteFileById,
  79. getsuperviseinspect,
  80. getFileByBiz,
  81. getSuperviseGroup,
  82. showDetailsXq,
  83. } from "@api/duChaAPI.js";
  84. import {hostUrl} from '@util/global_variable'
  85. // import elaudio from '../widgets/elAudio.vue'
  86. export default {
  87. props: ["details",'problemId','objType'],
  88. components: {
  89. elaudio: resolve => {
  90. require(["@widget/elAudio.vue"], 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. // mp4
  167. src: "http://vjs.zencdn.net/v/oceans.mp4",
  168. // webm
  169. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  170. },
  171. {
  172. type: "video/mp4",
  173. // mp4
  174. src: "http://vjs.zencdn.net/v/oceans.mp4",
  175. // webm
  176. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  177. },
  178. {
  179. type: "video/mp4",
  180. // mp4
  181. src: "http://vjs.zencdn.net/v/oceans.mp4",
  182. // webm
  183. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  184. },
  185. {
  186. type: "video/mp4",
  187. // mp4
  188. src: "http://vjs.zencdn.net/v/oceans.mp4",
  189. // webm
  190. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  191. }],
  192. },
  193. };
  194. },
  195. computed:{
  196. hostUrl(){
  197. return hostUrl
  198. }
  199. },
  200. mounted:function(){
  201. this.problemDetail = {};
  202. this.pictureArray = [];
  203. this.audioArray = [];
  204. this.videoArray = [];
  205. this.fileArray = [];
  206. this.showDetails();
  207. },
  208. watch:{
  209. problemId:function(){
  210. this.problemDetail = {};
  211. this.pictureArray = [];
  212. this.audioArray = [];
  213. this.videoArray = [];
  214. this.fileArray = [];
  215. this.showDetails();
  216. }
  217. },
  218. methods: {
  219. init() {
  220. this.activeName = "0";
  221. },
  222. showDetails() {
  223. showDetailsXq(this.problemId).then(res => {
  224. this.problemDetail = res.data;
  225. console.log(hostUrl);
  226. res.data.gwComFiles.forEach(
  227. (item) =>{
  228. if(item.fileExt == 'mp3'||item.fileExt == 'MP3'||item.fileExt == 'm4a'){
  229. this.audioArray.push(item);
  230. }else if(item.fileExt == 'jpg' || item.fileExt == 'JPEG' || item.fileExt == 'jpeg' || item.fileExt == 'JPG' || item.fileExt == 'png' || item.fileExt == 'PNG'){
  231. this.pictureArray.push(item);
  232. this.$nextTick(function(){
  233. var ViewerDom = document.getElementById('detailImg');
  234. var viewer = new Viewer(ViewerDom, {
  235. // hide:function(){ //在图片消失的时候销毁viewer
  236. // viewer.destroy();
  237. // }
  238. })
  239. });
  240. }else if(item.fileExt == 'mp4'||item.fileExt == 'MP4'){
  241. this.videoArray.push(
  242. {
  243. height: '350',
  244. autoplay: false,
  245. muted: true,
  246. language: 'en',
  247. playbackRates: [0.7, 1.0, 1.5, 2.0],
  248. sources: [{
  249. type: "video/mp4",
  250. // mp4
  251. src: `${this.hostUrl}/${item.filePath}`,
  252. // webm
  253. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  254. }],
  255. },
  256. );
  257. } else {
  258. this.fileArray.push(item);
  259. }
  260. }
  261. );
  262. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  263. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  264. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  265. this.filetabName = "其它资料(" + this.fileArray.length + ")";
  266. });
  267. },
  268. timestampToTime(detail) {
  269. var date = new Date(detail);
  270. var Y = date.getFullYear() + "-";
  271. var M =
  272. (date.getMonth() + 1 < 10 ?
  273. "0" + (date.getMonth() + 1) :
  274. date.getMonth() + 1) + "-";
  275. var D =
  276. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  277. var h =
  278. (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
  279. var m =
  280. date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  281. return Y + M + D + h + m;
  282. }
  283. }
  284. };
  285. </script>
  286. <style scoped>
  287. .name {
  288. background-color: #ebf8ff;
  289. }
  290. .details>>>.el-tabs__content {
  291. height: 360px;
  292. overflow-y: auto;
  293. }
  294. .flexbody>div {
  295. display: flex;
  296. align-items: flex-start;
  297. line-height: 30px;
  298. }
  299. .flexbody div span:first-child {
  300. width: 100px;
  301. flex-shrink: 0;
  302. }
  303. .flexbody div span:first-child {
  304. color: blue;
  305. }
  306. .fileList span {
  307. margin-right: 10px;
  308. cursor: pointer;
  309. }
  310. .fileList span:hover {
  311. color: blueviolet;
  312. }
  313. .el-form-item {
  314. width: 100%;
  315. margin-bottom: 0;
  316. }
  317. </style>