0e372af37aab8a2b265cd5c0c7ea7e61d8afb73d.svn-base 10 KB

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