f1e5a6e32d200aa84100333a99d7d3689fa7e9db.svn-base 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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);">{{objType == '97' ? problemDetail.objName : problemDetail.newVillName}}</p>
  8. </el-form-item>
  9. <el-form-item label="行政区划:">
  10. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);">{{objType == '97' ? problemDetail.adFullName : problemDetail.inspAddDesc}}</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.inspPblmsName}}</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.checkPoint}}</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.pblmDesc}}</p>
  20. </el-form-item>
  21. <el-form-item label="详细描述:">
  22. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);">{{problemDetail.inspPblmDesc}}</p>
  23. </el-form-item>
  24. <el-form-item label="上报人:">
  25. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);;">{{problemDetail.persName}}</p>
  26. </el-form-item>
  27. </el-form>
  28. </div>
  29. <div :style="{'height':testHeight+'px',}" style="width:50%;float:left;border:1px solid #d5d5ff;">
  30. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
  31. <el-tabs style="overflow-y: auto;margin:5px;" :style="{'max-height':testHeight-40 +'px',}">
  32. <el-tab-pane :label="picturetabName" style="height: 350px;">
  33. <el-carousel :interval="4000" height="350px" id="detailImg">
  34. <el-carousel-item v-for="(item,index) in pictureArray" :key="index" >
  35. <a :href="`${hostUrl}/${item.filePath}`" target="_blank">
  36. <img style="height:100%;" :src="`${hostUrl}/${item.filePath}`" alt>
  37. </a>
  38. </el-carousel-item>
  39. <el-carousel-item v-if="pictureArray.length==0">
  40. <p>暂无图片信息</p>
  41. </el-carousel-item>
  42. </el-carousel>
  43. </el-tab-pane>
  44. <el-tab-pane :label="audiotabName">
  45. <elaudio v-for="(audio,index) in audioArray" :key="index" style="margin-left:15%" :theUrl="`${hostUrl}/${audio.filePath}`"></elaudio>
  46. <p v-if="audioArray.length==0">暂无音频信息</p>
  47. </el-tab-pane>
  48. <el-tab-pane :label="videotabName">
  49. <el-carousel :interval="4000" height="350px">
  50. <el-carousel-item v-for="(item,index) in videoArray" :key="index" >
  51. <video-player class="vjs-custom-skin"
  52. ref="videoPlayer"
  53. :options="item"
  54. :playsinline="true"
  55. >
  56. </video-player>
  57. </el-carousel-item>
  58. <el-carousel-item v-if="videoArray.length==0">
  59. <p>暂无视频信息</p>
  60. </el-carousel-item>
  61. </el-carousel>
  62. </el-tab-pane>
  63. <el-tab-pane :label="filetabName">
  64. <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
  65. <el-table-column header-align="center" align="center" label="文档">
  66. <template slot-scope="scope">
  67. <p>
  68. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank" rel="noopener noreferrer">
  69. {{scope.row.fileName}}
  70. </a>
  71. </p>
  72. </template>
  73. </el-table-column>
  74. </el-table>
  75. </el-tab-pane>
  76. </el-tabs>
  77. </div>
  78. </div>
  79. </template>
  80. <script>
  81. import Viewer from 'viewerjs';
  82. import 'viewerjs/dist/viewer.css';
  83. import {
  84. deleteFileById,
  85. getsuperviseinspect,
  86. getFileByBiz,
  87. getSuperviseGroup,
  88. showDetailsXq,
  89. } from "@api/duChaAPI.js";
  90. import {hostUrl} from '@util/global_variable'
  91. // import elaudio from '../widgets/elAudio.vue'
  92. export default {
  93. props: ["details",'problemId','objType'],
  94. components: {
  95. elaudio: resolve => {
  96. require(["@widget/elAudio.vue"], resolve);
  97. },
  98. },
  99. data() {
  100. return {
  101. testHeight: window.innerHeight * 0.6,
  102. activeName: "0",
  103. superviseinspect: {},
  104. fileList: [],
  105. groupingList: [],
  106. fileListloading: false,
  107. groupListloading: false,
  108. problemDetail:{
  109. checkPoint:'',
  110. collTime:'',
  111. commonFileIds:'',
  112. cwsCode:'',
  113. cwsName:'',
  114. dataStat:'',
  115. endTime:'',
  116. fileNo:'',
  117. fileNoNumber:'',
  118. gwComFiles:'',
  119. ifCasePblm:'',
  120. inspAddDesc:'',
  121. inspGroupId:'',
  122. inspPblmCate:'',
  123. inspPblmCode:'',
  124. inspPblmDesc:'',
  125. inspPblmName:'',
  126. inspPblmOrgName:'',
  127. inspPblmType:'',
  128. inspPblmsName:'',
  129. nm:'',
  130. note:'',
  131. objId:'',
  132. objNm:'',
  133. objType:'',
  134. pblmDesc:'',
  135. pblmId:'',
  136. pblmLat:'',
  137. pblmLong:'',
  138. pblmPersName:'',
  139. pblmStat:'',
  140. pblmsId:'',
  141. pblmsTypeId:'',
  142. persName:'',
  143. pguid:'',
  144. recPers:'',
  145. regid:'',
  146. reviConc:'',
  147. reviOpin:'',
  148. reviOrgGuid:'',
  149. srcDesc:'',
  150. startTime:'',
  151. state:'',
  152. villType:'',
  153. villageCode:'',
  154. },
  155. pictureArray:[],
  156. audioArray:[],
  157. videoArray:[],
  158. fileArray: [],
  159. audiotabName: "",
  160. videotabName: "",
  161. picturetabName: "",
  162. filetabName: "",
  163. playerOptions: {
  164. height: '120',
  165. autoplay: true,
  166. muted: true,
  167. language: 'en',
  168. playbackRates: [0.7, 1.0, 1.5, 2.0],
  169. labelName:'',
  170. sources: [{
  171. type: "video/mp4",
  172. // mp4
  173. src: "http://vjs.zencdn.net/v/oceans.mp4",
  174. // webm
  175. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  176. },
  177. {
  178. type: "video/mp4",
  179. // mp4
  180. src: "http://vjs.zencdn.net/v/oceans.mp4",
  181. // webm
  182. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  183. },
  184. {
  185. type: "video/mp4",
  186. // mp4
  187. src: "http://vjs.zencdn.net/v/oceans.mp4",
  188. // webm
  189. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  190. },
  191. {
  192. type: "video/mp4",
  193. // mp4
  194. src: "http://vjs.zencdn.net/v/oceans.mp4",
  195. // webm
  196. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  197. }],
  198. },
  199. };
  200. },
  201. computed:{
  202. hostUrl(){
  203. return hostUrl
  204. }
  205. },
  206. mounted:function(){
  207. this.problemDetail = {};
  208. this.pictureArray = [];
  209. this.audioArray = [];
  210. this.videoArray = [];
  211. this.fileArray = [];
  212. this.showDetails();
  213. },
  214. watch:{
  215. problemId:function(){
  216. this.problemDetail = {};
  217. this.pictureArray = [];
  218. this.audioArray = [];
  219. this.videoArray = [];
  220. this.fileArray = [];
  221. this.showDetails();
  222. }
  223. },
  224. methods: {
  225. init() {
  226. this.activeName = "0";
  227. },
  228. showDetails() {
  229. showDetailsXq(this.problemId).then(res => {
  230. this.problemDetail = res.data;
  231. console.log(hostUrl);
  232. res.data.gwComFiles.forEach(
  233. (item) =>{
  234. if(item.fileExt == 'mp3'||item.fileExt == 'MP3'||item.fileExt == 'm4a'){
  235. this.audioArray.push(item);
  236. }else if(item.fileExt == 'jpg' || item.fileExt == 'JPEG' || item.fileExt == 'jpeg' || item.fileExt == 'JPG' || item.fileExt == 'png' || item.fileExt == 'PNG'){
  237. this.pictureArray.push(item);
  238. this.$nextTick(function(){
  239. var ViewerDom = document.getElementById('detailImg');
  240. var viewer = new Viewer(ViewerDom, {})
  241. });
  242. }else if(item.fileExt == 'mp4'||item.fileExt == 'MP4'){
  243. this.videoArray.push(
  244. {
  245. height: '350',
  246. autoplay: false,
  247. muted: true,
  248. language: 'en',
  249. playbackRates: [0.7, 1.0, 1.5, 2.0],
  250. sources: [{
  251. type: "video/mp4",
  252. // mp4
  253. src: `${this.hostUrl}/${item.filePath}`,
  254. // webm
  255. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  256. }],
  257. },
  258. );
  259. } else {
  260. this.fileArray.push(item);
  261. }
  262. }
  263. );
  264. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  265. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  266. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  267. this.filetabName = "其它资料(" + this.fileArray.length + ")";
  268. });
  269. },
  270. timestampToTime(detail) {
  271. var date = new Date(detail);
  272. var Y = date.getFullYear() + "-";
  273. var M =
  274. (date.getMonth() + 1 < 10 ?
  275. "0" + (date.getMonth() + 1) :
  276. date.getMonth() + 1) + "-";
  277. var D =
  278. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  279. var h =
  280. (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
  281. var m =
  282. date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  283. return Y + M + D + h + m;
  284. }
  285. }
  286. };
  287. </script>
  288. <style scoped>
  289. .name {
  290. background-color: #ebf8ff;
  291. }
  292. .details>>>.el-tabs__content {
  293. height: 360px;
  294. overflow-y: auto;
  295. }
  296. .flexbody>div {
  297. display: flex;
  298. align-items: flex-start;
  299. line-height: 30px;
  300. }
  301. .flexbody div span:first-child {
  302. width: 100px;
  303. flex-shrink: 0;
  304. }
  305. .flexbody div span:first-child {
  306. color: blue;
  307. }
  308. .fileList span {
  309. margin-right: 10px;
  310. cursor: pointer;
  311. }
  312. .fileList span:hover {
  313. color: blueviolet;
  314. }
  315. .el-form-item {
  316. width: 100%;
  317. margin-bottom: 0;
  318. }
  319. </style>