8e02ff61de5d6aeca7d51fee3f03e8bc9521fabe.svn-base 15 KB

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