0dc341d67a6f326f2a38c81e05bcaabcd3c4edda.svn-base 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896
  1. <template>
  2. <div :style="{'height':testHeight+'px','overflow':'auto'}">
  3. <el-form ref="problemForm" :rules="rules" label-width="100px" class="wtzgfc_add_pblm">
  4. <el-steps direction="vertical" :active="3">
  5. <el-step :title="`发现问题(检查资料)-(时间:${rowData.pblmTm?formatDateTime(rowData.pblmTm):''})`">
  6. <template slot="description" >
  7. <div style="width: 100%;">
  8. <el-card>
  9. <el-form-item label="注册登记号:" style="text-align:left">
  10. <p style="color:#606266;">{{rowData.damRegCode}}</p>
  11. </el-form-item>
  12. <el-form-item label="问题类别:" style="text-align:left">
  13. <p style="color:#606266;">{{rowData.pblmNameBz}}</p>
  14. </el-form-item>
  15. <el-form-item label="检查项目:" style="text-align:left">
  16. <p style="color:#606266;">{{rowData.checkPointBz}}</p>
  17. </el-form-item>
  18. <el-form-item label="问题描述:" style="text-align:left">
  19. <p style="color:#606266;">{{rowData.pblmDescBz}}</p>
  20. </el-form-item>
  21. <el-form-item label="严重程度:" style="text-align:left">
  22. <p style="color:#606266;">{{rowData.inspPblmCate == 0 ? "一般" : rowData.inspPblmCate == 1 ? "较重" : rowData.inspPblmCate == 2 ? "严重" : rowData.inspPblmCate == 3 ? "特别严重" : ""}}</p>
  23. </el-form-item>
  24. </el-card>
  25. <el-tabs type="border-card">
  26. <el-tab-pane :label="picturetabName2">
  27. <el-row>
  28. <el-carousel :interval="4000" style="height:100%;" id="imgView2">
  29. <el-carousel-item v-for="(item,index) in pictureArray2" :key="index" >
  30. <img style="width:100%;height:100%;" :src="`${hostUrl}/${item.filePath}`" alt>
  31. <div class="image-preview-action" v-if="!ifView && isEdit">
  32. <i @click="removeFile(item.id)" class="el-icon-delete"></i>
  33. </div>
  34. </el-carousel-item>
  35. <el-carousel-item v-if="pictureArray2.length==0" style="display: flex;justify-content: center;align-items: center">
  36. <p>暂无图片信息</p>
  37. </el-carousel-item>
  38. </el-carousel>
  39. </el-row>
  40. </el-tab-pane>
  41. <el-tab-pane :label="audiotabName2">
  42. <el-table border :data="audioArray2" style="width: 100%;margin: 0 auto;">
  43. <el-table-column header-align="center" align="center" label="音频" show-overflow-tooltip>
  44. <template slot-scope="scope">
  45. <elaudio
  46. style="margin-left:15%;width:100px;height:30px;"
  47. :theUrl="`${hostUrl}/${scope.row.filePath}`"
  48. ></elaudio>
  49. </template>
  50. </el-table-column>
  51. </el-table>
  52. </el-tab-pane>
  53. <el-tab-pane :label="videotabName2">
  54. <el-table border :data="videoArray2" style="width: 100%;margin: 0 auto;">
  55. <el-table-column header-align="center" align="center" label="视频" show-overflow-tooltip>
  56. <template slot-scope="scope">
  57. <video-player
  58. class="vjs-custom-skin"
  59. ref="videoPlayer"
  60. :options="scope.row"
  61. :playsinline="true"
  62. ></video-player>
  63. </template>
  64. </el-table-column>
  65. </el-table>
  66. </el-tab-pane>
  67. <el-tab-pane :label="filetabName2">
  68. <el-table border :data="fileArray2" style="width: 100%;margin: 0 auto;">
  69. <el-table-column header-align="center" align="center" label="文档" show-overflow-tooltip>
  70. <template slot-scope="scope">
  71. <p>
  72. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank"
  73. rel="noopener noreferrer">
  74. {{scope.row.fileName}}
  75. </a>
  76. </p>
  77. </template>
  78. </el-table-column>
  79. </el-table>
  80. </el-tab-pane>
  81. </el-tabs>
  82. </div>
  83. </template>
  84. </el-step>
  85. <el-step :title="`反馈问题(整改资料)-(时间:${rowData.pblmCrtm?formatDateTime(rowData.pblmCrtm):''})`">
  86. <template slot="description" >
  87. <div style="width: 100%;">
  88. <el-card>
  89. <el-form-item label="市县反馈整改状态:" style="text-align:left" label-width="150px">
  90. <p style="color:#606266;">{{(!rowData.crtState || rowData.crtState=='0')?"未整改":rowData.crtState=='1'?"整改中":rowData.crtState=='2'?'整改完成':rowData.crtState=='3'?'不具备整改条件':''}}</p>
  91. </el-form-item>
  92. <el-form-item label="市县反馈整改备注:" style="text-align:left" label-width="150px">
  93. <p style="color:#606266;">{{rowData.crtNote}}</p>
  94. </el-form-item>
  95. </el-card>
  96. <el-tabs type="border-card">
  97. <el-tab-pane :label="picturetabName1">
  98. <el-row>
  99. <el-carousel :interval="4000" style="height:100%;" id="imgView1">
  100. <el-carousel-item v-for="(item,index) in pictureArray1" :key="index" >
  101. <img style="width:100%;height:100%;" :src="`${hostUrl}/${item.filePath}`" alt>
  102. </el-carousel-item>
  103. <el-carousel-item v-if="pictureArray1.length==0" style="display: flex;justify-content: center;align-items: center">
  104. <p>暂无图片信息</p>
  105. </el-carousel-item>
  106. </el-carousel>
  107. </el-row>
  108. </el-tab-pane>
  109. <el-tab-pane :label="audiotabName1">
  110. <el-table border :data="audioArray1" style="width: 100%;margin: 0 auto;">
  111. <el-table-column header-align="center" align="center" label="音频" show-overflow-tooltip>
  112. <template slot-scope="scope">
  113. <elaudio
  114. style="margin-left:15%;width:100px;height:30px;"
  115. :theUrl="`${hostUrl}/${scope.row.filePath}`"
  116. ></elaudio>
  117. </template>
  118. </el-table-column>
  119. </el-table>
  120. </el-tab-pane>
  121. <el-tab-pane :label="videotabName1">
  122. <el-table border :data="videoArray1" style="width: 100%;margin: 0 auto;">
  123. <el-table-column header-align="center" align="center" label="视频" show-overflow-tooltip>
  124. <template slot-scope="scope">
  125. <video-player
  126. class="vjs-custom-skin"
  127. ref="videoPlayer"
  128. :options="scope.row"
  129. :playsinline="true"
  130. ></video-player>
  131. </template>
  132. </el-table-column>
  133. </el-table>
  134. </el-tab-pane>
  135. <el-tab-pane :label="filetabName1">
  136. <el-table border :data="fileArray1" style="width: 100%;margin: 0 auto;">
  137. <el-table-column header-align="center" align="center" label="文档" show-overflow-tooltip>
  138. <template slot-scope="scope">
  139. <p>
  140. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank"
  141. rel="noopener noreferrer">
  142. {{scope.row.fileName}}
  143. </a>
  144. </p>
  145. </template>
  146. </el-table-column>
  147. </el-table>
  148. </el-tab-pane>
  149. </el-tabs>
  150. </div>
  151. </template>
  152. </el-step>
  153. <el-step :title="`复核问题(复核资料)-(时间:${rowData.reviewTm?formatDateTime(rowData.reviewTm):''})`">
  154. <template slot="description" >
  155. <div style="width: 100%;position: relative;">
  156. <el-card>
  157. <el-form-item label="复核结果:" style="text-align:left">
  158. <p style="color:#606266;" v-if="ifView || !isEdit">{{rowData.reviewResult == "1"?"未整改":rowData.reviewResult == "2"?"正在整改":rowData.reviewResult == "3"?"整改完成":rowData.reviewResult == "4"?"整改不到位":rowData.reviewResult == "5"?"上报整改情况与实际不符":""}}</p>
  159. <el-radio-group v-model="rowData.reviewResult" style="width: 100%;line-height: 28px!important;" v-else>
  160. <el-radio label="1">未整改</el-radio>
  161. <el-radio label="2">正在整改</el-radio>
  162. <el-radio label="3">整改完成</el-radio>
  163. <el-radio label="4">整改不到位</el-radio>
  164. <el-radio label="5">上报整改情况与实际不符</el-radio>
  165. </el-radio-group>
  166. </el-form-item>
  167. <el-form-item label="复核说明" style="text-align:left">
  168. <p style="color:#606266;" v-if="ifView || !isEdit">{{rowData.reviewNote}}</p>
  169. <el-input
  170. v-else
  171. type="textarea"
  172. :rows="4"
  173. style="width: 100%;"
  174. placeholder="请输入复核说明"
  175. v-model="rowData.reviewNote"
  176. class="w30">
  177. </el-input>
  178. </el-form-item>
  179. </el-card>
  180. <span style="text-align:right;position: absolute;right:5px;z-index: 1000;bottom:165px;" v-if="!ifView && isEdit">
  181. <el-button
  182. :v-if="!addPicPanel?addPicPanel:addPicPanel"
  183. size="mini"
  184. type="text"
  185. :icon="!addPicPanel?'el-icon-circle-plus-outline':'el-icon-circle-close-outline'"
  186. @click="addPic"
  187. >{{!addPicPanel?"添加":"取消"}}
  188. </el-button>
  189. </span>
  190. <el-row v-show="addPicPanel"> <!-- v-if="addPicPanel" -->
  191. <upload
  192. ref="uploadFile"
  193. :url="`/pdcApi/file/insert?bizType=MEND_CHECK_SC&bizId=`"
  194. @uploadOver="removeNewSupervision"
  195. ></upload>
  196. </el-row>
  197. <el-tabs type="border-card">
  198. <el-tab-pane :label="picturetabName">
  199. <el-row>
  200. <el-carousel :interval="4000" style="height:100%;" id="imgView">
  201. <el-carousel-item v-for="(item,index) in pictureArray" :key="index" >
  202. <img style="width:100%;height:100%;" :src="`${hostUrl}/${item.filePath}`" alt>
  203. <div class="image-preview-action" v-if="!ifView && isEdit">
  204. <i @click="removeFile(item.id)" class="el-icon-delete"></i>
  205. </div>
  206. </el-carousel-item>
  207. <el-carousel-item v-if="pictureArray.length==0" style="display: flex;justify-content: center;align-items: center">
  208. <p>暂无图片信息</p>
  209. </el-carousel-item>
  210. </el-carousel>
  211. </el-row>
  212. </el-tab-pane>
  213. <el-tab-pane :label="audiotabName">
  214. <el-table border :data="audioArray" style="width: 100%;margin: 0 auto;">
  215. <el-table-column header-align="center" align="center" label="音频" show-overflow-tooltip>
  216. <template slot-scope="scope">
  217. <elaudio
  218. style="margin-left:15%;width:100px;height:30px;"
  219. :theUrl="`${hostUrl}/${scope.row.filePath}`"
  220. ></elaudio>
  221. </template>
  222. </el-table-column>
  223. <el-table-column header-align="center" align="center" label="操作" v-if="!ifView && isEdit">
  224. <template slot-scope="scope">
  225. <el-button
  226. size="mini"
  227. @click="removeFile(scope.row.id,scope.$index)"
  228. type="danger"
  229. >删除
  230. </el-button>
  231. </template>
  232. </el-table-column>
  233. </el-table>
  234. </el-tab-pane>
  235. <el-tab-pane :label="videotabName">
  236. <el-table border :data="videoArray" style="width: 100%;margin: 0 auto;">
  237. <el-table-column header-align="center" align="center" label="视频" show-overflow-tooltip>
  238. <template slot-scope="scope">
  239. <video-player
  240. class="vjs-custom-skin"
  241. ref="videoPlayer"
  242. :options="scope.row"
  243. :playsinline="true"
  244. ></video-player>
  245. </template>
  246. </el-table-column>
  247. <el-table-column header-align="center" align="center" label="操作" v-if="!ifView && isEdit">
  248. <template slot-scope="scope">
  249. <el-button
  250. size="mini"
  251. @click="removeFile(scope.row.id,scope.$index)"
  252. type="danger"
  253. >删除
  254. </el-button>
  255. </template>
  256. </el-table-column>
  257. </el-table>
  258. </el-tab-pane>
  259. <el-tab-pane :label="filetabName">
  260. <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
  261. <el-table-column header-align="center" align="center" label="文档" show-overflow-tooltip>
  262. <template slot-scope="scope">
  263. <p>
  264. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank"
  265. rel="noopener noreferrer">
  266. {{scope.row.fileName}}
  267. </a>
  268. </p>
  269. </template>
  270. </el-table-column>
  271. <el-table-column header-align="center" align="center" label="操作" v-if="!ifView && isEdit">
  272. <template slot-scope="scope">
  273. <el-button
  274. size="mini"
  275. @click="removeFile(scope.row.id,scope.$index)"
  276. type="danger"
  277. >删除
  278. </el-button>
  279. </template>
  280. </el-table-column>
  281. </el-table>
  282. </el-tab-pane>
  283. </el-tabs>
  284. </div>
  285. </template>
  286. </el-step>
  287. </el-steps>
  288. </el-form>
  289. <span slot="footer" style="line-height: 50px;text-align: center;display: block">
  290. <el-button type="primary" @click="problemDetailInfo('problemDetail')" :loading="buttonLoading" v-if="!ifView && isEdit">保存</el-button>
  291. <el-button @click="cancelHandler">取消</el-button>
  292. </span>
  293. </div>
  294. </template>
  295. <script>
  296. import {formatDateTime2,formatDateTime2New} from '../../../utils/gw_date.js'
  297. import request from '@util/gw_ajax_request'
  298. import {deleteFileById} from "@api/duChaAPI.js";
  299. import {hostUrl} from "@util/global_variable.js";
  300. import pblmMendFile from "../shuiku/shuiku2021/pblmMendFile";
  301. import Viewer from 'viewerjs';
  302. import 'viewerjs/dist/viewer.css';
  303. export default {
  304. props: ["details", 'problemId', 'objType', 'ifView','rowData','isEdit'],
  305. components: {
  306. upload: resolve => {
  307. require(["@widget/uploadFile.vue"], resolve);
  308. },
  309. elaudio: resolve => {
  310. require(["../../../widgets/elAudio.vue"], resolve);
  311. },
  312. pblmMendFile:pblmMendFile
  313. },
  314. data() {
  315. return {
  316. taskInstId:"",
  317. bizType:"",
  318. jqmmDialogShow:false,
  319. testHeight: window.innerHeight - 220,
  320. activeName: "0",
  321. superviseinspect: {},
  322. fileList: [],
  323. groupingList: [],
  324. fileListloading: false,
  325. groupListloading: false,
  326. problemDetail: {
  327. pblmDesc: '',//问题描述 ,
  328. pblmLevl: '',//问题等级 ,
  329. pblmOption: '',//检查项目 ,
  330. pblmSn: '',//问题序号 ,
  331. pblmType: '',//问题类别 ,
  332. proName: '',//省 ,
  333. realPlanDt: '',//实际/计划整改完成时间 ,
  334. rectConc: '',//整改状态(1:未整改;2:正在整改;3:已整改) ,
  335. rectMsrs: '',//整改措施 ,
  336. revwInfo: '',//复核情况 ,
  337. revwRectConc: '',//复核整改状态(1:未整改;2:正在整改;3:整改完成;4:整改不到位;5:上报整改情况与实际不符) ,
  338. revwRectPblm: '',//复核整改问题 ,
  339. revwState: '',//复核填报状态(0:未填报;1:填报中;2:已填报) ,
  340. rgstrId: '',//登记表ID ,
  341. rsCode: '',//水库编码 ,
  342. rsName: '',//水库名称 ,
  343. safeComment: '',//工况总体评价 ,
  344. unit: '',//管理单位 ,
  345. uptm: '',//修改时间 ,
  346. year: '',//年度
  347. gwComFiles: []
  348. },
  349. rules: {
  350. revwRectPblm: [{
  351. required: true,
  352. message: '请填写备注',
  353. trigger: 'blur'
  354. }],
  355. },
  356. pictureArray: [],
  357. audioArray: [],
  358. videoArray: [],
  359. fileArray: [],
  360. audiotabName: "",
  361. videotabName: "",
  362. picturetabName: "",
  363. filetabName: "",
  364. pictureArray1: [],
  365. audioArray1: [],
  366. videoArray1: [],
  367. fileArray1: [],
  368. audiotabName1: "",
  369. videotabName1: "",
  370. picturetabName1: "",
  371. filetabName1: "",
  372. pictureArray2: [],
  373. audioArray2: [],
  374. videoArray2: [],
  375. fileArray2: [],
  376. audiotabName2: "",
  377. videotabName2: "",
  378. picturetabName2: "",
  379. filetabName2: "",
  380. buttonLoading: false,
  381. supervisionDetailsVisible: true,
  382. addPicPanel: false,
  383. gwComFiles: []
  384. };
  385. },
  386. computed: {
  387. hostUrl() {
  388. return hostUrl
  389. },
  390. formatDateTime(){
  391. return formatDateTime2New
  392. }
  393. },
  394. mounted: function () {
  395. this.getPicArray();
  396. this.getPicArray_1();
  397. this.getPicArray_2();
  398. },
  399. methods: {
  400. jqmmDialogClose() {
  401. this.jqmmDialogShow = false;
  402. },
  403. showFile(type){
  404. this.jqmmDialogShow = true;
  405. this.bizType = type;
  406. },
  407. getPicArray() {
  408. var params = {
  409. bizId:this.rowData.id,
  410. bizType:"MEND_CHECK_SC"
  411. }
  412. this.pictureArray = [];
  413. this.audioArray = [];
  414. this.videoArray = [];
  415. this.fileArray = [];
  416. this.filetabName = this.fileArray.length ? "其他资料(" + this.fileArray.length + ")" : "其他资料";
  417. this.picturetabName = this.pictureArray.length ? "图片资料(" + this.pictureArray.length + ")" : "图片资料";
  418. this.audiotabName = this.audioArray.length ? "音频资料(" + this.audioArray.length + ")" : "音频资料";
  419. this.videotabName = this.videoArray.length ? "视频资料(" + this.videoArray.length + ")" : "视频资料";
  420. if(!this.rowData.id){
  421. return false;
  422. }
  423. var _this = this;
  424. request.post(`/file/findAllFile`,params).then(res => {
  425. if (res.success) {
  426. res.data.forEach(item => {
  427. if (
  428. item.fileExt == "jpg" ||
  429. item.fileExt == "JPG" ||
  430. item.fileExt == "png" ||
  431. item.fileExt == "PNG" ||
  432. item.fileExt == "JPEG" ||
  433. item.fileExt == "jpeg"
  434. ) {
  435. this.pictureArray.push(item);
  436. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  437. this.videoArray.push({
  438. height: "320",
  439. width: "500",
  440. id: item.id,
  441. bizId: item.bizId,
  442. autoplay: false,
  443. muted: true,
  444. language: "en",
  445. playbackRates: [0.7, 1.0, 1.5, 2.0],
  446. sources: [
  447. {
  448. type: "video/mp4",
  449. src: this.hostUrl + item.filePath
  450. }
  451. ]
  452. });
  453. }else if (
  454. item.fileExt == "mp3" ||
  455. item.fileExt == "MP3" ||
  456. item.fileExt == "m4a"
  457. ) {
  458. this.audioArray.push(item);
  459. }else{
  460. this.fileArray.push(item);
  461. }
  462. });
  463. _this.$nextTick(function(){
  464. var ViewerDom = document.getElementById('imgView');
  465. var viewer = new Viewer(ViewerDom, {})
  466. });
  467. this.filetabName = this.fileArray.length ? "其他资料(" + this.fileArray.length + ")" : "其他资料";
  468. this.picturetabName = this.pictureArray.length ? "图片资料(" + this.pictureArray.length + ")" : "图片资料";
  469. this.audiotabName = this.audioArray.length ? "音频资料(" + this.audioArray.length + ")" : "音频资料";
  470. this.videotabName = this.videoArray.length ? "视频资料(" + this.videoArray.length + ")" : "视频资料";
  471. }
  472. })
  473. },
  474. getPicArray_1() {
  475. var params = {
  476. bizId:this.rowData.id,
  477. bizType:"rectification"
  478. }
  479. this.pictureArray1 = [];
  480. this.audioArray1 = [];
  481. this.videoArray1 = [];
  482. this.fileArray1 = [];
  483. this.filetabName1 = this.fileArray1.length ? "其他资料(" + this.fileArray1.length + ")" : "其他资料";
  484. this.picturetabName1 = this.pictureArray1.length ? "图片资料(" + this.pictureArray1.length + ")" : "图片资料";
  485. this.audiotabName1 = this.audioArray1.length ? "音频资料(" + this.audioArray1.length + ")" : "音频资料";
  486. this.videotabName1 = this.videoArray1.length ? "视频资料(" + this.videoArray1.length + ")" : "视频资料";
  487. if(!this.rowData.id){
  488. return false;
  489. }
  490. var _this = this;
  491. request.post(`/file/findAllFile`,params).then(res => {
  492. if (res.success) {
  493. res.data.forEach(item => {
  494. if (
  495. item.fileExt == "jpg" ||
  496. item.fileExt == "JPG" ||
  497. item.fileExt == "png" ||
  498. item.fileExt == "PNG" ||
  499. item.fileExt == "JPEG" ||
  500. item.fileExt == "jpeg"
  501. ) {
  502. this.pictureArray1.push(item);
  503. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  504. this.videoArray1.push({
  505. height: "320",
  506. width: "500",
  507. id: item.id,
  508. bizId: item.bizId,
  509. autoplay: false,
  510. muted: true,
  511. language: "en",
  512. playbackRates: [0.7, 1.0, 1.5, 2.0],
  513. sources: [
  514. {
  515. type: "video/mp4",
  516. src: this.hostUrl + item.filePath
  517. }
  518. ]
  519. });
  520. }else if (
  521. item.fileExt == "mp3" ||
  522. item.fileExt == "MP3" ||
  523. item.fileExt == "m4a"
  524. ) {
  525. this.audioArray1.push(item);
  526. }else{
  527. this.fileArray1.push(item);
  528. }
  529. });
  530. _this.$nextTick(function(){
  531. var ViewerDom = document.getElementById('imgView1');
  532. var viewer = new Viewer(ViewerDom, {})
  533. });
  534. this.filetabName1 = this.fileArray1.length ? "其他资料(" + this.fileArray1.length + ")" : "其他资料";
  535. this.picturetabName1 = this.pictureArray1.length ? "图片资料(" + this.pictureArray1.length + ")" : "图片资料";
  536. this.audiotabName1 = this.audioArray1.length ? "音频资料(" + this.audioArray1.length + ")" : "音频资料";
  537. this.videotabName1 = this.videoArray1.length ? "视频资料(" + this.videoArray1.length + ")" : "视频资料";
  538. }
  539. })
  540. },
  541. getPicArray_2() {
  542. var params = {
  543. bizId:this.rowData.pblmId
  544. }
  545. this.pictureArray2 = [];
  546. this.audioArray2 = [];
  547. this.videoArray2 = [];
  548. this.fileArray2 = [];
  549. this.filetabName2 = this.fileArray2.length ? "其他资料(" + this.fileArray2.length + ")" : "其他资料";
  550. this.picturetabName2 = this.pictureArray2.length ? "图片资料(" + this.pictureArray2.length + ")" : "图片资料";
  551. this.audiotabName2 = this.audioArray2.length ? "音频资料(" + this.audioArray2.length + ")" : "音频资料";
  552. this.videotabName2 = this.videoArray2.length ? "视频资料(" + this.videoArray2.length + ")" : "视频资料";
  553. if(!this.rowData.pblmId){
  554. return false;
  555. }
  556. var _this = this;
  557. request.post(`/file/findAllFile`,params).then(res => {
  558. if (res.success) {
  559. res.data.forEach(item => {
  560. if (
  561. item.fileExt == "jpg" ||
  562. item.fileExt == "JPG" ||
  563. item.fileExt == "png" ||
  564. item.fileExt == "PNG" ||
  565. item.fileExt == "JPEG" ||
  566. item.fileExt == "jpeg"
  567. ) {
  568. this.pictureArray2.push(item);
  569. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  570. this.videoArray2.push({
  571. height: "320",
  572. width: "500",
  573. id: item.id,
  574. bizId: item.bizId,
  575. autoplay: false,
  576. muted: true,
  577. language: "en",
  578. playbackRates: [0.7, 1.0, 1.5, 2.0],
  579. sources: [
  580. {
  581. type: "video/mp4",
  582. src: this.hostUrl + item.filePath
  583. }
  584. ]
  585. });
  586. }else if (
  587. item.fileExt == "mp3" ||
  588. item.fileExt == "MP3" ||
  589. item.fileExt == "m4a"
  590. ) {
  591. this.audioArray2.push(item);
  592. }else{
  593. this.fileArray2.push(item);
  594. }
  595. });
  596. _this.$nextTick(function(){
  597. var ViewerDom = document.getElementById('imgView2');
  598. var viewer = new Viewer(ViewerDom, {})
  599. });
  600. this.filetabName2 = this.fileArray2.length ? "其他资料(" + this.fileArray2.length + ")" : "其他资料";
  601. this.picturetabName2 = this.pictureArray2.length ? "图片资料(" + this.pictureArray2.length + ")" : "图片资料";
  602. this.audiotabName2 = this.audioArray2.length ? "音频资料(" + this.audioArray2.length + ")" : "音频资料";
  603. this.videotabName2 = this.videoArray2.length ? "视频资料(" + this.videoArray2.length + ")" : "视频资料";
  604. }
  605. })
  606. },
  607. init() {
  608. this.activeName = "0";
  609. },
  610. // 提交修改信息
  611. problemDetailInfo(problemDetail) {
  612. if(!this.rowData.reviewResult){
  613. this.$message.warning("请选择复核结果");
  614. return false;
  615. }
  616. if(!this.rowData.reviewNote){
  617. this.$message.warning("请选择复核说明");
  618. return false;
  619. }
  620. this.$nextTick(() => {
  621. if (this.$refs.uploadFile.submitUpload(this.rowData.id)) {
  622. this.removeNewSupervision();
  623. }
  624. })
  625. setTimeout(() => {
  626. let obj = {
  627. id:this.rowData.id,
  628. reviewResult:this.rowData.reviewResult,
  629. reviewNote:this.rowData.reviewNote
  630. }
  631. var _self = this;
  632. request.post(`/bis/insp/pblm/plist/review`, obj).then(res => {
  633. if (res.success) {
  634. _self.$emit('cancelHandler', true);
  635. _self.$message.success('保存成功');
  636. } else {
  637. _self.$message.warning(res.message);
  638. }
  639. })
  640. .catch(err => {
  641. console.log(err);
  642. })
  643. }, 1000)
  644. },
  645. cancelHandler() {
  646. this.$emit('cancelHandler');
  647. this.$refs.uploadFile.init();
  648. this.addPicPanel = false;
  649. },
  650. timestampToTime(detail) {
  651. if (detail) {
  652. var date = new Date(detail);
  653. var Y = date.getFullYear() + "-";
  654. var M =
  655. (date.getMonth() + 1 < 10 ?
  656. "0" + (date.getMonth() + 1) :
  657. date.getMonth() + 1) + "-";
  658. var D =
  659. (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
  660. var h =
  661. (date.getHours() < 10 ? "0" + date.getHours() : date.getHours()) + ":";
  662. var m =
  663. date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
  664. return Y + M + D + h + m;
  665. } else {
  666. return "";
  667. }
  668. },
  669. removeNewSupervision(arg) {
  670. if (arg) {
  671. this.getPicArray();
  672. return;
  673. }
  674. },
  675. addPic() {
  676. this.addPicPanel = !this.addPicPanel;
  677. },
  678. // 删除图片文件
  679. removeFile(id, index) {
  680. var _self = this;
  681. this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
  682. confirmButtonText: "确定",
  683. cancelButtonText: "返回",
  684. type: "warning"
  685. }).then(
  686. res => {
  687. if (res === "confirm") {
  688. deleteFileById(id, this.persId).then(res => {
  689. if (res.success) {
  690. _self.getPicArray();
  691. _self.getPicArray_1();
  692. _self.getPicArray_2();
  693. } else {
  694. this.$message.error(res.message);
  695. }
  696. });
  697. }
  698. },
  699. res => {
  700. console.log("返回");
  701. }
  702. )
  703. },
  704. },
  705. filters: {
  706. zgqk(val) {
  707. switch (val) {
  708. case '0':
  709. return '未整改';
  710. case '1':
  711. return '整改中';
  712. case '2':
  713. return '已整改';
  714. }
  715. },
  716. inspPblmCate(val) {
  717. if (!val || val == '') {
  718. return ''
  719. }
  720. if (val == '0') {
  721. return '一般'
  722. } else if (val == '1') {
  723. return '较重'
  724. } else if (val == '2') {
  725. return '严重'
  726. } else {
  727. return val
  728. }
  729. },
  730. }
  731. };
  732. </script>
  733. <style lang="scss" scoped>
  734. .el-steps{
  735. margin-left: 10px;
  736. margin-top: 10px;
  737. width: calc(100% - 10px);
  738. height: calc(100% - 10px);
  739. }
  740. .el-steps /deep/ .is-vertical{
  741. height:33.33%;
  742. }
  743. .el-steps /deep/ .el-step__main{
  744. width:calc(100% - 35px);
  745. }
  746. .el-steps /deep/ .el-step__description{
  747. height:calc(100% - 32px);
  748. padding-right:0px !important;
  749. }
  750. .el-tabs{
  751. height: 200px;
  752. }
  753. .el-tabs /deep/.el-tabs__header{
  754. margin: 0!important;
  755. }
  756. .el-tabs /deep/.el-tabs__content{
  757. height:calc(100% - 42px);
  758. overflow: auto;
  759. padding: 0 !important;
  760. }
  761. .el-tabs /deep/ .el-tab-pane{
  762. height:100%;
  763. }
  764. .el-tabs /deep/ .el-row{
  765. height:100%;
  766. }
  767. .el-carousel /deep/.el-carousel__container{
  768. height:100% !important;
  769. }
  770. .wtzgfc_add_pblm /deep/.el-form-item{
  771. margin-bottom: 5px !important;
  772. }
  773. .el-card /deep/.el-card__body{
  774. padding: 15px !important;
  775. }
  776. .image-preview-action {
  777. position: absolute;
  778. width: 100%;
  779. height: 30px;
  780. left: 0;
  781. top: 0;
  782. color: #fff;
  783. opacity: 0;
  784. font-size: 20px;
  785. background-color: rgba(0, 0, 0, 0.5);
  786. transition: opacity 0.3s;
  787. cursor: pointer;
  788. text-align: center;
  789. line-height: 30px;
  790. .el-icon-delete {
  791. font-size: 25px;
  792. }
  793. }
  794. .image-preview-action:hover {
  795. opacity: 1;
  796. }
  797. .wtzgfc_view_pblm {
  798. .el-form-item {
  799. width: 100%;
  800. margin-bottom: 5px !important;
  801. }
  802. p.p_title {
  803. text-align: left;
  804. font-weight: bold;
  805. }
  806. .el-radio {
  807. margin-bottom: 15px;
  808. }
  809. .upload-container {
  810. width: 100%;
  811. position: relative;
  812. .image-uploader {
  813. width: 35%;
  814. float: left;
  815. }
  816. .image-preview {
  817. width: 200px;
  818. height: 200px;
  819. position: relative;
  820. border: 1px dashed #d9d9d9;
  821. float: left;
  822. // margin-left: 50px;
  823. .image-preview-wrapper {
  824. position: relative;
  825. width: 100%;
  826. height: 100%;
  827. img {
  828. width: 100%;
  829. height: 100%;
  830. }
  831. }
  832. .image-preview-action {
  833. position: absolute;
  834. width: 100%;
  835. height: 30px;
  836. left: 0;
  837. bottom: 0;
  838. color: #fff;
  839. opacity: 0;
  840. font-size: 20px;
  841. background-color: rgba(0, 0, 0, 0.5);
  842. transition: opacity 0.3s;
  843. cursor: pointer;
  844. text-align: center;
  845. line-height: 30px;
  846. .el-icon-delete {
  847. font-size: 25px;
  848. }
  849. }
  850. &:hover {
  851. .image-preview-action {
  852. opacity: 1;
  853. }
  854. }
  855. }
  856. .image-app-preview {
  857. margin-bottom: 10px;
  858. width: 40vh;
  859. height: 180px;
  860. position: relative;
  861. border: 1px dashed #d9d9d9;
  862. float: left;
  863. // margin-left: 50px;
  864. .app-fake-conver {
  865. height: 44px;
  866. position: absolute;
  867. width: 100%; // background: rgba(0, 0, 0, .1);
  868. text-align: center;
  869. line-height: 64px;
  870. color: #fff;
  871. }
  872. }
  873. }
  874. }
  875. </style>