e8e2079ad33480a7cbabb55fd20601c4bd887aba.svn-base 13 KB

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