1ae1157665febcf5299e84ff8e0ab17f8163fa06.svn-base 10 KB

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