fae4bf1330ecbbf637f5c88d9cc1684555d2c3fe.svn-base 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812
  1. <template>
  2. <!-- 修改弹框 -->
  3. <el-dialog
  4. width="60%"
  5. class="outerDialog custom_dialog"
  6. title="修改督查问题"
  7. :modal = true
  8. @close="closeModal"
  9. :append-to-body = true
  10. :visible.sync="changeSupervisionVisible">
  11. <div class="scroll_wrapper">
  12. <div
  13. style="width:49%;overflow-y:auto;max-height:58vh;float:left;border:1px solid #d5d5ff;margin-right:5px;">
  14. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">基本信息</p>
  15. <el-form ref="changeSupFrom" :rules="rules1" :model="changeSupervision" label-width="120px">
  16. <el-form-item label="水库名称" prop="nm">
  17. <el-input v-model="changeSupervision.nm" clearable :readonly="true"></el-input>
  18. </el-form-item>
  19. <el-form-item label="问题类别" prop="inspPblmsName">
  20. <el-select v-model="t1" value-key="inspPblmsName" placeholder="请选择" @change="problemListChange">
  21. <el-option v-for="(item,index) in problemList" :key="index" :label="item.inspPblmsName" :value="item">
  22. </el-option>
  23. </el-select>
  24. </el-form-item>
  25. <el-form-item label="检查项目" prop="checkPoint" style="text-align:left">
  26. <el-select v-model="t2" placeholder="请选择" value-key="checkPointName" @change="currentCheckPointListChange">
  27. <el-option v-for="(item,index) in currentCheckPointList" :key="index" :label="item.checkPointName" :value="item">
  28. </el-option>
  29. </el-select>
  30. </el-form-item>
  31. <el-form-item label="问题描述" prop="pblmDesc" style="text-align:left">
  32. <el-select v-model="t3" placeholder="请选择" value-key="pblmDesc" @change="currentProblemDescListChange" style="max-width: 500px">
  33. <el-option v-for="(item,index) in currentProblemDescList" :key="index" :label="item.pblmDesc" :value="item" :title="item.pblmDesc" style="max-width: 500px">
  34. </el-option>
  35. </el-select>
  36. </el-form-item>
  37. <el-form-item v-if="pType=='128'" label="问题责任单位" prop="pblmDesc" style="text-align:left">
  38. <el-input v-model="changeSupervision.inspPblmOrgName" clearable></el-input>
  39. </el-form-item>
  40. <el-form-item label="详细描述" prop="inspPblmDesc">
  41. <el-input type="textarea" :rows="2" v-model="changeSupervision.inspPblmDesc" clearable></el-input>
  42. </el-form-item>
  43. <el-form-item label="是否为典型问题:">
  44. <el-select v-model="changeSupervision.ifCasePblm" clearable placeholder="请选择">
  45. <el-option
  46. v-for="item in supervision"
  47. :key="item.value"
  48. :label="item.label"
  49. :value="item.value"
  50. ></el-option>
  51. </el-select>
  52. </el-form-item>
  53. <!-- <el-form-item label="严重程度:">-->
  54. <!-- <el-select-->
  55. <!-- v-model="changeSupervision.inspPblmCate"-->
  56. <!-- disabled-->
  57. <!-- clearable-->
  58. <!-- disable-->
  59. <!-- placeholder="请选择"-->
  60. <!-- >-->
  61. <!-- <el-option-->
  62. <!-- v-for="item in supervisionState"-->
  63. <!-- :key="item.value"-->
  64. <!-- :label="item.label"-->
  65. <!-- :value="item.value"-->
  66. <!-- ></el-option>-->
  67. <!-- </el-select>-->
  68. <!-- </el-form-item>-->
  69. <el-form-item label="扣分值:">
  70. {{changeSupervision.score}}
  71. </el-form-item>
  72. <el-form-item label="备注" prop="note">
  73. <el-input type="textarea" :rows="2" v-model.trim="changeSupervision.note" clearable></el-input>
  74. </el-form-item>
  75. <el-form-item label="上报人" prop="persName">
  76. <el-input
  77. resize="none"
  78. type="input"
  79. :rows="3"
  80. readonly
  81. placeholder="请输入"
  82. v-model.trim="changeSupervision.persName"
  83. ></el-input>
  84. </el-form-item>
  85. <el-form-item label="上报时间" prop="collTime">
  86. <el-date-picker v-model="changeSupervision.collTime" readonly type="date"></el-date-picker>
  87. </el-form-item>
  88. </el-form>
  89. </div>
  90. <div
  91. style="width: 49%;float: left;border: 1px solid rgb(213, 213, 255);margin-right: 5px;overflow-y: auto;max-height: 58vh;">
  92. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
  93. <el-tabs style="margin:0px 5px">
  94. <el-tab-pane :label="picturetabName">
  95. <el-row style="text-align:right;">
  96. <el-button
  97. :v-if="!addPicPanel?addPicPanel:addPicPanel"
  98. size="mini"
  99. type="text"
  100. :icon="!addPicPanel?'el-icon-circle-plus-outline':'el-icon-circle-close-outline'"
  101. @click="addPic"
  102. >{{!addPicPanel?"添加":"取消"}}</el-button>
  103. </el-row>
  104. <!-- 用v-show判断显示和隐藏 避免上传组件调用方法报错 关闭对话框要在上传接口走完之后,否则会报submit方法找不到的错误 record by wby-->
  105. <el-row>
  106. <upload
  107. v-show="addPicPanel"
  108. ref="uploadFile"
  109. :url="`/pdcApi/file/insert?bizId=`"
  110. @uploadOver="removeNewSupervision"
  111. ></upload>
  112. </el-row>
  113. <el-row>
  114. <div style="overflow-y:auto;overflow-x:hidden;max-height:30vh;padding:10px;">
  115. <div class="upload-container" id="imgView">
  116. <div
  117. v-for="(item, index) in pictureArray"
  118. :key="index"
  119. class="image-preview image-app-preview"
  120. >
  121. <div class="image-preview-wrapper">
  122. <img :src="`${hostUrl}/${item.filePath}`">
  123. <div class="image-preview-action">
  124. <i @click="removeFile(item.id)" class="el-icon-delete"></i>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </el-row>
  131. </el-tab-pane>
  132. <el-tab-pane :label="audiotabName">
  133. <el-table border :data="audioArray" style="width: 100%;margin: 0 auto;">
  134. <el-table-column header-align="center" align="center" label="音频">
  135. <template slot-scope="scope">
  136. <elaudio
  137. style="margin-left:15%;width:100px;height:30px;"
  138. :theUrl="`${hostUrl}/${scope.row.filePath}`"
  139. ></elaudio>
  140. </template>
  141. </el-table-column>
  142. <el-table-column header-align="center" align="center" label="操作">
  143. <template slot-scope="scope">
  144. <el-button
  145. size="mini"
  146. @click="removeFile(scope.row.id,scope.$index)"
  147. type="danger"
  148. >删除</el-button>
  149. </template>
  150. </el-table-column>
  151. </el-table>
  152. </el-tab-pane>
  153. <el-tab-pane :label="videotabName">
  154. <el-table border :data="videoArray" style="width: 100%;margin: 0 auto;">
  155. <el-table-column header-align="center" align="center" label="视频">
  156. <template slot-scope="scope">
  157. <video-player
  158. class="vjs-custom-skin"
  159. ref="videoPlayer"
  160. :options="scope.row"
  161. :playsinline="true"
  162. ></video-player>
  163. </template>
  164. </el-table-column>
  165. <el-table-column header-align="center" align="center" label="操作">
  166. <template slot-scope="scope">
  167. <el-button
  168. size="mini"
  169. @click="removeFile(scope.row.id,scope.$index)"
  170. type="danger"
  171. >删除</el-button>
  172. </template>
  173. </el-table-column>
  174. </el-table>
  175. </el-tab-pane>
  176. <el-tab-pane :label="filetabName">
  177. <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
  178. <el-table-column header-align="center" align="center" label="文档">
  179. <template slot-scope="scope">
  180. <p>
  181. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank" rel="noopener noreferrer">
  182. {{scope.row.fileName}}
  183. </a>
  184. </p>
  185. </template>
  186. </el-table-column>
  187. <el-table-column header-align="center" align="center" label="操作">
  188. <template slot-scope="scope">
  189. <el-button
  190. size="mini"
  191. @click="removeFile(scope.row.id,scope.$index)"
  192. type="danger"
  193. >删除</el-button>
  194. </template>
  195. </el-table-column>
  196. </el-table>
  197. </el-tab-pane>
  198. </el-tabs>
  199. </div>
  200. </div>
  201. <span slot="footer">
  202. <el-button type="primary" @click="changeSupervisionInfo">保存</el-button>
  203. <el-button @click="changeSupervisionVisiblefalse">取消</el-button>
  204. </span>
  205. </el-dialog>
  206. </template>
  207. <script>
  208. import {showDetailsXq,updatelist,deleteFileById} from "../../api/duChaAPI.js";
  209. import request from "../../utils/gw_ajax_request.js";
  210. import { hostUrl } from "@util/global_variable.js";
  211. import Viewer from 'viewerjs';
  212. import 'viewerjs/dist/viewer.css';
  213. export default {
  214. props: ['editId','pType','objId'],
  215. data(){
  216. return{
  217. changeSupervisionVisible: true,
  218. changeSupervisionLoading: false,
  219. changeSupervision: {},
  220. rules1: {
  221. inspPblmName: [
  222. {
  223. required: true,
  224. message: "请输入问题名称",
  225. trigger: "blur"
  226. },
  227. {
  228. min: 1,
  229. max: 999,
  230. message: "不超过100字符",
  231. trigger: "blur"
  232. }
  233. ],
  234. inspPblmDesc: [
  235. {
  236. required: true,
  237. message: "请输入问题描述",
  238. trigger: "blur"
  239. }
  240. ],
  241. recPers: [
  242. {
  243. required: true,
  244. message: "请输入记录人",
  245. trigger: "blur"
  246. },
  247. {
  248. min: 1,
  249. max: 999,
  250. message: "不超过100字符",
  251. trigger: "blur"
  252. }
  253. ],
  254. objType: [
  255. {
  256. required: true,
  257. message: "请选择督查对象类型",
  258. trigger: "change"
  259. }
  260. ],
  261. objId: [
  262. {
  263. required: true,
  264. message: "请选择督查对象类型",
  265. trigger: "change"
  266. }
  267. ],
  268. inspPblmType: [
  269. {
  270. required: true,
  271. message: "请选择督查问题类型",
  272. trigger: "change"
  273. }
  274. ],
  275. dataStat: [
  276. {
  277. required: true,
  278. message: "请选择数据状态",
  279. trigger: "change"
  280. }
  281. ],
  282. collTime: [
  283. {
  284. required: true,
  285. message: "请选择采集时间",
  286. trigger: "change"
  287. }
  288. ],
  289. ifCasePblm: [
  290. {
  291. required: true,
  292. message: "请选择是否典型",
  293. trigger: "change"
  294. }
  295. ],
  296. pblmStat: [
  297. {
  298. required: true,
  299. message: "请选择问题类型",
  300. trigger: "change"
  301. }
  302. ],
  303. inspPblmCate: [
  304. {
  305. required: true,
  306. message: "请选择问题程度",
  307. trigger: "change"
  308. },
  309. {
  310. trigger: "change"
  311. }
  312. ]
  313. },
  314. supervisionState: [
  315. {
  316. value: "0",
  317. label: "一般"
  318. },
  319. {
  320. value: "1",
  321. label: "较重"
  322. },
  323. {
  324. value: "2",
  325. label: "严重"
  326. },
  327. {
  328. value: "3",
  329. label: "特别严重"
  330. }
  331. ],
  332. supervision: [
  333. {
  334. value: "1",
  335. label: "是"
  336. },
  337. {
  338. value: "0",
  339. label: "否"
  340. }
  341. ],
  342. addPicPanel: false,
  343. gwComFiles: [],
  344. picturetabName: "",
  345. audiotabName: "",
  346. videotabName: "",
  347. pictureArray: [],
  348. audioArray: [],
  349. videoArray: [],
  350. filetabName: "",
  351. fileArray: [],
  352. updateIdXiuGai: "",
  353. pblmId: "",
  354. t1: {},
  355. t2: {},
  356. t3: {},
  357. problemList: [],
  358. currentCheckPointList: [],
  359. currentProblemDescList: [],
  360. xiangqingmiaoshu: '',
  361. wenTiLeiBie:"",
  362. jianChaXiangMu:"",
  363. }
  364. },
  365. components:{
  366. upload: resolve => {
  367. require(["../../widgets/uploadFile.vue"], resolve);
  368. },
  369. },
  370. computed:{
  371. hostUrl(){
  372. return hostUrl
  373. },
  374. persId() {
  375. return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
  376. }
  377. },
  378. mounted(){
  379. this.getproblemSmallType();
  380. this.changeSup(this.editId);
  381. },
  382. methods:{
  383. // 修改弹窗显示
  384. changeSup(id,deleteUpdate) {
  385. this.pictureArray = [];
  386. this.audioArray = [];
  387. this.videoArray = [];
  388. this.fileArray = [];
  389. this.updateIdXiuGai = id;
  390. let _this = this
  391. showDetailsXq(this.updateIdXiuGai).then(res => {
  392. // if(this.usersId==)
  393. this.changeSupervision = res.data;
  394. this.t1['inspPblmsName'] = this.changeSupervision.inspPblmsName
  395. this.problemList.forEach(ele=>{
  396. if(ele.inspPblmsName == _this.t1.inspPblmsName){
  397. _this.problemListChange(ele)
  398. }
  399. })
  400. this.t2['checkPointName'] = this.changeSupervision.checkPoint
  401. this.currentCheckPointList.forEach(ele=>{
  402. if(ele.checkPointName == _this.t2.checkPointName){
  403. _this.currentCheckPointListChange(ele)
  404. }
  405. })
  406. this.t3['pblmDesc'] = this.changeSupervision.pblmDesc
  407. // 当删掉最后一个多媒体文件后,更新一下提交信息(解决删掉多媒体文件后台没有更改状态的问题 record by wby)
  408. if(deleteUpdate && !res.data.gwComFiles.length){
  409. this.changeSupervisionInfo()
  410. }
  411. res.data.gwComFiles.forEach(item => {
  412. if (
  413. item.fileExt == "mp3" ||
  414. item.fileExt == "MP3" ||
  415. item.fileExt == "m4a"
  416. ) {
  417. this.audioArray.push(item);
  418. } else if (
  419. item.fileExt == "jpg" ||
  420. item.fileExt == "JPG" ||
  421. item.fileExt == "png" ||
  422. item.fileExt == "PNG" ||
  423. item.fileExt == "JPEG" ||
  424. item.fileExt == "jpeg"
  425. ) {
  426. this.pictureArray.push(item);
  427. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  428. this.videoArray.push({
  429. id: item.id,
  430. bizId: item.bizId,
  431. width: "130",
  432. height: "130",
  433. autoplay: false,
  434. muted: true,
  435. language: "en",
  436. playbackRates: [0.7, 1.0, 1.5, 2.0],
  437. sources: [
  438. {
  439. type: "video/mp4",
  440. src: this.hostUrl + item.filePath
  441. }
  442. ]
  443. });
  444. } else {
  445. this.fileArray.push(item);
  446. }
  447. });
  448. _this.$nextTick(function(){
  449. var ViewerDom = document.getElementById('imgView');
  450. var viewer = new Viewer(ViewerDom, {})
  451. });
  452. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  453. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  454. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  455. this.filetabName = "其它资料(" + this.fileArray.length + ")";
  456. });
  457. },
  458. // 提交修改信息
  459. changeSupervisionInfo() {
  460. // //debugger
  461. console.log(this)
  462. var _self = this;
  463. this.$refs.changeSupFrom.validate(valid => {
  464. if (valid) {
  465. _self.changeSupervisionLoading = true;
  466. _self.changeSupervision.pblmDesc = _self.xiangqingmiaoshu
  467. _self.changeSupervision.checkPoint = _self.jianChaXiangMu
  468. _self.changeSupervision.inspPblmName = _self.wenTiLeiBie
  469. _self.changeSupervision.inspPlbmType = _self.t2.sort2;
  470. _self.changeSupervision.inspPblmCode = _self.t3.sn;
  471. _self.changeSupervision.pblmsTypeId = _self.t3.guid;
  472. let data = _self.changeSupervision;
  473. updatelist(data).then(res => {
  474. _self.pblmId = res.data.pblmId;
  475. _self.gwComFiles = res.data.gwComFiles;
  476. if (res.success) {
  477. if (_self.$refs.uploadFile.submitUpload(data.pblmId)) {
  478. _self.removeNewSupervision();
  479. _self.successInfo();
  480. _self.addPicPanel = false;
  481. _self.changeSupervisionLoading = false;
  482. }
  483. } else {
  484. _self.failInfo();
  485. _self.$emit('closeEditDialog')
  486. }
  487. });
  488. }
  489. });
  490. },
  491. removeNewSupervision(arg) {
  492. if (arg) {
  493. var args = this.gwComFiles.concat(arg);
  494. }
  495. this.changeSup(this.editId)
  496. this.gwComFiles = [];
  497. this.$emit('closeEditDialog','success')
  498. },
  499. changeSupervisionVisiblefalse() {
  500. this.$emit('closeEditDialog')
  501. this.$refs.uploadFile.init();
  502. this.addPicPanel = false;
  503. },
  504. addPic() {
  505. this.addPicPanel = !this.addPicPanel;
  506. },
  507. // 删除图片文件
  508. removeFile(id, index) {
  509. // this.updateIdXiuGai = this.updateIdXiuGai;
  510. var _self = this;
  511. this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
  512. confirmButtonText: "确定",
  513. cancelButtonText: "返回",
  514. type: "warning"
  515. }).then(
  516. res => {
  517. if (res === "confirm") {
  518. deleteFileById(id, this.persId).then(res => {
  519. if (res.success) {
  520. this.changeSupervision.gwComFiles.forEach(item => {
  521. if (
  522. item.fileExt == "mp3" ||
  523. item.fileExt == "MP3" ||
  524. item.fileExt == "m4a"
  525. ) {
  526. this.audioArray.splice(index, 1);
  527. } else if (
  528. item.fileExt == "jpg" ||
  529. item.fileExt == "JPG" ||
  530. item.fileExt == "png" ||
  531. item.fileExt == "PNG" ||
  532. item.fileExt == "JPEG" ||
  533. item.fileExt == "jpeg"
  534. ) {
  535. this.pictureArray.splice(index, 1);
  536. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  537. this.videoArray.splice(index, 1);
  538. }
  539. });
  540. _self.changeSup(this.updateIdXiuGai,'deleteUpdate');
  541. } else {
  542. this.failInfo();
  543. }
  544. });
  545. }
  546. },
  547. res => {
  548. console.log("返回");
  549. }
  550. )
  551. },
  552. // 操作成功反馈
  553. successInfo() {
  554. this.$message({
  555. type: "success",
  556. message: "操作成功!"
  557. });
  558. },
  559. // 操作失败反馈
  560. failInfo(val) {
  561. this.$message.error(val);
  562. },
  563. // 文件上传
  564. submitUpload() {
  565. this.$refs.upload.submit();
  566. },
  567. closeModal(){
  568. this.$emit('closeEditDialog')
  569. },
  570. getproblemSmallType() {
  571. if(this.pType=='128'){
  572. let result = [];
  573. request.get(`/dc/insp/pblms/listByObjId/${this.objId}`).then(res => {
  574. if (res.success) {
  575. res.data.forEach((ele) => {
  576. let haveinspPblmsName = false;
  577. result.forEach((inspPblm) => {
  578. if (inspPblm['inspPblmsName'] == ele.inspPblmsName) {
  579. //
  580. let havechekPoint = false;
  581. inspPblm['checkPoints'].forEach((chekPoint) => {
  582. if (chekPoint['checkPointName'] == ele.checkPoint) {
  583. //
  584. chekPoint['pblmDescs'].push({
  585. pblmDesc: ele.pblmDesc,
  586. sn: ele.sn,
  587. guid: ele.guid,
  588. });
  589. havechekPoint = true;
  590. }
  591. });
  592. if (!havechekPoint) {
  593. let newCheckPoint = {};
  594. newCheckPoint['checkPointName'] = ele.checkPoint;
  595. newCheckPoint['sort2'] = ele.sort2;
  596. newCheckPoint['pblmDescs'] = [{
  597. pblmDesc: ele.pblmDesc,
  598. sn: ele.sn,
  599. guid: ele.guid,
  600. }]
  601. inspPblm['checkPoints'].push(newCheckPoint);
  602. }
  603. haveinspPblmsName = true;
  604. }
  605. });
  606. if (!haveinspPblmsName) {
  607. let haveinspPblmsObj = {};
  608. haveinspPblmsObj['inspPblmsName'] = ele.inspPblmsName;
  609. haveinspPblmsObj['sort1'] = ele.sort1;
  610. haveinspPblmsObj['checkPoints'] = [{
  611. checkPointName: ele.checkPoint,
  612. sort2: ele.sort2,
  613. pblmDescs: [{
  614. pblmDesc: ele.pblmDesc,
  615. sn: ele.sn,
  616. guid: ele.guid,
  617. }]
  618. }];
  619. result.push(haveinspPblmsObj);
  620. }
  621. })
  622. this.problemList = result;
  623. this.changeSup(this.editId)
  624. }
  625. })
  626. return;
  627. }
  628. let result = [];
  629. request.get('/dc/insp/pblms/getPblmType', {
  630. params: {
  631. type: this.pType
  632. }
  633. }).then(res => {
  634. if (res.success) {
  635. res.data.forEach((ele) => {
  636. let haveinspPblmsName = false;
  637. result.forEach((inspPblm) => {
  638. if (inspPblm['inspPblmsName'] == ele.inspPblmsName) {
  639. //
  640. let havechekPoint = false;
  641. inspPblm['checkPoints'].forEach((chekPoint) => {
  642. if (chekPoint['checkPointName'] == ele.checkPoint) {
  643. //
  644. chekPoint['pblmDescs'].push({
  645. pblmDesc: ele.pblmDesc,
  646. sn: ele.sn,
  647. guid: ele.guid,
  648. });
  649. havechekPoint = true;
  650. }
  651. });
  652. if (!havechekPoint) {
  653. let newCheckPoint = {};
  654. newCheckPoint['checkPointName'] = ele.checkPoint;
  655. newCheckPoint['sort2'] = ele.sort2;
  656. newCheckPoint['pblmDescs'] = [{
  657. pblmDesc: ele.pblmDesc,
  658. sn: ele.sn,
  659. guid: ele.guid,
  660. }]
  661. inspPblm['checkPoints'].push(newCheckPoint);
  662. }
  663. haveinspPblmsName = true;
  664. }
  665. });
  666. if (!haveinspPblmsName) {
  667. let haveinspPblmsObj = {};
  668. haveinspPblmsObj['inspPblmsName'] = ele.inspPblmsName;
  669. haveinspPblmsObj['sort1'] = ele.sort1;
  670. haveinspPblmsObj['checkPoints'] = [{
  671. checkPointName: ele.checkPoint,
  672. sort2: ele.sort2,
  673. pblmDescs: [{
  674. pblmDesc: ele.pblmDesc,
  675. sn: ele.sn,
  676. guid: ele.guid,
  677. }]
  678. }];
  679. result.push(haveinspPblmsObj);
  680. }
  681. })
  682. this.problemList = result;
  683. this.changeSup(this.editId)
  684. }
  685. })
  686. },
  687. getYanZhongChengDu(){
  688. request.post('/dc/insp/pblms/getByPblms', {
  689. inspPblmsName:this.wenTiLeiBie,
  690. checkPoint:this.jianChaXiangMu,
  691. pblmDesc:this.xiangqingmiaoshu,
  692. type: this.pType
  693. }).then(res => {
  694. if (res.success) {
  695. this.changeSupervision.inspPblmCate=res.data.inspPblmCate;
  696. this.changeSupervision.score = res.data.score;
  697. }
  698. })
  699. },
  700. problemListChange: function (item) {
  701. this.t1 = item
  702. this.wenTiLeiBie = item.inspPblmsName;
  703. this.currentCheckPointList = item.checkPoints;
  704. },
  705. currentCheckPointListChange: function (item) {
  706. this.jianChaXiangMu = item.checkPointName;
  707. this.currentProblemDescList = item.pblmDescs;
  708. },
  709. currentProblemDescListChange: function (item) {
  710. this.xiangqingmiaoshu = item.pblmDesc;
  711. console.log(item);
  712. },
  713. },
  714. watch:{
  715. editId(val){
  716. this.changeSup(val)
  717. },
  718. 't3': {
  719. handler: function (val, oldVal) {
  720. this.getYanZhongChengDu()
  721. },
  722. deep: true
  723. },
  724. }
  725. }
  726. </script>
  727. <style scoped lang="scss">
  728. .scroll_wrapper{
  729. overflow: hidden;
  730. }
  731. .scroll_wrapper .el-form{
  732. padding-top: 5px;
  733. padding-right: 5px;
  734. }
  735. .upload-container {
  736. width: 100%;
  737. position: relative;
  738. .image-uploader {
  739. width: 35%;
  740. float: left;
  741. }
  742. .image-preview {
  743. width: 200px;
  744. height: 200px;
  745. position: relative;
  746. border: 1px dashed #d9d9d9;
  747. float: left;
  748. // margin-left: 50px;
  749. .image-preview-wrapper {
  750. position: relative;
  751. width: 100%;
  752. height: 100%;
  753. img {
  754. width: 100%;
  755. height: 100%;
  756. }
  757. }
  758. .image-preview-action {
  759. position: absolute;
  760. width: 100%;
  761. height: 30px;
  762. left: 0;
  763. bottom: 0;
  764. color: #fff;
  765. opacity: 0;
  766. font-size: 20px;
  767. background-color: rgba(0, 0, 0, 0.5);
  768. transition: opacity 0.3s;
  769. cursor: pointer;
  770. text-align: center;
  771. line-height: 30px;
  772. .el-icon-delete {
  773. font-size: 25px;
  774. }
  775. }
  776. &:hover {
  777. .image-preview-action {
  778. opacity: 1;
  779. }
  780. }
  781. }
  782. .image-app-preview {
  783. margin-bottom: 10px;
  784. width: 40vh;
  785. height: 180px;
  786. position: relative;
  787. border: 1px dashed #d9d9d9;
  788. float: left;
  789. // margin-left: 50px;
  790. .app-fake-conver {
  791. height: 44px;
  792. position: absolute;
  793. width: 100%; // background: rgba(0, 0, 0, .1);
  794. text-align: center;
  795. line-height: 64px;
  796. color: #fff;
  797. }
  798. }
  799. }
  800. </style>