cd0f2f6dae6f2a0710e4b00df61a4c3048dd17e5.svn-base 14 KB

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