ef1ea8aac863bfd56945cddc64779f78be4e110f.svn-base 13 KB

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