5fc3b687543065b694d4a79fdb3d535f0f75f962.svn-base 12 KB

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