fd2ff30593705478b002c531c30885dbaefed8d8.svn-base 16 KB

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