86d74716400a8301649a75ee8c895b568df8e065.svn-base 14 KB

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