2d2ac56db5b945727682ea4c5dbae95f6b29ddc5.svn-base 12 KB

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