e6cc1046a6bbcd8bef448957a3be8654073a1b54.svn-base 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441
  1. <template>
  2. <el-dialog
  3. width="90%"
  4. class="outerDialog modify_problem_dialog"
  5. title="查看稽察问题"
  6. @close="closeModal"
  7. :close-on-click-modal="false"
  8. :visible.sync="changeSupervisionVisible">
  9. <div id="eventDetailBody" style="padding: 3px;" :style="{'height':testHeight+'px',}">
  10. <div :style="{'height':testHeight+'px',}" style="width:46%;float:left;border:1px solid #d5d5ff;margin-right:5px;">
  11. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">基本信息</p>
  12. <el-form label-position="right" label-width="130px" :style="{'max-height':testHeight-30+'px',}"
  13. style="overflow-y: auto;height:100%;margin:5px;" :model="changeSupervision">
  14. <el-form-item label="问题描述">
  15. <p class="item_content">{{changeSupervision.pblmsDesc}}</p>
  16. </el-form-item>
  17. <el-form-item label="法规条款:">
  18. <p class="item_content">{{changeSupervision.relativeLaw}}</p>
  19. </el-form-item>
  20. <el-form-item label="法规内容:">
  21. <p class="item_content">{{changeSupervision.lawContent}}</p>
  22. </el-form-item>
  23. <el-form-item label="备注:">
  24. <p class="item_content">{{changeSupervision.note}}</p>
  25. </el-form-item>
  26. <div v-for="(unit,index) in unitArray" :key="index">
  27. <el-form-item label="单位性质">
  28. <p class="item_content">{{unit.subName}}</p>
  29. </el-form-item>
  30. <el-form-item label="单位名称">
  31. <p class="item_content">{{unit.unitNm}}</p>
  32. </el-form-item>
  33. </div>
  34. <el-form-item label="排序序号:">
  35. <p class="item_content">{{changeSupervision.sn}}</p>
  36. </el-form-item>
  37. <el-form-item label="发现问题:">
  38. <p class="item_content">{{changeSupervision.pblmNm}}</p>
  39. </el-form-item>
  40. <el-form-item label="问题分类:">
  41. <p class="item_content">{{changeSupervision.pblmTypeDesc}}</p>
  42. </el-form-item>
  43. <el-form-item label="问题阐述:">
  44. <p class="item_content">{{changeSupervision.pblmDesc}}</p>
  45. </el-form-item>
  46. <el-form-item label="问题严重性:">
  47. <p class="item_content">{{changeSupervision.pblmPasi | pblmPasi}}</p>
  48. </el-form-item>
  49. <el-form-item label="是否为典型问题:">
  50. <span v-if="changeSupervision.ifCasePblm == 1">典型</span>
  51. <span v-if="changeSupervision.ifCasePblm == 0">非典型</span>
  52. </el-form-item>
  53. <el-form-item label="主要原因分析:">
  54. <p class="item_content">{{changeSupervision.pblmReason}}</p>
  55. </el-form-item>
  56. <el-form-item label="整改意见及建议:">
  57. <p class="item_content">{{changeSupervision.pblmSggtn}}</p>
  58. </el-form-item>
  59. <el-form-item label="稽察组长复核意见:">
  60. <p class="item_content">{{changeSupervision.spclRvwOptn}}</p>
  61. </el-form-item>
  62. </el-form>
  63. </div>
  64. <div :style="{'height':testHeight+'px',}" style="width:50%;float:left;border:1px solid #d5d5ff;">
  65. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
  66. <el-tabs style="overflow-y: auto;margin:5px;" :style="{'max-height':testHeight-40 +'px',}">
  67. <el-tab-pane :label="picturetabName" style="height: 350px;">
  68. <el-carousel :interval="4000" height="350px">
  69. <el-carousel-item v-for="(item,index) in pictureArray" :key="index">
  70. <a :href="`${hostUrl}/${item.filePath}`" target="_blank">
  71. <img style="height:100%;" :src="`${hostUrl}/${item.filePath}`" alt>
  72. </a>
  73. </el-carousel-item>
  74. <el-carousel-item v-if="pictureArray.length==0">
  75. <p>暂无图片信息</p>
  76. </el-carousel-item>
  77. </el-carousel>
  78. </el-tab-pane>
  79. <el-tab-pane :label="audiotabName">
  80. <elaudio v-for="(audio,index) in audioArray" style="margin-left:15%"
  81. :theUrl="`${hostUrl}/${audio.filePath}`" :key="index"></elaudio>
  82. <p v-if="audioArray.length==0">暂无音频信息</p>
  83. </el-tab-pane>
  84. <el-tab-pane :label="videotabName">
  85. <el-carousel :interval="4000" height="350px">
  86. <el-carousel-item v-for="(item,index) in videoArray" :key="index">
  87. <video-player class="vjs-custom-skin"
  88. ref="videoPlayer"
  89. :options="item"
  90. :playsinline="true"
  91. >
  92. </video-player>
  93. </el-carousel-item>
  94. <el-carousel-item v-if="videoArray.length==0">
  95. <p>暂无视频信息</p>
  96. </el-carousel-item>
  97. </el-carousel>
  98. </el-tab-pane>
  99. <el-tab-pane :label="filetabName">
  100. <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
  101. <el-table-column header-align="center" align="center" label="文档">
  102. <template slot-scope="scope">
  103. <p>
  104. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank" rel="noopener noreferrer">
  105. {{scope.row.fileName}}
  106. </a>
  107. </p>
  108. </template>
  109. </el-table-column>
  110. </el-table>
  111. </el-tab-pane>
  112. </el-tabs>
  113. </div>
  114. </div>
  115. </el-dialog>
  116. </template>
  117. <script>
  118. import draggable from "vuedraggable";
  119. import {updatelist, deleteFileById} from "@api/duChaAPI.js";
  120. import {
  121. showDetailsXq,
  122. getProblemNatureApi,
  123. getSelectProblemList,
  124. getUnitNameListApi,
  125. getProblemDxListApi
  126. } from "@api/InspectionReport.js";
  127. import request from "@util/gw_ajax_request.js";
  128. import elaudio from "@widget/elAudioShort.vue";
  129. import { hostUrl } from "@util/global_variable.js";
  130. export default {
  131. props: ['problemId', 'pertype', 'listType'],
  132. data() {
  133. return {
  134. testHeight: window.innerHeight - 200,
  135. changeSupervisionVisible: true,
  136. changeSupervisionLoading: false,
  137. changeSupervision: {},
  138. supervision: [
  139. {
  140. value: "1",
  141. label: "是"
  142. },
  143. {
  144. value: "0",
  145. label: "否"
  146. }
  147. ],
  148. addPicPanel: false,
  149. gwComFileList: [],
  150. picturetabName: "",
  151. audiotabName: "",
  152. videotabName: "",
  153. filetabName: "",
  154. pictureArray: [],
  155. audioArray: [],
  156. videoArray: [],
  157. fileArray: [],
  158. updateIdXiuGai: "",
  159. pblmId: "",
  160. //稽察添加问题用到的参数
  161. keyword: '',
  162. problemList: [],
  163. problemInfo: {},
  164. gwComFileList: [],
  165. cateObjList: [],//严重程度列表
  166. objSubjectList: [], //单位性质列表
  167. unitNameList: [], //单位名称列表
  168. unitArray: [
  169. {
  170. unitNm: '',
  171. subId: ''
  172. }
  173. ],
  174. //为稽察组长时禁用
  175. disabled: false,
  176. dialogImageUrl: '',
  177. previewDialogVisible: false,
  178. rotateDeg: {'transform': 'rotate(0deg)'},
  179. editPicDialog: false,
  180. editPicRefresh: true,
  181. picUrl: "",
  182. picId: "",
  183. problemDxList: [], //问题分类列表
  184. relCode: '',
  185. }
  186. },
  187. components: {
  188. elaudio: elaudio,
  189. draggable,
  190. upload: resolve => {
  191. require(["@widget/uploadFileWithPic.vue"], resolve);
  192. },
  193. EditPicOnline: resolve => {
  194. require(["@widget/EditPicOnline/EditPicOnline.vue"], resolve);
  195. },
  196. },
  197. computed: {
  198. hostUrl() {
  199. return hostUrl
  200. },
  201. persId() {
  202. return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
  203. }
  204. },
  205. mounted() {
  206. this.changeSup(this.problemId)
  207. },
  208. methods: {
  209. editPicEvent(item) {
  210. this.picUrl = this.hostUrl + "/" + item.filePath;
  211. this.editPicDialog = true;
  212. this.editPicRefresh = false;
  213. this.picId = item.id;
  214. },
  215. cancelHandler() {
  216. this.editPicDialog = false;
  217. this.editPicRefresh = true;
  218. },
  219. editPicDataEvent(item) {
  220. request.post(`/file/updateFile?bizId=${this.changeSupervision.pblmId}&id=${this.picId}`, item, {headers: {'Content-Type': 'multipart/form-data'}}).then(res => {
  221. console.log(res);
  222. if (res.success) {
  223. this.pictureArray = [];
  224. showDetailsXq(this.updateIdXiuGai).then(res => {
  225. res.data.gwComFileList.forEach(item => {
  226. this.pictureArray.push(item);
  227. this.editPicDialog = false;
  228. this.editPicRefresh = true;
  229. this.$message.success('修改成功');
  230. });
  231. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  232. });
  233. }
  234. });
  235. },
  236. // 修改弹窗显示
  237. changeSup(id) {
  238. this.pictureArray = [];
  239. this.audioArray = [];
  240. this.videoArray = [];
  241. this.fileArray = [];
  242. this.updateIdXiuGai = id;
  243. let _this = this
  244. showDetailsXq(this.updateIdXiuGai).then(res => {
  245. // if(this.usersId==)
  246. this.changeSupervision = res.data;
  247. this.keyword = this.changeSupervision.tacObjPblmstb ? this.changeSupervision.tacObjPblmstb.id : ''
  248. if (this.changeSupervision.pblmSubjectList) {
  249. this.unitArray = this.changeSupervision.pblmSubjectList
  250. }
  251. if (this.changeSupervision.tacObjPblmstb) {
  252. this.objSubjectList = this.changeSupervision.tacObjPblmstb.objSubjectList
  253. this.cateObjList = this.changeSupervision.tacObjPblmstb.cateObjList
  254. this.changeSupervision.pblmsDesc = this.changeSupervision.tacObjPblmstb.pblmsDesc
  255. this.changeSupervision.relativeLaw = this.changeSupervision.tacObjPblmstb.relativeLaw
  256. this.changeSupervision.lawContent = this.changeSupervision.tacObjPblmstb.lawContent
  257. this.changeSupervision.note = this.changeSupervision.tacObjPblmstb.note
  258. }
  259. this.changeSupervision.pblmQlttvCd = this.changeSupervision.pblmQlttvCd.toString()
  260. this.relCode = this.changeSupervision.pblmNm.substr(0, 3)
  261. if (this.unitArray.length) {
  262. this.unitArray.forEach((ele, index) => {
  263. _this.getUnitNameList(index)
  264. })
  265. }
  266. res.data.gwComFileList.forEach(item => {
  267. if (
  268. item.fileExt == "mp3" ||
  269. item.fileExt == "MP3" ||
  270. item.fileExt == "m4a"
  271. ) {
  272. this.audioArray.push(item);
  273. } else if (
  274. item.fileExt == "jpg" ||
  275. item.fileExt == "JPG" ||
  276. item.fileExt == "png" ||
  277. item.fileExt == "PNG" ||
  278. item.fileExt == "JPEG" ||
  279. item.fileExt == "jpeg"
  280. ) {
  281. this.pictureArray.push(item);
  282. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  283. this.videoArray.push({
  284. id:item.id,
  285. width: "130",
  286. height: "130",
  287. autoplay: false,
  288. muted: true,
  289. language: "en",
  290. playbackRates: [0.7, 1.0, 1.5, 2.0],
  291. sources: [
  292. {
  293. type: "video/mp4",
  294. src: this.hostUrl + item.filePath
  295. }
  296. ],
  297. id: item.id
  298. });
  299. } else {
  300. this.fileArray.push(item);
  301. }
  302. });
  303. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  304. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  305. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  306. this.filetabName = "其它资料(" + this.fileArray.length + ")";
  307. });
  308. },
  309. unitSelect() {
  310. let _this = this
  311. let unitIds = []
  312. this.unitArray.forEach((ele, index) => {
  313. _this.unitNameList.forEach(element => {
  314. if (ele.unitNm == element.sysNm) {
  315. this.unitArray[index].unitId = element.id
  316. }
  317. })
  318. unitIds.push(ele.unitId)
  319. })
  320. // this.changeSupervision.subjectIds = unitIds.join(',')
  321. },
  322. getUnitNameList(index) {
  323. let subId = this.unitArray[index].subId ? this.unitArray[index].subId : ''
  324. let paramsObj = {
  325. rgstrId: this.changeSupervision.rgstrId,
  326. sysType: subId
  327. }
  328. if (subId) {
  329. getUnitNameListApi(paramsObj).then(res => {
  330. if (res.success) {
  331. this.unitNameList = res.data
  332. } else {
  333. this.$message.error(res.message)
  334. }
  335. }).catch(err => {
  336. this.$message.error(err)
  337. })
  338. }
  339. },
  340. natureChange(val, index) {
  341. this.unitArray.forEach((ele, index) => {
  342. this.objSubjectList.forEach(element => {
  343. if (ele.subId == element.id) {
  344. this.unitArray[index].subName = element.subName
  345. }
  346. })
  347. })
  348. let subIds = []
  349. this.unitArray.forEach((ele, index) => {
  350. subIds.push(ele.subId)
  351. })
  352. this.changeSupervision.subjectIds = subIds.join(',')
  353. this.getUnitNameList(index)
  354. },
  355. dragChange(val) {
  356. console.log(val)
  357. console.log(this.pictureArray)
  358. let gwComFileList = []
  359. gwComFileList = gwComFileList.concat(this.pictureArray).concat(this.audioArray).concat(this.videoArray).concat(this.fileArray)
  360. this.changeSupervision.gwComFileList = gwComFileList
  361. console.log(this.changeSupervision.gwComFileList)
  362. },
  363. previewFile(url) {
  364. this.dialogImageUrl = `${this.hostUrl}/${url}`
  365. this.previewDialogVisible = true
  366. },
  367. closeModal() {
  368. this.$emit('dialogClose')
  369. },
  370. },
  371. watch: {
  372. problemId(val) {
  373. this.changeSup(val)
  374. }
  375. },
  376. filters: {
  377. pblmPasi(val) {
  378. if (val == 0) {
  379. return '一般'
  380. } else if (val == 1) {
  381. return '较重'
  382. } else if (val == 2) {
  383. return '严重'
  384. } else {
  385. return val
  386. }
  387. }
  388. }
  389. }
  390. </script>
  391. <style scoped>
  392. .name {
  393. background-color: #ebf8ff;
  394. }
  395. .item_content {
  396. min-height: 24px;
  397. font-weight: bold;
  398. border-bottom: 1px dashed rgb(198, 226, 255);
  399. }
  400. .details >>> .el-tabs__content {
  401. height: 360px;
  402. overflow-y: auto;
  403. }
  404. .flexbody > div {
  405. display: flex;
  406. align-items: flex-start;
  407. line-height: 30px;
  408. }
  409. .flexbody div span:first-child {
  410. width: 100px;
  411. flex-shrink: 0;
  412. }
  413. .flexbody div span:first-child {
  414. color: blue;
  415. }
  416. .fileList span {
  417. margin-right: 10px;
  418. cursor: pointer;
  419. }
  420. .fileList span:hover {
  421. color: blueviolet;
  422. }
  423. .el-form-item {
  424. width: 100%;
  425. margin-bottom: 0;
  426. }
  427. </style>