b1bd01eb3e609d84b68335eb54e2823fa1d76846.svn-base 10 KB

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