9ea3b152fd0057655e702659f18265c8eef657f1.svn-base 12 KB

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