737faadfea5a673efea75a3c8562142bbb4a4585.svn-base 13 KB

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