ae8dcb6e08643096f8f9d6c76e7fe5ca5d70bf6b.svn-base 11 KB

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