54a4e837aac3a7a052b5e8ed694fd47990cc93eb.svn-base 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. <template>
  2. <!-- 修改弹框 -->
  3. <el-dialog
  4. width="60%"
  5. class="outerDialog custom_dialog"
  6. title="修改督查问题"
  7. @close="closeModal"
  8. append-to-body
  9. :visible.sync="changeSupervisionVisible">
  10. <div class="scroll_wrapper">
  11. <div
  12. style="width:49%;overflow-y:auto;max-height:58vh;float:left;border:1px solid #d5d5ff;margin-right:5px;">
  13. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">基本信息</p>
  14. <el-form ref="changeSupFrom" :rules="rules1" :model="changeSupervision" label-width="120px">
  15. <el-form-item label="责任单位" prop="aUnit">
  16. <el-input v-model="changeSupervision.aUnit" clearable :readonly="true"></el-input>
  17. </el-form-item>
  18. <!--<el-form-item label="创建时间" prop="inTm">-->
  19. <!--<el-date-picker v-model="changeSupervision.inTm" readonly type="date"></el-date-picker>-->
  20. <!--</el-form-item>-->
  21. <!--<el-form-item label="整改情况" prop="rectConc">-->
  22. <!--<el-select v-model="changeSupervision.rectConc" clearable placeholder="整改情况">-->
  23. <!--<el-option label="未整改" value="0"></el-option>-->
  24. <!--<el-option label="整改中" value="1"></el-option>-->
  25. <!--<el-option label="已整改" value="2"></el-option>-->
  26. <!--</el-select>-->
  27. <!--</el-form-item>-->
  28. <el-form-item label="调查核实情况" prop="pblmIsTrue">
  29. <!--<el-input type="textarea" :rows="2" v-model="changeSupervision.rectConc" clearable></el-input>-->
  30. <el-select v-model="changeSupervision.pblmIsTrue" clearable placeholder="调查核实情况">
  31. <el-option label="不属实" value="0"></el-option>
  32. <el-option label="部分属实" value="1"></el-option>
  33. <el-option label="属实" value="2"></el-option>
  34. </el-select>
  35. </el-form-item>
  36. <el-form-item label="复查组长" prop="rectLead">
  37. <el-input
  38. resize="none"
  39. type="input"
  40. :rows="3"
  41. readonly
  42. placeholder="请输入"
  43. v-model.trim="changeSupervision.rectLead"
  44. ></el-input>
  45. </el-form-item>
  46. <el-form-item label="整改详细情况" prop="rectMeas">
  47. <el-input type="textarea" :rows="2" v-model.trim="changeSupervision.rectMeas" clearable></el-input>
  48. </el-form-item>
  49. <el-form-item label="复查时间" prop="rectTm">
  50. <el-date-picker v-model="changeSupervision.rectTm" type="date"></el-date-picker>
  51. </el-form-item>
  52. <!--<el-form-item label="修改时间" prop="upTm">-->
  53. <!--<el-date-picker v-model="changeSupervision.upTm" readonly type="date"></el-date-picker>-->
  54. <!--</el-form-item>-->
  55. <el-form-item label="备注" prop="note">
  56. <el-input type="textarea" :rows="2" v-model.trim="changeSupervision.note" clearable></el-input>
  57. </el-form-item>
  58. <!--<el-form-item label="上报人" prop="persId">-->
  59. <!--<el-input-->
  60. <!--resize="none"-->
  61. <!--type="input"-->
  62. <!--:rows="3"-->
  63. <!--readonly-->
  64. <!--placeholder="请输入"-->
  65. <!--v-model.trim="changeSupervision.persId"-->
  66. <!--&gt;</el-input>-->
  67. <!--</el-form-item>-->
  68. </el-form>
  69. </div>
  70. <div
  71. style="width: 49%;float: left;border: 1px solid rgb(213, 213, 255);margin-right: 5px;overflow-y: auto;max-height: 58vh;">
  72. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
  73. <el-tabs style="margin:0px 5px">
  74. <el-tab-pane :label="picturetabName">
  75. <el-row style="text-align:right;">
  76. <el-button
  77. :v-if="!addPicPanel?addPicPanel:addPicPanel"
  78. size="mini"
  79. type="text"
  80. :icon="!addPicPanel?'el-icon-circle-plus-outline':'el-icon-circle-close-outline'"
  81. @click="addPic"
  82. >{{!addPicPanel?"添加":"取消"}}</el-button>
  83. </el-row>
  84. <el-row v-show="addPicPanel">
  85. <upload
  86. ref="uploadFile"
  87. :url="`/pdcApi/file/insert?bizId=`"
  88. @uploadOver="removeNewSupervision"
  89. ></upload>
  90. </el-row>
  91. <el-row>
  92. <div style="overflow-y:auto;overflow-x:hidden;max-height:30vh;padding:10px;">
  93. <div class="upload-container" id="imgView">
  94. <div
  95. v-for="(item, index) in pictureArray"
  96. :key="index"
  97. class="image-preview image-app-preview"
  98. >
  99. <div class="image-preview-wrapper">
  100. <img :src="`${hostUrl}/${item.filePath}`">
  101. <div class="image-preview-action">
  102. <i @click="removeFile(item.id)" class="el-icon-delete"></i>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </el-row>
  109. </el-tab-pane>
  110. <el-tab-pane :label="audiotabName">
  111. <el-table border :data="audioArray" style="width: 100%;margin: 0 auto;">
  112. <el-table-column header-align="center" align="center" label="音频">
  113. <template slot-scope="scope">
  114. <elaudio
  115. style="margin-left:15%;width:100px;height:30px;"
  116. :theUrl="`${hostUrl}/${scope.row.filePath}`"
  117. ></elaudio>
  118. </template>
  119. </el-table-column>
  120. <el-table-column header-align="center" align="center" label="操作">
  121. <template slot-scope="scope">
  122. <el-button
  123. size="mini"
  124. @click="removeFile(scope.row.id,scope.$index)"
  125. type="danger"
  126. >删除</el-button>
  127. </template>
  128. </el-table-column>
  129. </el-table>
  130. </el-tab-pane>
  131. <el-tab-pane :label="videotabName">
  132. <el-table border :data="videoArray" style="width: 100%;margin: 0 auto;">
  133. <el-table-column header-align="center" align="center" label="视频">
  134. <template slot-scope="scope">
  135. <video-player
  136. class="vjs-custom-skin"
  137. ref="videoPlayer"
  138. :options="scope.row"
  139. :playsinline="true"
  140. ></video-player>
  141. </template>
  142. </el-table-column>
  143. <el-table-column header-align="center" align="center" label="操作">
  144. <template slot-scope="scope">
  145. <el-button
  146. size="mini"
  147. @click="removeFile(scope.row.id,scope.$index)"
  148. type="danger"
  149. >删除</el-button>
  150. </template>
  151. </el-table-column>
  152. </el-table>
  153. </el-tab-pane>
  154. </el-tabs>
  155. </div>
  156. </div>
  157. <span slot="footer">
  158. <el-button type="primary" @click="changeSupervisionInfo">保存</el-button>
  159. <el-button @click="changeSupervisionVisiblefalse">取消</el-button>
  160. </span>
  161. </el-dialog>
  162. </template>
  163. <script>
  164. import {showDetailsXq,updatelist,deleteFileById} from "../../api/duChaAPI.js";
  165. import request from "../../utils/gw_ajax_request.js";
  166. import { hostUrl } from "@util/global_variable.js";
  167. import Viewer from 'viewerjs';
  168. import 'viewerjs/dist/viewer.css';
  169. export default {
  170. props: ['editId'],
  171. data(){
  172. return{
  173. changeSupervisionVisible: true,
  174. changeSupervisionLoading: false,
  175. changeSupervision: {},
  176. rules1: {
  177. aUnit: [
  178. {
  179. required: true,
  180. message: "请输入责任单位",
  181. trigger: "blur"
  182. },
  183. {
  184. min: 1,
  185. max: 999,
  186. message: "不超过100字符",
  187. trigger: "blur"
  188. }
  189. ],
  190. pblmDesc: [
  191. {
  192. required: true,
  193. message: "请输入问题信息",
  194. trigger: "blur"
  195. }
  196. ],
  197. rectConc: [
  198. {
  199. required: true,
  200. message: "请输入整改情况",
  201. trigger: "blur"
  202. },
  203. {
  204. min: 1,
  205. max: 999,
  206. message: "不超过100字符",
  207. trigger: "blur"
  208. }
  209. ],
  210. pblmIsTrue: [
  211. {
  212. required: true,
  213. message: "请输入调查核实情况",
  214. trigger: "blur"
  215. },
  216. {
  217. min: 1,
  218. max: 999,
  219. message: "不超过100字符",
  220. trigger: "blur"
  221. }
  222. ]
  223. },
  224. addPicPanel: false,
  225. gwComFiles: [],
  226. picturetabName: "",
  227. audiotabName: "",
  228. videotabName: "",
  229. pictureArray: [],
  230. audioArray: [],
  231. videoArray: [],
  232. updateIdXiuGai: "",
  233. pblmId: "",
  234. t1: {},
  235. t2: {},
  236. t3: {},
  237. problemList: [],
  238. currentCheckPointList: [],
  239. currentProblemDescList: [],
  240. xiangqingmiaoshu: '',
  241. wenTiLeiBie:"",
  242. jianChaXiangMu:"",
  243. }
  244. },
  245. components:{
  246. upload: resolve => {
  247. require(["../../widgets/uploadFile.vue"], resolve);
  248. },
  249. },
  250. computed:{
  251. hostUrl(){
  252. return hostUrl
  253. },
  254. persId() {
  255. return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
  256. }
  257. },
  258. mounted(){
  259. // this.getproblemSmallType();
  260. this.$nextTick(function () {
  261. this.changeSup(this.editId);
  262. })
  263. },
  264. methods:{
  265. // 修改弹窗显示
  266. changeSup(id) {
  267. this.pictureArray = [];
  268. this.audioArray = [];
  269. this.videoArray = [];
  270. this.updateIdXiuGai = id;
  271. let _this = this
  272. // showDetailsXq(this.updateIdXiuGai).then(res => {
  273. request.get(`/bis/insp/other/pblm/${this.updateIdXiuGai}`).then(res =>{
  274. // if(this.usersId==)
  275. this.changeSupervision = res.data;
  276. res.data.gwComFiles.forEach(item => {
  277. if (
  278. item.fileExt == "mp3" ||
  279. item.fileExt == "MP3" ||
  280. item.fileExt == "m4a"
  281. ) {
  282. this.audioArray.push(item);
  283. } else if (
  284. item.fileExt == "jpg" ||
  285. item.fileExt == "JPG" ||
  286. item.fileExt == "png" ||
  287. item.fileExt == "PNG" ||
  288. item.fileExt == "JPEG" ||
  289. item.fileExt == "jpeg"
  290. ) {
  291. this.pictureArray.push(item);
  292. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  293. this.videoArray.push({
  294. id: item.id,
  295. bizId: item.bizId,
  296. width: "130",
  297. height: "130",
  298. autoplay: false,
  299. muted: true,
  300. language: "en",
  301. playbackRates: [0.7, 1.0, 1.5, 2.0],
  302. sources: [
  303. {
  304. type: "video/mp4",
  305. src: this.hostUrl + item.filePath
  306. }
  307. ]
  308. });
  309. }
  310. });
  311. _this.$nextTick(function(){
  312. var ViewerDom = document.getElementById('imgView');
  313. var viewer = new Viewer(ViewerDom, {})
  314. });
  315. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  316. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  317. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  318. });
  319. },
  320. // 提交修改信息
  321. changeSupervisionInfo() {
  322. this.$refs.changeSupFrom.validate(valid => {
  323. if (valid) {
  324. this.changeSupervisionLoading = true;
  325. let data = this.changeSupervision;
  326. request.post(`/bis/insp/other/pblm`,data).then(res =>{
  327. this.pblmId = res.data.pblmId;
  328. this.gwComFiles = res.data.gwComFiles;
  329. if (res.success) {
  330. if (this.$refs.uploadFile.submitUpload(data.id)) {
  331. this.removeNewSupervision();
  332. this.successInfo();
  333. this.addPicPanel = false;
  334. this.changeSupervisionLoading = false;
  335. }
  336. } else {
  337. this.failInfo();
  338. this.$emit('closeEditDialog')
  339. }
  340. });
  341. }
  342. });
  343. },
  344. removeNewSupervision(arg) {
  345. if (arg) {
  346. var args = this.gwComFiles.concat(arg);
  347. }
  348. this.changeSup(this.editId)
  349. this.gwComFiles = [];
  350. this.$emit('closeEditDialog','success')
  351. },
  352. changeSupervisionVisiblefalse() {
  353. this.$emit('closeEditDialog')
  354. this.$refs.uploadFile.init();
  355. this.addPicPanel = false;
  356. },
  357. addPic() {
  358. this.addPicPanel = !this.addPicPanel;
  359. },
  360. // 删除图片文件
  361. removeFile(id, index) {
  362. // this.updateIdXiuGai = this.updateIdXiuGai;
  363. var _self = this;
  364. this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
  365. confirmButtonText: "确定",
  366. cancelButtonText: "返回",
  367. type: "warning"
  368. }).then(
  369. res => {
  370. if (res === "confirm") {
  371. deleteFileById(id, this.persId).then(res => {
  372. if (res.success) {
  373. this.changeSupervision.gwComFiles.forEach(item => {
  374. if (
  375. item.fileExt == "mp3" ||
  376. item.fileExt == "MP3" ||
  377. item.fileExt == "m4a"
  378. ) {
  379. this.audiotabName.splice(index, 1);
  380. } else if (
  381. item.fileExt == "jpg" ||
  382. item.fileExt == "JPG" ||
  383. item.fileExt == "png" ||
  384. item.fileExt == "PNG" ||
  385. item.fileExt == "JPEG" ||
  386. item.fileExt == "jpeg"
  387. ) {
  388. this.pictureArray.splice(index, 1);
  389. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  390. this.videoArray.splice(index, 1);
  391. }
  392. });
  393. _self.changeSup(this.updateIdXiuGai);
  394. } else {
  395. this.failInfo();
  396. }
  397. });
  398. }
  399. },
  400. res => {
  401. console.log("返回");
  402. }
  403. )
  404. },
  405. // 操作成功反馈
  406. successInfo() {
  407. this.$message({
  408. type: "success",
  409. message: "操作成功!"
  410. });
  411. },
  412. // 操作失败反馈
  413. failInfo(val) {
  414. this.$message.error(val);
  415. },
  416. // 文件上传
  417. submitUpload() {
  418. this.$refs.upload.submit();
  419. },
  420. closeModal(){
  421. this.$emit('closeEditDialog')
  422. },
  423. // problemListChange: function (item) {
  424. // this.t1 = item
  425. // this.wenTiLeiBie = item.inspPblmsName;
  426. // this.currentCheckPointList = item.checkPoints;
  427. // },
  428. // currentCheckPointListChange: function (item) {
  429. // this.jianChaXiangMu = item.checkPointName;
  430. // this.currentProblemDescList = item.pblmDescs;
  431. // },
  432. // currentProblemDescListChange: function (item) {
  433. // this.xiangqingmiaoshu = item.pblmDesc;
  434. // console.log(item);
  435. // },
  436. },
  437. watch:{
  438. editId(val){
  439. this.changeSup(val)
  440. },
  441. }
  442. }
  443. </script>
  444. <style scoped lang="scss">
  445. .scroll_wrapper{
  446. overflow: hidden;
  447. }
  448. .scroll_wrapper .el-form{
  449. padding-top: 5px;
  450. padding-right: 5px;
  451. }
  452. .upload-container {
  453. width: 100%;
  454. position: relative;
  455. .image-uploader {
  456. width: 35%;
  457. float: left;
  458. }
  459. .image-preview {
  460. width: 200px;
  461. height: 200px;
  462. position: relative;
  463. border: 1px dashed #d9d9d9;
  464. float: left;
  465. // margin-left: 50px;
  466. .image-preview-wrapper {
  467. position: relative;
  468. width: 100%;
  469. height: 100%;
  470. img {
  471. width: 100%;
  472. height: 100%;
  473. }
  474. }
  475. .image-preview-action {
  476. position: absolute;
  477. width: 100%;
  478. height: 30px;
  479. left: 0;
  480. bottom: 0;
  481. color: #fff;
  482. opacity: 0;
  483. font-size: 20px;
  484. background-color: rgba(0, 0, 0, 0.5);
  485. transition: opacity 0.3s;
  486. cursor: pointer;
  487. text-align: center;
  488. line-height: 30px;
  489. .el-icon-delete {
  490. font-size: 25px;
  491. }
  492. }
  493. &:hover {
  494. .image-preview-action {
  495. opacity: 1;
  496. }
  497. }
  498. }
  499. .image-app-preview {
  500. margin-bottom: 10px;
  501. width: 40vh;
  502. height: 180px;
  503. position: relative;
  504. border: 1px dashed #d9d9d9;
  505. float: left;
  506. // margin-left: 50px;
  507. .app-fake-conver {
  508. height: 44px;
  509. position: absolute;
  510. width: 100%; // background: rgba(0, 0, 0, .1);
  511. text-align: center;
  512. line-height: 64px;
  513. color: #fff;
  514. }
  515. }
  516. }
  517. </style>