9aa045c0d91439b0964d030efd97f64ef25d12ce.svn-base 12 KB

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