aed1d0dbd73de683d709ab44aa7c583ccdcd1dbc.svn-base 14 KB

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