3bd99f9575becff2a6ccae5638ace94a9a7784be.svn-base 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  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="this.objType == '6' ? '水闸名称:' : this.objType == '13' ? '水源地名称:' : this.objType == '14' ? '督查对象名称:' : '水库名称:'">-->
  7. <!--<p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);">{{problemDetail.nm}}</p>-->
  8. <!--&lt;!&ndash; <el-input v-model="problemDetail.nm" :disabled="true"></el-input> &ndash;&gt;-->
  9. <!--</el-form-item>-->
  10. <el-form-item label="整改状态:">
  11. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);">{{zhengGaiState(problemDetail.rectConc)}}</p>
  12. <!-- <el-input v-model="problemDetail.inspPblmsName"></el-input> -->
  13. </el-form-item>
  14. <!--<el-form-item label="检查项目:">-->
  15. <!--<p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);">{{problemDetail.checkPoint}}</p>-->
  16. <!--&lt;!&ndash; <el-input v-model="problemDetail.checkPoint"></el-input> &ndash;&gt;-->
  17. <!--</el-form-item>-->
  18. <!--<el-form-item label="审核状态:">-->
  19. <!--<p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);">{{shenheState(problemDetail.chkState)}}</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.inspPblmDesc}}</p>
  23. </el-form-item>
  24. <el-form-item label="整改时间:">
  25. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);">{{timestampToTime(problemDetail.rectTm)}}</p>
  26. </el-form-item>
  27. <el-form-item label="备注描述:">
  28. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);;">{{problemDetail.rectNote}}</p>
  29. <!-- <el-input v-model="problemDetail.note"></el-input> -->
  30. </el-form-item>
  31. <el-form-item label="上报人:">
  32. <p style="font-weight: bold;border-bottom:1px dashed rgb(198, 226, 255);;">{{problemDetail.persName}}</p>
  33. <!-- <el-input v-model="problemDetail.persName"></el-input> -->
  34. </el-form-item>
  35. </el-form>
  36. </div>
  37. <div :style="{'height':testHeight+'px',}" style="width:50%;float:left;border:1px solid #d5d5ff;">
  38. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
  39. <el-tabs style="overflow-y: auto;margin:5px;" :style="{'max-height':testHeight-40 +'px',}">
  40. <el-tab-pane :label="picturetabName" style="height: 350px;">
  41. <el-carousel :interval="4000" height="350px">
  42. <el-carousel-item v-for="(item,index) in pictureArray" :key="index" >
  43. <a :href="`${hostUrl}/${item.filePath}`" target="_blank">
  44. <img style="height:100%;" :src="`${hostUrl}/${item.filePath}`" alt>
  45. </a>
  46. </el-carousel-item>
  47. <el-carousel-item v-if="pictureArray.length==0">
  48. <p>暂无图片信息</p>
  49. </el-carousel-item>
  50. </el-carousel>
  51. </el-tab-pane>
  52. <el-tab-pane :label="audiotabName">
  53. <elaudio v-for="(audio,index) in audioArray" style="margin-left:15%" :key="index" :theUrl="`${hostUrl}/${audio.filePath}`"></elaudio>
  54. <p v-if="audioArray.length==0">暂无音频信息</p>
  55. </el-tab-pane>
  56. <el-tab-pane :label="videotabName">
  57. <el-carousel :interval="4000" height="350px">
  58. <el-carousel-item v-for="(item,index) in videoArray" :key="index" >
  59. <video-player class="vjs-custom-skin"
  60. ref="videoPlayer"
  61. :options="item"
  62. :playsinline="true"
  63. >
  64. </video-player>
  65. </el-carousel-item>
  66. <el-carousel-item v-if="videoArray.length==0">
  67. <p>暂无视频信息</p>
  68. </el-carousel-item>
  69. </el-carousel>
  70. </el-tab-pane>
  71. <el-tab-pane :label="filetabName">
  72. <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
  73. <el-table-column header-align="center" align="center" label="文档">
  74. <template slot-scope="scope">
  75. <p>
  76. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank" rel="noopener noreferrer">
  77. {{scope.row.fileName}}
  78. </a>
  79. </p>
  80. </template>
  81. </el-table-column>
  82. </el-table>
  83. </el-tab-pane>
  84. </el-tabs>
  85. </div>
  86. </div>
  87. </template>
  88. <script>
  89. import request from "@util/gw_ajax_request";
  90. import { hostUrl } from "@util/global_variable.js";
  91. export default {
  92. props: ['problemId','rowId','objType'],
  93. components: {
  94. elaudio: resolve => {
  95. require(["../../widgets/elAudio.vue"], resolve);
  96. },
  97. },
  98. data() {
  99. return {
  100. testHeight: window.innerHeight * 0.48,
  101. activeName: "0",
  102. superviseinspect: {},
  103. fileList: [],
  104. groupingList: [],
  105. fileListloading: false,
  106. groupListloading: false,
  107. problemDetail:{
  108. rectConc:'',
  109. chkState:'',
  110. inspPblmDesc:'',
  111. rectTm:'',
  112. rectNote:'',
  113. persName:'',
  114. },
  115. pictureArray:[],
  116. audioArray:[],
  117. videoArray:[],
  118. fileArray: [],
  119. audiotabName: "",
  120. videotabName: "",
  121. picturetabName: "",
  122. filetabName: "",
  123. playerOptions: {
  124. height: '120',
  125. autoplay: true,
  126. muted: true,
  127. language: 'en',
  128. playbackRates: [0.7, 1.0, 1.5, 2.0],
  129. labelName:'',
  130. sources: [{
  131. type: "video/mp4",
  132. // mp4
  133. src: "http://vjs.zencdn.net/v/oceans.mp4",
  134. // webm
  135. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  136. },
  137. {
  138. type: "video/mp4",
  139. // mp4
  140. src: "http://vjs.zencdn.net/v/oceans.mp4",
  141. // webm
  142. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  143. },
  144. {
  145. type: "video/mp4",
  146. // mp4
  147. src: "http://vjs.zencdn.net/v/oceans.mp4",
  148. // webm
  149. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  150. },
  151. {
  152. type: "video/mp4",
  153. // mp4
  154. src: "http://vjs.zencdn.net/v/oceans.mp4",
  155. // webm
  156. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  157. }],
  158. },
  159. };
  160. },
  161. computed:{
  162. hostUrl(){
  163. return hostUrl;
  164. },
  165. },
  166. mounted:function(){
  167. this.problemDetail = {};
  168. this.pictureArray = [];
  169. this.audioArray = [];
  170. this.videoArray = [];
  171. this.fileArray = [];
  172. this.showDetails();
  173. },
  174. watch:{
  175. rowId:function(){
  176. this.problemDetail = {};
  177. this.pictureArray = [];
  178. this.audioArray = [];
  179. this.videoArray = [];
  180. this.fileArray = [];
  181. this.showDetails();
  182. }
  183. },
  184. methods: {
  185. init() {
  186. this.activeName = "0";
  187. },
  188. showDetails() {
  189. request.get(`/bis/insp/rect/pblm/province/${this.rowId}`).then(res => {
  190. this.problemDetail = res.data;
  191. console.log(this.hostUrl);
  192. res.data.gwFiles.forEach(
  193. (item) =>{
  194. if(item.fileExt == 'mp3'||item.fileExt == 'MP3'||item.fileExt == 'm4a'){
  195. this.audioArray.push(item);
  196. }else if(item.fileExt == 'jpg' || item.fileExt == 'JPEG' || item.fileExt == 'jpeg' || item.fileExt == 'JPG' || item.fileExt == 'png' || item.fileExt == 'PNG'){
  197. this.pictureArray.push(item);
  198. }else if(item.fileExt == 'mp4'||item.fileExt == 'MP4'){
  199. this.videoArray.push(
  200. {
  201. height: '350',
  202. autoplay: false,
  203. muted: true,
  204. language: 'en',
  205. playbackRates: [0.7, 1.0, 1.5, 2.0],
  206. sources: [{
  207. type: "video/mp4",
  208. // mp4
  209. src: `${this.hostUrl}/${item.filePath}`,
  210. // webm
  211. // src: "https://cdn.theguardian.tv/webM/2015/07/20/150716YesMen_synd_768k_vp8.webm"
  212. }],
  213. },
  214. );
  215. } else {
  216. this.fileArray.push(item);
  217. }
  218. }
  219. );
  220. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  221. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  222. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  223. this.filetabName = "其它资料(" + this.fileArray.length + ")";
  224. });
  225. },
  226. timestampToTime(detail) {
  227. var date = new Date(detail);
  228. var Y = date.getFullYear() + "-";
  229. var M =
  230. (date.getMonth() + 1 < 10 ?
  231. "0" + (date.getMonth() + 1) :
  232. date.getMonth() + 1) + "-";
  233. var D =
  234. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  235. var h =
  236. (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
  237. var m =
  238. date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  239. return Y + M + D + h + m;
  240. },
  241. zhengGaiState(val){
  242. return val == '0' ? '未反馈' : val == '1' ? '已整改' : val == '2' ? '整改中' : val == '3' ? '不具备整改条件' : ''
  243. },
  244. shenheState(val){
  245. return val == '0' ? '未审核' : val == '1' ? '(市)通过' : val == '2' ? '(市)驳回' : val == '3' ? '(省)销号' : val == '4' ? '(省)待复查' : val == '5' ? '(省)驳回' : ''
  246. }
  247. }
  248. };
  249. </script>
  250. <style scoped>
  251. .name {
  252. background-color: #ebf8ff;
  253. }
  254. .details>>>.el-tabs__content {
  255. height: 360px;
  256. overflow-y: auto;
  257. }
  258. .flexbody>div {
  259. display: flex;
  260. align-items: flex-start;
  261. line-height: 30px;
  262. }
  263. .flexbody div span:first-child {
  264. width: 100px;
  265. flex-shrink: 0;
  266. }
  267. .flexbody div span:first-child {
  268. color: blue;
  269. }
  270. .fileList span {
  271. margin-right: 10px;
  272. cursor: pointer;
  273. }
  274. .fileList span:hover {
  275. color: blueviolet;
  276. }
  277. .el-form-item {
  278. width: 100%;
  279. margin-bottom: 0;
  280. }
  281. </style>