fc7baaf7e074b60fe8a75fa28698295ab94bd31f.svn-base 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <template>
  2. <div id="eventDetailBody" style="padding: 3px;" :style="{'height':testHeight+'px',}">
  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="问题名称:">
  7. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);min-height: 24px;">{{problemDetail.projectName}}</p>
  8. </el-form-item>
  9. <el-form-item label="问题阐述:">
  10. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);min-height: 24px;">{{problemDetail.inspPblmDesc}}</p>
  11. </el-form-item>
  12. <el-form-item label="严重程度:">
  13. <span v-if="problemDetail.inspPblmCate == 0">一般</span>
  14. <span v-if="problemDetail.inspPblmCate == 1">较重</span>
  15. <span v-if="problemDetail.inspPblmCate == 2">严重</span>
  16. <span v-if="problemDetail.inspPblmCate == 3">非常严重</span>
  17. </el-form-item>
  18. </el-form>
  19. </div>
  20. <div :style="{'height':testHeight+'px',}" style="width:50%;float:left;border:1px solid #d5d5ff;">
  21. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
  22. <el-tabs style="overflow-y: auto;margin:5px;" :style="{'max-height':testHeight-40 +'px',}">
  23. <el-tab-pane :label="picturetabName" style="height: 350px;">
  24. <el-carousel :interval="4000" height="350px">
  25. <el-carousel-item v-for="(item,index) in pictureArray" :key="index" >
  26. <a :href="`${hostUrl}${item.filePath}`" target="_blank">
  27. <img style="height:100%;" :src="`${hostUrl}${item.filePath}`" alt>
  28. </a>
  29. </el-carousel-item>
  30. <el-carousel-item v-if="pictureArray.length==0">
  31. <p>暂无图片信息</p>
  32. </el-carousel-item>
  33. </el-carousel>
  34. </el-tab-pane>
  35. <el-tab-pane :label="audiotabName">
  36. <elaudio v-for="(audio,index) in audioArray" :key="index" style="margin-left:15%" :theUrl="`${hostUrl}${audio.filePath}`"></elaudio>
  37. <p v-if="audioArray.length==0">暂无音频信息</p>
  38. </el-tab-pane>
  39. <el-tab-pane :label="videotabName">
  40. <el-carousel :interval="4000" height="350px">
  41. <el-carousel-item v-for="(item,index) in videoArray" :key="index" >
  42. <video-player class="vjs-custom-skin"
  43. ref="videoPlayer"
  44. :options="item"
  45. :playsinline="true"
  46. >
  47. </video-player>
  48. </el-carousel-item>
  49. <el-carousel-item v-if="videoArray.length==0">
  50. <p>暂无视频信息</p>
  51. </el-carousel-item>
  52. </el-carousel>
  53. </el-tab-pane>
  54. <el-tab-pane :label="filetabName">
  55. <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
  56. <el-table-column header-align="center" align="center" label="文档">
  57. <template slot-scope="scope">
  58. <p>
  59. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank" rel="noopener noreferrer">
  60. {{scope.row.fileName}}
  61. </a>
  62. </p>
  63. </template>
  64. </el-table-column>
  65. </el-table>
  66. </el-tab-pane>
  67. </el-tabs>
  68. </div>
  69. </div>
  70. </template>
  71. <script>
  72. import {
  73. showDetailsXq,
  74. } from "@api/duChaAPI.js";
  75. import request from '@util/gw_ajax_request.js'
  76. import { hostUrl } from "@util/global_variable.js";
  77. export default {
  78. props: ["details",'problemId','projectType','reviConc'],
  79. components: {
  80. elaudio: resolve => {
  81. require(["@widget/elAudio.vue"], resolve);
  82. },
  83. },
  84. data() {
  85. return {
  86. testHeight: window.innerHeight * 0.6,
  87. activeName: "0",
  88. superviseinspect: {},
  89. fileList: [],
  90. groupingList: [],
  91. fileListloading: false,
  92. groupListloading: false,
  93. problemDetail:{
  94. inspPblmDesc:'',
  95. },
  96. pictureArray:[],
  97. audioArray:[],
  98. videoArray:[],
  99. fileArray: [],
  100. audiotabName: "",
  101. videotabName: "",
  102. picturetabName: "",
  103. filetabName: "",
  104. playerOptions: {
  105. height: '120',
  106. autoplay: true,
  107. muted: true,
  108. language: 'en',
  109. playbackRates: [0.7, 1.0, 1.5, 2.0],
  110. sources: [
  111. {
  112. type: "video/mp4",
  113. src: "http://vjs.zencdn.net/v/oceans.mp4",
  114. },
  115. {
  116. type: "video/mp4",
  117. src: "http://vjs.zencdn.net/v/oceans.mp4",
  118. },
  119. {
  120. type: "video/mp4",
  121. src: "http://vjs.zencdn.net/v/oceans.mp4",
  122. },
  123. {
  124. type: "video/mp4",
  125. src: "http://vjs.zencdn.net/v/oceans.mp4",
  126. }
  127. ]
  128. },
  129. };
  130. },
  131. computed:{
  132. hostUrl(){
  133. return hostUrl
  134. }
  135. },
  136. mounted:function(){
  137. this.problemDetail = {};
  138. this.pictureArray = [];
  139. this.audioArray = [];
  140. this.videoArray = [];
  141. this.fileArray = [];
  142. // this.showDetails();
  143. },
  144. watch:{
  145. problemId:function(){
  146. this.problemDetail = {};
  147. this.pictureArray = [];
  148. this.audioArray = [];
  149. this.videoArray = [];
  150. this.fileArray = [];
  151. this.showDetails();
  152. }
  153. },
  154. methods: {
  155. init() {
  156. this.activeName = "0";
  157. },
  158. showDetails() {
  159. request.get(`/obj/key/pblm/getPblm/${this.problemId}/${this.projectType}`).then(res => {
  160. this.problemDetail = res.data;
  161. res.data.gwComFiles.forEach(
  162. (item) =>{
  163. if(item.fileExt == 'mp3'||item.fileExt == 'MP3'||item.fileExt == 'm4a'){
  164. this.audioArray.push(item);
  165. }else if(item.fileExt == 'jpg' || item.fileExt == 'JPEG' || item.fileExt == 'jpeg' || item.fileExt == 'JPG' || item.fileExt == 'png' || item.fileExt == 'PNG'){
  166. this.pictureArray.push(item);
  167. }else if(item.fileExt == 'mp4'||item.fileExt == 'MP4'){
  168. this.videoArray.push(
  169. {
  170. height: '350',
  171. autoplay: false,
  172. muted: true,
  173. language: 'en',
  174. playbackRates: [0.7, 1.0, 1.5, 2.0],
  175. sources: [{
  176. type: "video/mp4",
  177. // mp4
  178. src: `${this.hostUrl}/${item.filePath}`,
  179. // webm
  180. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  181. }],
  182. },
  183. );
  184. } else {
  185. this.fileArray.push(item);
  186. }
  187. }
  188. );
  189. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  190. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  191. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  192. this.filetabName = "其它资料(" + this.fileArray.length + ")";
  193. });
  194. },
  195. }
  196. };
  197. </script>
  198. <style scoped>
  199. .name {
  200. background-color: #ebf8ff;
  201. }
  202. .details>>>.el-tabs__content {
  203. height: 360px;
  204. overflow-y: auto;
  205. }
  206. .flexbody>div {
  207. display: flex;
  208. align-items: flex-start;
  209. line-height: 30px;
  210. }
  211. .flexbody div span:first-child {
  212. width: 100px;
  213. flex-shrink: 0;
  214. }
  215. .flexbody div span:first-child {
  216. color: blue;
  217. }
  218. .fileList span {
  219. margin-right: 10px;
  220. cursor: pointer;
  221. }
  222. .fileList span:hover {
  223. color: blueviolet;
  224. }
  225. .el-form-item {
  226. width: 100%;
  227. margin-bottom: 0;
  228. }
  229. </style>