1f3e36cd516923e7c15d4995a84de8da30420a63.svn-base 12 KB

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