c4a4f845102c20dbbec9681c96cfd3c813fef91d.svn-base 15 KB

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