865456c0b45eb93243ca2e0cfa062c98eae6429d.svn-base 13 KB

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