ea9504aa88c8dcdb9aefe63e937d650cb2a1f121.svn-base 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  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 :readonly="true"></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. console.log(this.objId)
  380. this.getproblemSmallType();
  381. this.changeSup(this.editId);
  382. },
  383. methods:{
  384. // 修改弹窗显示
  385. changeSup(id,deleteUpdate) {
  386. this.pictureArray = [];
  387. this.audioArray = [];
  388. this.videoArray = [];
  389. this.fileArray = [];
  390. this.updateIdXiuGai = id;
  391. let _this = this
  392. showDetailsXq(this.updateIdXiuGai).then(res => {
  393. // if(this.usersId==)
  394. this.changeSupervision = res.data;
  395. this.t1['inspPblmsName'] = this.changeSupervision.inspPblmsName
  396. this.problemList.forEach(ele=>{
  397. if(ele.inspPblmsName == _this.t1.inspPblmsName){
  398. _this.problemListChange(ele)
  399. }
  400. })
  401. this.t2['checkPointName'] = this.changeSupervision.checkPoint
  402. this.currentCheckPointList.forEach(ele=>{
  403. if(ele.checkPointName == _this.t2.checkPointName){
  404. _this.currentCheckPointListChange(ele)
  405. }
  406. })
  407. this.t3['pblmDesc'] = this.changeSupervision.pblmDesc
  408. // 当删掉最后一个多媒体文件后,更新一下提交信息(解决删掉多媒体文件后台没有更改状态的问题 record by wby)
  409. if(deleteUpdate && !res.data.gwComFiles.length){
  410. this.changeSupervisionInfo()
  411. }
  412. res.data.gwComFiles.forEach(item => {
  413. if (
  414. item.fileExt == "mp3" ||
  415. item.fileExt == "MP3" ||
  416. item.fileExt == "m4a"
  417. ) {
  418. this.audioArray.push(item);
  419. } else if (
  420. item.fileExt == "jpg" ||
  421. item.fileExt == "JPG" ||
  422. item.fileExt == "png" ||
  423. item.fileExt == "PNG" ||
  424. item.fileExt == "JPEG" ||
  425. item.fileExt == "jpeg"
  426. ) {
  427. this.pictureArray.push(item);
  428. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  429. this.videoArray.push({
  430. id: item.id,
  431. bizId: item.bizId,
  432. width: "130",
  433. height: "130",
  434. autoplay: false,
  435. muted: true,
  436. language: "en",
  437. playbackRates: [0.7, 1.0, 1.5, 2.0],
  438. sources: [
  439. {
  440. type: "video/mp4",
  441. src: this.hostUrl + item.filePath
  442. }
  443. ]
  444. });
  445. } else {
  446. this.fileArray.push(item);
  447. }
  448. });
  449. _this.$nextTick(function(){
  450. var ViewerDom = document.getElementById('imgView');
  451. var viewer = new Viewer(ViewerDom, {})
  452. });
  453. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  454. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  455. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  456. this.filetabName = "其它资料(" + this.fileArray.length + ")";
  457. });
  458. },
  459. // 提交修改信息
  460. changeSupervisionInfo() {
  461. // //debugger
  462. console.log(this)
  463. var _self = this;
  464. this.$refs.changeSupFrom.validate(valid => {
  465. if (valid) {
  466. _self.changeSupervisionLoading = true;
  467. _self.changeSupervision.pblmDesc = _self.xiangqingmiaoshu
  468. _self.changeSupervision.checkPoint = _self.jianChaXiangMu
  469. _self.changeSupervision.inspPblmName = _self.wenTiLeiBie
  470. _self.changeSupervision.inspPlbmType = _self.t2.sort2;
  471. _self.changeSupervision.inspPblmCode = _self.t3.sn;
  472. _self.changeSupervision.pblmsTypeId = _self.t3.guid;
  473. let data = _self.changeSupervision;
  474. updatelist(data).then(res => {
  475. _self.pblmId = res.data.pblmId;
  476. _self.gwComFiles = res.data.gwComFiles;
  477. if (res.success) {
  478. if (_self.$refs.uploadFile.submitUpload(data.pblmId)) {
  479. _self.removeNewSupervision();
  480. _self.successInfo();
  481. _self.addPicPanel = false;
  482. _self.changeSupervisionLoading = false;
  483. }
  484. } else {
  485. _self.failInfo();
  486. _self.$emit('closeEditDialog')
  487. }
  488. });
  489. }
  490. });
  491. },
  492. removeNewSupervision(arg) {
  493. if (arg) {
  494. var args = this.gwComFiles.concat(arg);
  495. }
  496. this.changeSup(this.editId)
  497. this.gwComFiles = [];
  498. this.$emit('closeEditDialog','success')
  499. },
  500. changeSupervisionVisiblefalse() {
  501. this.$emit('closeEditDialog')
  502. this.$refs.uploadFile.init();
  503. this.addPicPanel = false;
  504. },
  505. addPic() {
  506. this.addPicPanel = !this.addPicPanel;
  507. },
  508. // 删除图片文件
  509. removeFile(id, index) {
  510. // this.updateIdXiuGai = this.updateIdXiuGai;
  511. var _self = this;
  512. this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
  513. confirmButtonText: "确定",
  514. cancelButtonText: "返回",
  515. type: "warning"
  516. }).then(
  517. res => {
  518. if (res === "confirm") {
  519. deleteFileById(id, this.persId).then(res => {
  520. if (res.success) {
  521. this.changeSupervision.gwComFiles.forEach(item => {
  522. if (
  523. item.fileExt == "mp3" ||
  524. item.fileExt == "MP3" ||
  525. item.fileExt == "m4a"
  526. ) {
  527. this.audioArray.splice(index, 1);
  528. } else if (
  529. item.fileExt == "jpg" ||
  530. item.fileExt == "JPG" ||
  531. item.fileExt == "png" ||
  532. item.fileExt == "PNG" ||
  533. item.fileExt == "JPEG" ||
  534. item.fileExt == "jpeg"
  535. ) {
  536. this.pictureArray.splice(index, 1);
  537. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  538. this.videoArray.splice(index, 1);
  539. }
  540. });
  541. _self.changeSup(this.updateIdXiuGai,'deleteUpdate');
  542. } else {
  543. this.failInfo();
  544. }
  545. });
  546. }
  547. },
  548. res => {
  549. console.log("返回");
  550. }
  551. )
  552. },
  553. // 操作成功反馈
  554. successInfo() {
  555. this.$message({
  556. type: "success",
  557. message: "操作成功!"
  558. });
  559. },
  560. // 操作失败反馈
  561. failInfo(val) {
  562. this.$message.error(val);
  563. },
  564. // 文件上传
  565. submitUpload() {
  566. this.$refs.upload.submit();
  567. },
  568. closeModal(){
  569. this.$emit('closeEditDialog')
  570. },
  571. getproblemSmallType() {
  572. if(this.pType=='128'){
  573. let result = [];
  574. request.get(`/dc/insp/pblms/listByObjId/${this.objId}`).then(res => {
  575. if (res.success) {
  576. res.data.forEach((ele) => {
  577. let haveinspPblmsName = false;
  578. result.forEach((inspPblm) => {
  579. if (inspPblm['inspPblmsName'] == ele.inspPblmsName) {
  580. //
  581. let havechekPoint = false;
  582. inspPblm['checkPoints'].forEach((chekPoint) => {
  583. if (chekPoint['checkPointName'] == ele.checkPoint) {
  584. //
  585. chekPoint['pblmDescs'].push({
  586. pblmDesc: ele.pblmDesc,
  587. sn: ele.sn,
  588. guid: ele.guid,
  589. });
  590. havechekPoint = true;
  591. }
  592. });
  593. if (!havechekPoint) {
  594. let newCheckPoint = {};
  595. newCheckPoint['checkPointName'] = ele.checkPoint;
  596. newCheckPoint['sort2'] = ele.sort2;
  597. newCheckPoint['pblmDescs'] = [{
  598. pblmDesc: ele.pblmDesc,
  599. sn: ele.sn,
  600. guid: ele.guid,
  601. }]
  602. inspPblm['checkPoints'].push(newCheckPoint);
  603. }
  604. haveinspPblmsName = true;
  605. }
  606. });
  607. if (!haveinspPblmsName) {
  608. let haveinspPblmsObj = {};
  609. haveinspPblmsObj['inspPblmsName'] = ele.inspPblmsName;
  610. haveinspPblmsObj['sort1'] = ele.sort1;
  611. haveinspPblmsObj['checkPoints'] = [{
  612. checkPointName: ele.checkPoint,
  613. sort2: ele.sort2,
  614. pblmDescs: [{
  615. pblmDesc: ele.pblmDesc,
  616. sn: ele.sn,
  617. guid: ele.guid,
  618. }]
  619. }];
  620. result.push(haveinspPblmsObj);
  621. }
  622. })
  623. this.problemList = result;
  624. this.changeSup(this.editId)
  625. }
  626. })
  627. return;
  628. }
  629. let result = [];
  630. request.get('/dc/insp/pblms/getPblmType', {
  631. params: {
  632. type: this.pType
  633. }
  634. }).then(res => {
  635. if (res.success) {
  636. res.data.forEach((ele) => {
  637. let haveinspPblmsName = false;
  638. result.forEach((inspPblm) => {
  639. if (inspPblm['inspPblmsName'] == ele.inspPblmsName) {
  640. //
  641. let havechekPoint = false;
  642. inspPblm['checkPoints'].forEach((chekPoint) => {
  643. if (chekPoint['checkPointName'] == ele.checkPoint) {
  644. //
  645. chekPoint['pblmDescs'].push({
  646. pblmDesc: ele.pblmDesc,
  647. sn: ele.sn,
  648. guid: ele.guid,
  649. });
  650. havechekPoint = true;
  651. }
  652. });
  653. if (!havechekPoint) {
  654. let newCheckPoint = {};
  655. newCheckPoint['checkPointName'] = ele.checkPoint;
  656. newCheckPoint['sort2'] = ele.sort2;
  657. newCheckPoint['pblmDescs'] = [{
  658. pblmDesc: ele.pblmDesc,
  659. sn: ele.sn,
  660. guid: ele.guid,
  661. }]
  662. inspPblm['checkPoints'].push(newCheckPoint);
  663. }
  664. haveinspPblmsName = true;
  665. }
  666. });
  667. if (!haveinspPblmsName) {
  668. let haveinspPblmsObj = {};
  669. haveinspPblmsObj['inspPblmsName'] = ele.inspPblmsName;
  670. haveinspPblmsObj['sort1'] = ele.sort1;
  671. haveinspPblmsObj['checkPoints'] = [{
  672. checkPointName: ele.checkPoint,
  673. sort2: ele.sort2,
  674. pblmDescs: [{
  675. pblmDesc: ele.pblmDesc,
  676. sn: ele.sn,
  677. guid: ele.guid,
  678. }]
  679. }];
  680. result.push(haveinspPblmsObj);
  681. }
  682. })
  683. this.problemList = result;
  684. this.changeSup(this.editId)
  685. }
  686. })
  687. },
  688. getYanZhongChengDu(){
  689. request.post('/dc/insp/pblms/getByPblms', {
  690. inspPblmsName:this.wenTiLeiBie,
  691. checkPoint:this.jianChaXiangMu,
  692. pblmDesc:this.xiangqingmiaoshu,
  693. type: this.pType
  694. }).then(res => {
  695. if (res.success) {
  696. this.changeSupervision.inspPblmCate=res.data.inspPblmCate;
  697. this.changeSupervision.score = res.data.score;
  698. }
  699. })
  700. },
  701. problemListChange: function (item) {
  702. this.t1 = item
  703. this.wenTiLeiBie = item.inspPblmsName;
  704. this.currentCheckPointList = item.checkPoints;
  705. },
  706. currentCheckPointListChange: function (item) {
  707. this.jianChaXiangMu = item.checkPointName;
  708. this.currentProblemDescList = item.pblmDescs;
  709. },
  710. currentProblemDescListChange: function (item) {
  711. this.xiangqingmiaoshu = item.pblmDesc;
  712. console.log(item);
  713. },
  714. },
  715. watch:{
  716. editId(val){
  717. this.changeSup(val)
  718. },
  719. 't3': {
  720. handler: function (val, oldVal) {
  721. this.getYanZhongChengDu()
  722. },
  723. deep: true
  724. },
  725. }
  726. }
  727. </script>
  728. <style scoped lang="scss">
  729. .scroll_wrapper{
  730. overflow: hidden;
  731. }
  732. .scroll_wrapper .el-form{
  733. padding-top: 5px;
  734. padding-right: 5px;
  735. }
  736. .upload-container {
  737. width: 100%;
  738. position: relative;
  739. .image-uploader {
  740. width: 35%;
  741. float: left;
  742. }
  743. .image-preview {
  744. width: 200px;
  745. height: 200px;
  746. position: relative;
  747. border: 1px dashed #d9d9d9;
  748. float: left;
  749. // margin-left: 50px;
  750. .image-preview-wrapper {
  751. position: relative;
  752. width: 100%;
  753. height: 100%;
  754. img {
  755. width: 100%;
  756. height: 100%;
  757. }
  758. }
  759. .image-preview-action {
  760. position: absolute;
  761. width: 100%;
  762. height: 30px;
  763. left: 0;
  764. bottom: 0;
  765. color: #fff;
  766. opacity: 0;
  767. font-size: 20px;
  768. background-color: rgba(0, 0, 0, 0.5);
  769. transition: opacity 0.3s;
  770. cursor: pointer;
  771. text-align: center;
  772. line-height: 30px;
  773. .el-icon-delete {
  774. font-size: 25px;
  775. }
  776. }
  777. &:hover {
  778. .image-preview-action {
  779. opacity: 1;
  780. }
  781. }
  782. }
  783. .image-app-preview {
  784. margin-bottom: 10px;
  785. width: 40vh;
  786. height: 180px;
  787. position: relative;
  788. border: 1px dashed #d9d9d9;
  789. float: left;
  790. // margin-left: 50px;
  791. .app-fake-conver {
  792. height: 44px;
  793. position: absolute;
  794. width: 100%; // background: rgba(0, 0, 0, .1);
  795. text-align: center;
  796. line-height: 64px;
  797. color: #fff;
  798. }
  799. }
  800. }
  801. </style>