d3f40c3cf625681e3a3caeb2ccd53d87d01bdc4b.svn-base 17 KB

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