bab7a8ec0de4de3ec9137045b78170aa20940590.svn-base 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  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.pblmNm}}</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;">
  11. <span v-if="problemDetail.rectConc == 1">整改中</span>
  12. <span v-if="problemDetail.rectConc == 2">未整改</span>
  13. <span v-if="problemDetail.rectConc == 3">已整改</span>
  14. <span v-if="problemDetail.rectConc == 4">不具备整改条件</span>
  15. </p>
  16. </el-form-item>
  17. <el-form-item label="整改说明:">
  18. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);min-height: 24px;">{{problemDetail.inspPblmDesc}}</p>
  19. </el-form-item>
  20. </el-form>
  21. </div>
  22. <div :style="{'height':testHeight+'px',}" style="width:50%;float:left;border:1px solid #d5d5ff;">
  23. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
  24. <el-tabs style="overflow-y: auto;margin:5px;" :style="{'max-height':testHeight-40 +'px',}">
  25. <el-tab-pane :label="picturetabName" style="height: 350px;">
  26. <el-carousel :interval="4000" height="350px">
  27. <el-carousel-item v-for="(item,index) in pictureArray" :key="index" >
  28. <a :href="`${hostUrl}${item.filePath}`" target="_blank">
  29. <img style="height:100%;" :src="`${hostUrl}${item.filePath}`" alt>
  30. </a>
  31. </el-carousel-item>
  32. <el-carousel-item v-if="pictureArray.length==0">
  33. <p>暂无图片信息</p>
  34. </el-carousel-item>
  35. </el-carousel>
  36. </el-tab-pane>
  37. <el-tab-pane :label="audiotabName">
  38. <elaudio v-for="(audio,index) in audioArray" :key="index" style="margin-left:15%" :theUrl="`${hostUrl}${audio.filePath}`"></elaudio>
  39. <p v-if="audioArray.length==0">暂无音频信息</p>
  40. </el-tab-pane>
  41. <el-tab-pane :label="videotabName">
  42. <el-carousel :interval="4000" height="350px">
  43. <el-carousel-item v-for="(item,index) in videoArray" :key="index" >
  44. <video-player class="vjs-custom-skin"
  45. ref="videoPlayer"
  46. :options="item"
  47. :playsinline="true"
  48. >
  49. </video-player>
  50. </el-carousel-item>
  51. <el-carousel-item v-if="videoArray.length==0">
  52. <p>暂无视频信息</p>
  53. </el-carousel-item>
  54. </el-carousel>
  55. </el-tab-pane>
  56. <el-tab-pane :label="filetabName">
  57. <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
  58. <el-table-column header-align="center" align="center" label="文档">
  59. <template slot-scope="scope">
  60. <p>
  61. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank" rel="noopener noreferrer">
  62. {{scope.row.fileName}}
  63. </a>
  64. </p>
  65. </template>
  66. </el-table-column>
  67. </el-table>
  68. </el-tab-pane>
  69. </el-tabs>
  70. </div>
  71. </div>
  72. </template>
  73. <script>
  74. import request from '@util/gw_ajax_request.js'
  75. import { hostUrl } from "@util/global_variable.js";
  76. export default {
  77. props: ['problemId'],
  78. components: {
  79. elaudio: resolve => {
  80. require(["@widget/elAudio.vue"], resolve);
  81. },
  82. },
  83. data() {
  84. return {
  85. testHeight: window.innerHeight * 0.6,
  86. activeName: "0",
  87. superviseinspect: {},
  88. fileList: [],
  89. groupingList: [],
  90. fileListloading: false,
  91. groupListloading: false,
  92. problemDetail:{
  93. inspPblmDesc:'',
  94. },
  95. pictureArray:[],
  96. audioArray:[],
  97. videoArray:[],
  98. fileArray: [],
  99. audiotabName: "",
  100. videotabName: "",
  101. picturetabName: "",
  102. filetabName: "",
  103. playerOptions: {
  104. height: '120',
  105. autoplay: true,
  106. muted: true,
  107. language: 'en',
  108. playbackRates: [0.7, 1.0, 1.5, 2.0],
  109. sources: [
  110. {
  111. type: "video/mp4",
  112. src: "http://vjs.zencdn.net/v/oceans.mp4",
  113. },
  114. {
  115. type: "video/mp4",
  116. src: "http://vjs.zencdn.net/v/oceans.mp4",
  117. },
  118. {
  119. type: "video/mp4",
  120. src: "http://vjs.zencdn.net/v/oceans.mp4",
  121. },
  122. {
  123. type: "video/mp4",
  124. src: "http://vjs.zencdn.net/v/oceans.mp4",
  125. }
  126. ]
  127. },
  128. };
  129. },
  130. computed:{
  131. hostUrl(){
  132. return hostUrl
  133. }
  134. },
  135. mounted:function(){
  136. this.problemDetail = {};
  137. this.pictureArray = [];
  138. this.audioArray = [];
  139. this.videoArray = [];
  140. this.fileArray = [];
  141. this.showDetails();
  142. },
  143. watch:{
  144. problemId:function(){
  145. this.problemDetail = {};
  146. this.pictureArray = [];
  147. this.audioArray = [];
  148. this.videoArray = [];
  149. this.fileArray = [];
  150. this.showDetails();
  151. }
  152. },
  153. methods: {
  154. init() {
  155. this.activeName = "0";
  156. },
  157. showDetails() {
  158. request.get(`/tac/pblm/rect/plmb/aps/${this.problemId}`).then(res => {
  159. this.problemDetail = res.data;
  160. if(res.data.gwComFiles){
  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. };
  198. </script>
  199. <style scoped>
  200. .name {
  201. background-color: #ebf8ff;
  202. }
  203. .details>>>.el-tabs__content {
  204. height: 360px;
  205. overflow-y: auto;
  206. }
  207. .flexbody>div {
  208. display: flex;
  209. align-items: flex-start;
  210. line-height: 30px;
  211. }
  212. .flexbody div span:first-child {
  213. width: 100px;
  214. flex-shrink: 0;
  215. }
  216. .flexbody div span:first-child {
  217. color: blue;
  218. }
  219. .fileList span {
  220. margin-right: 10px;
  221. cursor: pointer;
  222. }
  223. .fileList span:hover {
  224. color: blueviolet;
  225. }
  226. .el-form-item {
  227. width: 100%;
  228. margin-bottom: 0;
  229. }
  230. </style>