043590bd11d96499a68f3095be47b6d109c73c8b.svn-base 14 KB

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