b76753cdaad21f69a1f02ef58d70eef264b7ea64.svn-base 13 KB

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