8afc2fbd58345a7e1fe0dd21072a673c797afea6.svn-base 43 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043
  1. <template>
  2. <!-- 修改弹框 -->
  3. <el-dialog
  4. width="60%"
  5. class="custom_dialog"
  6. title="修改督查问题"
  7. @close="closeModal"
  8. :visible.sync="changeSupervisionVisible">
  9. <div class="scroll_wrapper">
  10. <div
  11. style="width:49%;overflow-y:auto;max-height:58vh;float:left;border:1px solid #d5d5ff;margin-right:5px;">
  12. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">基本信息</p>
  13. <el-form ref="changeSupFrom" :rules="rules1" :model="problemForm" label-width="120px">
  14. <el-form-item label="工程名称" prop="nm">
  15. <el-input v-model="problemForm.nm" clearable :readonly="true"></el-input>
  16. </el-form-item>
  17. <el-form-item label="问题类别">
  18. <el-select v-model="problemForm.problemType" @change="problemTypeChange">
  19. <el-option :label="item.pblmType" :value="item.pblmType" v-for="(item,index) in problemType" :key="index"></el-option>
  20. </el-select>
  21. </el-form-item>
  22. <el-form-item label="问题描述" required>
  23. <el-input
  24. :autosize="{ minRows: 4, maxRows: 6}"
  25. type="textarea"
  26. v-model="problemForm.inspPblmDesc"
  27. clearable
  28. ></el-input>
  29. </el-form-item>
  30. <el-form-item :label="weigui.pblmPoint" v-show="weigui.pblmRelDics.length">
  31. <el-select v-model="problemForm.weigui" @change="selectWeiguiChange">
  32. <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in weigui.pblmRelDics" :key="index"></el-option>
  33. </el-select>
  34. <!-- <div style="width: 380px;float:right">
  35. <span>问题序号</span>
  36. <el-input type="text" style="width: 100px;" @focus="showPblmList(weigui,problemForm.weigui,'违规')" v-model="weigui.pblmSn"></el-input><br>
  37. <my-cascader :pblmDescList="pblmDescList" v-if="chooseWeiguiProblem" @sendPblmsTypeIdWeigui="sendPblmsTypeIdWeigui"></my-cascader>
  38. </div> -->
  39. </el-form-item>
  40. <el-form-item label="问题序号" v-show="weigui.pblmRelDics.length">
  41. <el-input type="text" style="width: 100px;" @focus="showPblmList(weigui,problemForm.weigui,'违规')" v-model="weigui.pblmSn"></el-input><br>
  42. <my-cascader :pblmDescList="pblmDescList" v-if="chooseWeiguiProblem" @sendPblmsTypeIdWeigui="sendPblmsTypeIdWeigui"></my-cascader>
  43. </el-form-item>
  44. <!-- -->
  45. <el-form-item :label="hetong.pblmPoint" v-show="hetong.pblmRelDics.length">
  46. <el-select v-model="problemForm.hetong" @change="selectHetongChange">
  47. <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in hetong.pblmRelDics" :key="index"></el-option>
  48. </el-select>
  49. <!-- <div style="width: 380px;float:right">
  50. <span>问题序号</span>
  51. <el-input type="text" style="width: 100px;" @focus="showPblmList(hetong,problemForm.hetong,'合同')" readonly v-model="hetong.pblmSn"></el-input><br>
  52. <my-cascader-hetong :pblmDescList="pblmDescListHetong" v-if="chooseHeTongProblem" @sendPblmsTypeIdHetong="sendPblmsTypeIdHetong"></my-cascader-hetong>
  53. </div> -->
  54. </el-form-item>
  55. <el-form-item label="问题序号" v-show="hetong.pblmRelDics.length">
  56. <el-input type="text" style="width: 100px;" @focus="showPblmList(hetong,problemForm.hetong,'合同')" readonly v-model="hetong.pblmSn"></el-input><br>
  57. <my-cascader-hetong :pblmDescList="pblmDescListHetong" v-if="chooseHeTongProblem" @sendPblmsTypeIdHetong="sendPblmsTypeIdHetong"></my-cascader-hetong>
  58. </el-form-item>
  59. <!-- -->
  60. <el-form-item :label="quanlity.pblmPoint" v-show="quanlity.pblmRelDics.length">
  61. <el-select v-model="problemForm.quanlity" @change="selectQuanlityChange">
  62. <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in quanlity.pblmRelDics" :key="index"></el-option>
  63. </el-select>
  64. <!-- <div style="width: 380px;float:right">
  65. <span>问题序号</span>
  66. <el-input type="text" style="width: 100px;" @focus="showPblmList(quanlity,problemForm.quanlity,'质量')" readonly v-model="quanlity.pblmSn"></el-input><br>
  67. <my-cascader :pblmDescList="pblmDescList" v-if="chooseQuanlityProblem" @sendPblmsTypeIdQuanlity="sendPblmsTypeIdQuanlity"></my-cascader>
  68. </div> -->
  69. </el-form-item>
  70. <el-form-item label="问题序号" v-show="quanlity.pblmRelDics.length">
  71. <el-input type="text" style="width: 100px;" @focus="showPblmList(quanlity,problemForm.quanlity,'质量')" readonly v-model="quanlity.pblmSn"></el-input><br>
  72. <my-cascader :pblmDescList="pblmDescList" v-if="chooseQuanlityProblem" @sendPblmsTypeIdQuanlity="sendPblmsTypeIdQuanlity"></my-cascader>
  73. </el-form-item>
  74. <!-- -->
  75. <el-form-item :label="gongcheng.pblmPoint" v-show="gongcheng.pblmRelDics.length">
  76. <el-select v-model="problemForm.gongcheng" @change="selectGongchengChange">
  77. <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in gongcheng.pblmRelDics" :key="index"></el-option>
  78. </el-select>
  79. <!-- <div style="width: 380px;float:right">
  80. <span>问题序号</span>
  81. <el-input type="text" style="width: 100px;" @focus="showPblmList(gongcheng,problemForm.gongcheng,'工程')" readonly v-model="gongcheng.pblmSn"></el-input><br>
  82. <my-cascader :pblmDescList="pblmDescList" v-if="chooseGongchengProblem" @sendPblmsTypeIdGongcheng="sendPblmsTypeIdGongcheng"></my-cascader>
  83. </div> -->
  84. </el-form-item>
  85. <el-form-item label="问题序号" v-show="gongcheng.pblmRelDics.length">
  86. <el-input type="text" style="width: 100px;" @focus="showPblmList(gongcheng,problemForm.gongcheng,'工程')" readonly v-model="gongcheng.pblmSn"></el-input><br>
  87. <my-cascader :pblmDescList="pblmDescList" v-if="chooseGongchengProblem" @sendPblmsTypeIdGongcheng="sendPblmsTypeIdGongcheng"></my-cascader>
  88. </el-form-item>
  89. <el-form-item label="严重程度:">
  90. <el-select
  91. v-model="problemForm.inspPblmCate"
  92. disabled
  93. clearable
  94. placeholder="请选择">
  95. <el-option
  96. v-for="item in supervisionState"
  97. :key="item.value"
  98. :label="item.label"
  99. :value="item.value"
  100. ></el-option>
  101. </el-select>
  102. </el-form-item>
  103. <el-form-item label="是否为典型问题:">
  104. <el-select v-model="problemForm.ifCasePblm" clearable placeholder="请选择">
  105. <el-option
  106. v-for="item in supervision"
  107. :key="item.value"
  108. :label="item.label"
  109. :value="item.value"
  110. ></el-option>
  111. </el-select>
  112. </el-form-item>
  113. </el-form>
  114. </div>
  115. <div
  116. style="width: 49%;float: left;border: 1px solid rgb(213, 213, 255);margin-right: 5px;overflow-y: auto;max-height: 58vh;">
  117. <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">多媒体信息</p>
  118. <el-tabs style="margin:0px 5px">
  119. <el-tab-pane :label="picturetabName">
  120. <el-row style="text-align:right;">
  121. <el-button
  122. :v-if="!addPicPanel?addPicPanel:addPicPanel"
  123. size="mini"
  124. type="text"
  125. :icon="!addPicPanel?'el-icon-circle-plus-outline':'el-icon-circle-close-outline'"
  126. @click="addPic"
  127. >{{!addPicPanel?"添加":"取消"}}</el-button>
  128. </el-row>
  129. <el-row v-show="addPicPanel">
  130. <upload
  131. ref="uploadFile"
  132. :url="`/pdcApi/file/insert?bizId=`"
  133. @uploadOver="removeNewSupervision"
  134. ></upload>
  135. </el-row>
  136. <el-row>
  137. <div style="overflow-y:auto;overflow-x:hidden;max-height:30vh;padding:10px;">
  138. <div class="upload-container" id="imgView1">
  139. <div
  140. v-for="(item, index) in pictureArray"
  141. :key="index"
  142. class="image-preview image-app-preview"
  143. >
  144. <div class="image-preview-wrapper">
  145. <img :src="`${hostUrl}/${item.filePath}`">
  146. <div class="image-preview-action">
  147. <i @click="removeFile(item.id)" class="el-icon-delete"></i>
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. </el-row>
  154. </el-tab-pane>
  155. <el-tab-pane :label="audiotabName">
  156. <el-table border :data="audioArray" style="width: 100%;margin: 0 auto;">
  157. <el-table-column header-align="center" align="center" label="音频">
  158. <template slot-scope="scope">
  159. <elaudio
  160. style="margin-left:15%;width:100px;height:30px;"
  161. :theUrl="`${hostUrl}/${scope.row.filePath}`"
  162. ></elaudio>
  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="videotabName">
  177. <el-table border :data="videoArray" style="width: 100%;margin: 0 auto;">
  178. <el-table-column header-align="center" align="center" label="视频">
  179. <template slot-scope="scope">
  180. <video-player
  181. class="vjs-custom-skin"
  182. ref="videoPlayer"
  183. :options="scope.row"
  184. :playsinline="true"
  185. ></video-player>
  186. </template>
  187. </el-table-column>
  188. <el-table-column header-align="center" align="center" label="操作">
  189. <template slot-scope="scope">
  190. <el-button
  191. size="mini"
  192. @click="removeFile(scope.row.id,scope.$index)"
  193. type="danger"
  194. >删除</el-button>
  195. </template>
  196. </el-table-column>
  197. </el-table>
  198. </el-tab-pane>
  199. <el-tab-pane :label="filetabName">
  200. <el-table border :data="fileArray" style="width: 100%;margin: 0 auto;">
  201. <el-table-column header-align="center" align="center" label="文档">
  202. <template slot-scope="scope">
  203. <p>
  204. <a :href="`${hostUrl}/${scope.row.filePath}`" target="_blank" rel="noopener noreferrer">
  205. {{scope.row.fileName}}
  206. </a>
  207. </p>
  208. </template>
  209. </el-table-column>
  210. <el-table-column header-align="center" align="center" label="操作">
  211. <template slot-scope="scope">
  212. <el-button
  213. size="mini"
  214. @click="removeFile(scope.row.id,scope.$index)"
  215. type="danger"
  216. >删除</el-button>
  217. </template>
  218. </el-table-column>
  219. </el-table>
  220. </el-tab-pane>
  221. <el-tab-pane label="问题确认单">
  222. <pblmConfirmShett :openType="true" :currentObjectId="problemForm.objId" :key="problemForm.objId"></pblmConfirmShett>
  223. </el-tab-pane>
  224. </el-tabs>
  225. </div>
  226. </div>
  227. <span slot="footer">
  228. <el-button type="primary" @click="onSubmit">保存</el-button>
  229. <el-button @click="closeModal">取消</el-button>
  230. </span>
  231. </el-dialog>
  232. </template>
  233. <script>
  234. import {showDetailsXq,updatelist,deleteFileById} from "../../../api/duChaAPI.js";
  235. import {formatDateTime2} from '../../../utils/gw_date.js'
  236. import request from '../../../utils/gw_ajax_request.js'
  237. import myCascader from './problemList.vue'
  238. import myCascaderHetong from './problemList.vue'
  239. import {hostUrl} from "@util/global_variable.js";
  240. import Viewer from 'viewerjs';
  241. import 'viewerjs/dist/viewer.css';
  242. export default {
  243. props: ['projectType','problemId','villType','unitProblemInfo','unitLevel'],
  244. data(){
  245. return{
  246. changeSupervisionVisible: true,
  247. changeSupervisionLoading: false,
  248. problemForm: {},
  249. rules1: {
  250. inspPblmName: [
  251. {
  252. required: true,
  253. message: "请输入问题名称",
  254. trigger: "blur"
  255. },
  256. {
  257. min: 1,
  258. max: 999,
  259. message: "不超过100字符",
  260. trigger: "blur"
  261. }
  262. ],
  263. inspPblmDesc: [
  264. {
  265. required: true,
  266. message: "请输入问题描述",
  267. trigger: "blur"
  268. }
  269. ],
  270. recPers: [
  271. {
  272. required: true,
  273. message: "请输入记录人",
  274. trigger: "blur"
  275. },
  276. {
  277. min: 1,
  278. max: 999,
  279. message: "不超过100字符",
  280. trigger: "blur"
  281. }
  282. ],
  283. objType: [
  284. {
  285. required: true,
  286. message: "请选择督查对象类型",
  287. trigger: "change"
  288. }
  289. ],
  290. objId: [
  291. {
  292. required: true,
  293. message: "请选择督查对象类型",
  294. trigger: "change"
  295. }
  296. ],
  297. inspPblmType: [
  298. {
  299. required: true,
  300. message: "请选择督查问题类型",
  301. trigger: "change"
  302. }
  303. ],
  304. dataStat: [
  305. {
  306. required: true,
  307. message: "请选择数据状态",
  308. trigger: "change"
  309. }
  310. ],
  311. collTime: [
  312. {
  313. required: true,
  314. message: "请选择采集时间",
  315. trigger: "change"
  316. }
  317. ],
  318. ifCasePblm: [
  319. {
  320. required: true,
  321. message: "请选择是否典型",
  322. trigger: "change"
  323. }
  324. ],
  325. pblmStat: [
  326. {
  327. required: true,
  328. message: "请选择问题类型",
  329. trigger: "change"
  330. }
  331. ],
  332. inspPblmCate: [
  333. {
  334. required: true,
  335. message: "请选择问题程度",
  336. trigger: "change"
  337. },
  338. {
  339. trigger: "change"
  340. }
  341. ]
  342. },
  343. supervisionState: [
  344. {
  345. value: "0",
  346. label: "一般"
  347. },
  348. {
  349. value: "1",
  350. label: "较重"
  351. },
  352. {
  353. value: "2",
  354. label: "严重"
  355. },
  356. {
  357. value: "3",
  358. label: "特别严重"
  359. }
  360. ],
  361. supervision: [
  362. {
  363. value: "1",
  364. label: "是"
  365. },
  366. {
  367. value: "0",
  368. label: "否"
  369. }
  370. ],
  371. addPicPanel: false,
  372. gwComFiles: [],
  373. picturetabName: "",
  374. audiotabName: "",
  375. videotabName: "",
  376. filetabName: "",
  377. pictureArray: [],
  378. audioArray: [],
  379. videoArray: [],
  380. fileArray: [],
  381. updateIdXiuGai: "",
  382. pblmId: "",
  383. weigui: {
  384. pblmRelDics: [],
  385. pblmSn: ''
  386. },
  387. hetong: {
  388. pblmRelDics: [],
  389. pblmSn: ''
  390. },
  391. quanlity: {
  392. pblmRelDics: [],
  393. pblmSn: ''
  394. },
  395. gongcheng: {
  396. pblmRelDics: [],
  397. pblmSn: ''
  398. },
  399. problemType: [
  400. {name: '违规行为',value:'1'},
  401. {name: '质量缺陷',value:'2'},
  402. {name: '合同问题',value:'3'}
  403. ],
  404. problemStatus: [
  405. {name: '已复查',value:'2'},
  406. {name: '未复查',value:'1'},
  407. {name: '新问题',value:'0'}
  408. ],
  409. rectifyStatus: [
  410. {name: '未整改',value:'0'},
  411. {name: '整改中',value:'1'},
  412. {name: '已整改',value:'2'}
  413. ],
  414. severity:[
  415. {name: '一般',value:'0'},
  416. {name: '较重',value:'1'},
  417. {name: '严重',value:'2'},
  418. {name: '非常严重',value:'3'}
  419. ],
  420. problemForm:{
  421. objId: '',
  422. objType: '',
  423. problemType: '',
  424. inspPblmDesc: '',
  425. pblmsTypeId: '',
  426. qualityTypeId: '',
  427. pblmsId: '',
  428. defectTypeId: '',
  429. ifCasePblm: '',
  430. inspPblmCate: '',
  431. weigui: '',
  432. hetong: '',
  433. quanlity: '',
  434. gongcheng: '',
  435. gwComFiles: []
  436. },
  437. rectifyForm: {
  438. rectConc: '',
  439. rectMeas: '',
  440. collTime: '',
  441. gwComFiles: [{
  442. id: "",
  443. filePath: "",
  444. bizId: ""
  445. }]
  446. },
  447. weigui: {
  448. pblmRelDics: [],
  449. pblmSn: ''
  450. },
  451. hetong: {
  452. pblmRelDics: [],
  453. pblmSn: ''
  454. },
  455. quanlity: {
  456. pblmRelDics: [],
  457. pblmSn: ''
  458. },
  459. gongcheng: {
  460. pblmRelDics: [],
  461. pblmSn: ''
  462. },
  463. pblmPointNum: '',
  464. pblmDescList: '',
  465. pblmDescListHetong: '',
  466. pblmAttach: [],
  467. pblmsTypeId: '',
  468. dialogType: '修改',
  469. dialogVisible: true,
  470. recheck_dialogVisible: false,
  471. chooseWeiguiProblem: false,
  472. chooseHeTongProblem: false,
  473. chooseQuanlityProblem: false,
  474. chooseGongchengProblem: false,
  475. checked: false,
  476. supervisionDetailsVisible:false,
  477. reviConc: '',
  478. findTime: [],
  479. rectifyRow: {},
  480. isRectify: false,
  481. rectifyId: '',
  482. }
  483. },
  484. components:{
  485. upload: resolve => {
  486. require(["../../../widgets/uploadFile.vue"], resolve);
  487. },
  488. pblmConfirmShett: resolve => {
  489. require(["../../duChaDuiXiang/pblmConfirmShett"], resolve);
  490. },
  491. myCascader: myCascader,
  492. myCascaderHetong: myCascaderHetong,
  493. },
  494. computed:{
  495. hostUrl(){
  496. return hostUrl
  497. },
  498. persId() {
  499. return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
  500. },
  501. formatDateTime(){
  502. return formatDateTime2
  503. }
  504. },
  505. mounted(){
  506. this.getSingleProData()
  507. // this.listPblmType()
  508. },
  509. methods:{
  510. removeNewSupervision(arg) {
  511. if (arg) {
  512. var args = this.gwComFiles.concat(arg);
  513. }
  514. this.gwComFiles = [];
  515. this.$emit('closeEditDialog')
  516. },
  517. changeSupervisionVisiblefalse() {
  518. this.$emit('closeEditDialog')
  519. this.$refs.uploadFile.init();
  520. this.addPicPanel = false;
  521. },
  522. addPic() {
  523. this.addPicPanel = !this.addPicPanel;
  524. },
  525. // 删除图片文件
  526. removeFile(id, index) {
  527. // this.updateIdXiuGai = this.updateIdXiuGai;
  528. var _self = this;
  529. this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
  530. confirmButtonText: "确定",
  531. cancelButtonText: "返回",
  532. type: "warning"
  533. }).then(
  534. res => {
  535. if (res === "confirm") {
  536. deleteFileById(id, this.persId).then(res => {
  537. if (res.success) {
  538. this.problemForm.gwComFiles.forEach(item => {
  539. if (
  540. item.fileExt == "mp3" ||
  541. item.fileExt == "MP3" ||
  542. item.fileExt == "m4a"
  543. ) {
  544. this.audioArray.splice(index, 1);
  545. } else if (
  546. item.fileExt == "jpg" ||
  547. item.fileExt == "JPG" ||
  548. item.fileExt == "png" ||
  549. item.fileExt == "PNG" ||
  550. item.fileExt == "JPEG" ||
  551. item.fileExt == "jpeg"
  552. ) {
  553. this.pictureArray.splice(index, 1);
  554. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  555. this.videoArray.splice(index, 1);
  556. }
  557. });
  558. _self.getSingleProData();
  559. } else {
  560. this.failInfo();
  561. }
  562. });
  563. }
  564. },
  565. res => {
  566. console.log("返回");
  567. }
  568. )
  569. },
  570. // 操作成功反馈
  571. successInfo() {
  572. this.$message({
  573. type: "success",
  574. message: "操作成功!"
  575. });
  576. },
  577. // 操作失败反馈
  578. failInfo(val) {
  579. this.$message.error(val);
  580. },
  581. // 文件上传
  582. submitUpload() {
  583. this.$refs.upload.submit();
  584. },
  585. closeModal(){
  586. this.$emit('closeEditDialog')
  587. },
  588. listPblmType(){
  589. let paramObj = {}
  590. if(this.unitProblemInfo.nature){
  591. paramObj = {
  592. orgType: this.unitProblemInfo.nature,
  593. proType: '1'
  594. }
  595. }else{
  596. paramObj = {
  597. reviOrg: this.unitLevel,
  598. proType: '2'
  599. }
  600. }
  601. request.post(`/obj/key/pblm/listPblmType`, paramObj).then(res => {
  602. if (res.success) {
  603. this.problemType = res.data;
  604. this.problemForm.problemType = this.problemType[0].pblmType
  605. }
  606. });
  607. },
  608. // 标准 附件 序号
  609. convertGroup(){
  610. let paramObj = {}
  611. if(this.unitProblemInfo.nature){
  612. paramObj = {
  613. orgType: this.unitProblemInfo.nature,
  614. proType: '1',
  615. pblmType: this.problemForm.problemType == '0' ? '违规行为' : this.problemForm.problemType == '1' ? '质量缺陷' : this.problemForm.problemType == '2' ? '合同问题' : this.problemForm.problemType == '3' ? '缺陷问题' : this.problemForm.problemType
  616. }
  617. }else{
  618. paramObj = {
  619. reviOrg: this.unitLevel,
  620. proType: '2',
  621. pblmType: this.problemForm.problemType
  622. }
  623. }
  624. this.hetong.pblmRelDics = []
  625. this.weigui.pblmRelDics = []
  626. this.quanlity.pblmRelDics = []
  627. this.gongcheng.pblmRelDics = []
  628. request.post(`/obj/key/pblm/convertGroup`, paramObj).then(res => {
  629. if (res.success) {
  630. this.pblmPointNum = res.data;
  631. this.pblmPointNum.forEach(ele=>{
  632. ele.pblmAttach = ele.pblmAttach.split(',')
  633. // ele.pblmSn = ele.pblmSn.split(',')
  634. if(ele.pblmPoint.indexOf('合同') > -1){
  635. this.hetong = ele
  636. }
  637. if(ele.pblmPoint.indexOf('违规') > -1){
  638. this.weigui = ele
  639. }
  640. if(ele.pblmPoint.indexOf('质量') > -1){
  641. this.quanlity = ele
  642. }
  643. if(ele.pblmPoint.indexOf('工程') > -1){
  644. this.gongcheng = ele
  645. }
  646. })
  647. if(this.weigui.pblmRelDics.length){
  648. this.weigui.pblmRelDics.forEach(ele=>{
  649. if(ele.pblmAttach == this.problemForm.weigui){
  650. this.weigui.pblmSn = ele.pblmSn
  651. }
  652. })
  653. }
  654. if(this.hetong.pblmRelDics.length){
  655. this.hetong.pblmRelDics.forEach(ele=>{
  656. if(ele.pblmAttach == this.problemForm.hetong){
  657. this.hetong.pblmSn = ele.pblmSn
  658. }
  659. })
  660. }
  661. if(this.quanlity.pblmRelDics.length){
  662. this.quanlity.pblmRelDics.forEach(ele=>{
  663. if(ele.pblmAttach == this.problemForm.quanlity){
  664. this.quanlity.pblmSn = ele.pblmSn
  665. }
  666. })
  667. }
  668. if(this.gongcheng.pblmRelDics.length){
  669. this.gongcheng.pblmRelDics.forEach(ele=>{
  670. if(ele.pblmAttach == this.problemForm.gongcheng){
  671. this.gongcheng.pblmSn = ele.pblmSn
  672. }
  673. })
  674. }
  675. }
  676. });
  677. },
  678. //具体问题描述列表
  679. showPblmList(obj,attach,type){
  680. type == '违规' ? this.chooseWeiguiProblem = true : type == '合同' ? this.chooseHeTongProblem = true : type == '工程' ? this.chooseGongchengProblem = true : this.chooseQuanlityProblem = true
  681. let paramObj = {}
  682. if(this.unitProblemInfo.nature){
  683. paramObj = {
  684. pblmType: obj.pblmPoint,
  685. // sheetName: obj.reviOrg,
  686. sheetName: obj.pblmPoint,
  687. attachType: obj.proType,
  688. attach: attach,
  689. sn: obj.pblmSn
  690. }
  691. }else{
  692. paramObj = {
  693. pblmType: obj.pblmPoint,
  694. sheetName: obj.pblmPoint,
  695. attachType: obj.proType,
  696. attach: attach,
  697. sn: obj.pblmSn
  698. }
  699. }
  700. request.post(`/obj/key/pblm/pblmsList`, paramObj).then(res => {
  701. if (res.success) {
  702. if(type == '合同'){
  703. this.pblmDescListHetong = res.data;
  704. }else{
  705. this.pblmDescList = res.data;
  706. }
  707. }
  708. });
  709. },
  710. sendPblmsTypeIdWeigui(val){
  711. this.problemForm.pblmsTypeId = val.id
  712. this.problemForm.inspPblmCate = val.inspPblmCate
  713. },
  714. sendPblmsTypeIdHetong(val){
  715. this.problemForm.pblmsId = val.id
  716. this.problemForm.inspPblmCate = val.inspPblmCate
  717. },
  718. sendPblmsTypeIdQuanlity(val){
  719. this.problemForm.qualityTypeId = val.id
  720. this.problemForm.inspPblmCate = val.inspPblmCate
  721. },
  722. sendPblmsTypeIdGongcheng(val){
  723. this.problemForm.defectTypeId = val.id
  724. this.problemForm.inspPblmCate = val.inspPblmCate
  725. },
  726. //获取单条数据
  727. getSingleProData(){
  728. this.dialogType = '修改'
  729. this.pictureArray = [];
  730. this.audioArray = [];
  731. this.videoArray = [];
  732. this.fileArray = [];
  733. var _this = this;
  734. request.get(`/obj/key/pblm/getPblm/${this.problemId}/${this.projectType}`).then(res => {
  735. if(res.success){
  736. this.problemForm = res.data
  737. this.problemForm.problemType = res.data.inspPblmName
  738. this.checked = res.data.ifCasePblm == '1' ? true : false
  739. this.problemForm.hetong = res.data.attachHetong
  740. this.problemForm.weigui = res.data.attachWg
  741. this.problemForm.quanlity = res.data.attachQua
  742. this.problemForm.gongcheng = res.data.attachDef
  743. this.problemForm = res.data;
  744. res.data.gwComFiles.forEach(item => {
  745. if (
  746. item.fileExt == "mp3" ||
  747. item.fileExt == "MP3" ||
  748. item.fileExt == "m4a"
  749. ) {
  750. this.audioArray.push(item);
  751. } else if (
  752. item.fileExt == "jpg" ||
  753. item.fileExt == "JPG" ||
  754. item.fileExt == "png" ||
  755. item.fileExt == "PNG" ||
  756. item.fileExt == "JPEG" ||
  757. item.fileExt == "jpeg"
  758. ) {
  759. this.pictureArray.push(item);
  760. } else if (item.fileExt == "mp4" || item.fileExt == "MP4") {
  761. this.videoArray.push({
  762. id:item.id,
  763. width: "130",
  764. height: "130",
  765. autoplay: false,
  766. muted: true,
  767. language: "en",
  768. playbackRates: [0.7, 1.0, 1.5, 2.0],
  769. sources: [
  770. {
  771. type: "video/mp4",
  772. src: this.hostUrl + item.filePath
  773. }
  774. ]
  775. });
  776. } else {
  777. this.fileArray.push(item);
  778. }
  779. });
  780. _this.$nextTick(function(){
  781. var ViewerDom = document.getElementById('imgView1');
  782. var viewer = new Viewer(ViewerDom, {})
  783. });
  784. this.picturetabName = "图片资料(" + this.pictureArray.length + ")";
  785. this.audiotabName = "音频资料(" + this.audioArray.length + ")";
  786. this.videotabName = "视频资料(" + this.videoArray.length + ")";
  787. this.filetabName = "其它资料(" + this.fileArray.length + ")";
  788. }
  789. })
  790. this.chooseQuanlityProblem = false
  791. this.chooseHeTongProblem = false
  792. this.chooseWeiguiProblem = false
  793. this.chooseGongchengProblem = false
  794. },
  795. onSubmit(){
  796. if(!this.problemForm.inspPblmDesc){
  797. this.$message.warning("请输入问题描述")
  798. return;
  799. }
  800. this.isRectify = false
  801. this.problemForm.ifCasePblm = this.checked ? '1' : '0'
  802. this.problemForm.inspPblmName = this.problemForm.problemType
  803. this.problemForm.recPers = this.persId
  804. if(this.weigui.pblmRelDics.length && !this.problemForm.pblmsTypeId){
  805. this.$message.warning('请选择违规附件对应问题')
  806. return
  807. }else if(!this.weigui.pblmRelDics.length){
  808. this.problemForm.pblmsTypeId = ''
  809. }
  810. if(this.hetong.pblmRelDics.length && !this.problemForm.pblmsId && !this.weigui.pblmRelDics.length){
  811. this.$message.warning('请选择合同管理附件对应问题')
  812. return
  813. }else if(!this.hetong.pblmRelDics.length){
  814. this.problemForm.pblmsId = ''
  815. }
  816. if(this.quanlity.pblmRelDics.length && !this.problemForm.qualityTypeId){
  817. this.$message.warning('请选择质量缺陷附件对应问题')
  818. return
  819. }else if(!this.quanlity.pblmRelDics.length){
  820. this.problemForm.qualityTypeId = ''
  821. }
  822. if(this.gongcheng.pblmRelDics.length && !this.problemForm.defectTypeId){
  823. this.$message.warning('请选择工程缺陷附件对应问题')
  824. return
  825. }else if(!this.gongcheng.pblmRelDics.length){
  826. this.problemForm.defectTypeId = ''
  827. }
  828. this.problemForm.problemType = this.problemForm.problemType == '违规行为' ? '0' : this.problemForm.problemType == '质量缺陷' ? '1' : this.problemForm.problemType == '合同问题' ? '2' : '3'
  829. request.post('/dc/insp/pblm/update',this.problemForm).then(res=>{
  830. if (res.success) {
  831. this.gwComFiles = [];
  832. this.pblmStat = res.data.pblmStat;
  833. if (this.$refs.uploadFile.submitUpload(res.data.pblmId)) {
  834. this.removeNewSupervision();
  835. }
  836. this.$message.success('修改成功')
  837. }
  838. })
  839. },
  840. // 复查
  841. toRecheckProblem(row){
  842. this.dialogType = row.reviConc == '1' ? '添加' : row.reviConc == '2' ? '修改' : '添加'
  843. this.rectifyForm.rectConc = row.rectConc
  844. this.rectifyForm.rectMeas = row.rectMeas
  845. Object.assign(this.rectifyRow,row)
  846. if(this.dialogType == '添加'){
  847. this.rectifyForm.collTime = ''
  848. }else{
  849. this.rectifyForm.collTime = this.formatDateTime(row.collTime)
  850. }
  851. this.recheck_dialogVisible = true
  852. },
  853. rectifySubmit(){
  854. this.isRectify = true
  855. this.rectifyForm['recPers'] = this.persId
  856. if(this.dialogType == '添加'){
  857. this.rectifyForm['pblmId'] = this.rectifyRow.pblmId
  858. this.rectifyForm['orgGuid'] = this.rectifyRow.regid
  859. request.post('/dc/insp/rectFdbk',this.rectifyForm).then(res=>{
  860. if (res.success) {
  861. // this.pblmId = res.data.pblmId;
  862. this.pblmId = this.rectifyRow.pblmId
  863. this.gwComFiles = [];
  864. this.pblmStat = res.data.pblmStat;
  865. this.recheck_dialogVisible = false
  866. this.searchList()
  867. if (this.$refs.uploadFile.submitUpload(res.data.guid)) {
  868. this.removeNewSupervision();
  869. }
  870. }
  871. })
  872. }else{
  873. // this.rectifyForm['guid'] = this.rectifyRow.guid
  874. this.rectifyForm['pblmId'] = this.rectifyRow.pblmId
  875. this.rectifyForm['orgGuid'] = this.rectifyRow.regid
  876. this.rectifyForm['id'] = this.rectifyRow.guid
  877. delete this.rectifyForm.collTime
  878. request.post('/dc/insp/rectFdbk',this.rectifyForm).then(res=>{
  879. if (res.success) {
  880. this.pblmId = res.data.guid;
  881. // this.pblmId = this.rectifyRow.pblmId
  882. this.gwComFiles = [];
  883. this.pblmStat = res.data.pblmStat;
  884. this.recheck_dialogVisible = false
  885. this.searchList()
  886. if (this.$refs.uploadFile.submitUpload(res.data.guid)) {
  887. this.removeNewSupervision();
  888. }
  889. }
  890. })
  891. }
  892. },
  893. selectHetongChange(val){
  894. this.$forceUpdate()
  895. let _this = this
  896. this.chooseHeTongProblem = false
  897. this.hetong.pblmRelDics.forEach(ele=>{
  898. if(ele.pblmAttach == val){
  899. _this.hetong.pblmSn = ele.pblmSn
  900. }
  901. })
  902. },
  903. selectWeiguiChange(val){
  904. this.$forceUpdate()
  905. let _this = this
  906. this.chooseWeiguiProblem = false
  907. this.weigui.pblmRelDics.forEach(ele=>{
  908. if(ele.pblmAttach == val){
  909. _this.weigui.pblmSn = ele.pblmSn
  910. }
  911. })
  912. },
  913. selectQuanlityChange(val){
  914. this.$forceUpdate()
  915. let _this = this
  916. this.chooseQuanlityProblem = false
  917. this.quanlity.pblmRelDics.forEach(ele=>{
  918. if(ele.pblmAttach == val){
  919. _this.quanlity.pblmSn = ele.pblmSn
  920. }
  921. })
  922. },
  923. selectGongchengChange(val){
  924. this.$forceUpdate()
  925. let _this = this
  926. this.chooseGongchengProblem = false
  927. this.gongcheng.pblmRelDics.forEach(ele=>{
  928. if(ele.pblmAttach == val){
  929. _this.gongcheng.pblmSn = ele.pblmSn
  930. }
  931. })
  932. },
  933. handleDetailClick(tab, event) {
  934. console.log(tab, event);
  935. },
  936. problemTypeChange(val){
  937. // alert(val)
  938. this.weigui.pblmSn = ''
  939. this.hetong.pblmSn = ''
  940. this.quanlity.pblmSn = ''
  941. this.gongcheng.pblmSn = ''
  942. this.problemForm.weigui = ''
  943. this.problemForm.hetong = ''
  944. this.problemForm.quanlity = ''
  945. this.problemForm.gongcheng = ''
  946. this.chooseHeTongProblem = false
  947. this.chooseWeiguiProblem = false
  948. this.chooseQuanlityProblem = false
  949. this.chooseGongchengProblem = false
  950. },
  951. },
  952. watch:{
  953. 'problemForm.problemType':{
  954. deep: true,
  955. handler(newVal,oldVal){
  956. this.convertGroup()
  957. }
  958. },
  959. }
  960. }
  961. </script>
  962. <style scoped lang="scss">
  963. .scroll_wrapper{
  964. overflow: hidden;
  965. }
  966. .scroll_wrapper .el-form{
  967. padding-top: 5px;
  968. padding-right: 5px;
  969. }
  970. .upload-container {
  971. width: 100%;
  972. position: relative;
  973. .image-uploader {
  974. width: 35%;
  975. float: left;
  976. }
  977. .image-preview {
  978. width: 200px;
  979. height: 200px;
  980. position: relative;
  981. border: 1px dashed #d9d9d9;
  982. float: left;
  983. // margin-left: 50px;
  984. .image-preview-wrapper {
  985. position: relative;
  986. width: 100%;
  987. height: 100%;
  988. img {
  989. width: 100%;
  990. height: 100%;
  991. }
  992. }
  993. .image-preview-action {
  994. position: absolute;
  995. width: 100%;
  996. height: 30px;
  997. left: 0;
  998. bottom: 0;
  999. color: #fff;
  1000. opacity: 0;
  1001. font-size: 20px;
  1002. background-color: rgba(0, 0, 0, 0.5);
  1003. transition: opacity 0.3s;
  1004. cursor: pointer;
  1005. text-align: center;
  1006. line-height: 30px;
  1007. .el-icon-delete {
  1008. font-size: 25px;
  1009. }
  1010. }
  1011. &:hover {
  1012. .image-preview-action {
  1013. opacity: 1;
  1014. }
  1015. }
  1016. }
  1017. .image-app-preview {
  1018. margin-bottom: 10px;
  1019. width: 40vh;
  1020. height: 180px;
  1021. position: relative;
  1022. border: 1px dashed #d9d9d9;
  1023. float: left;
  1024. // margin-left: 50px;
  1025. .app-fake-conver {
  1026. height: 44px;
  1027. position: absolute;
  1028. width: 100%; // background: rgba(0, 0, 0, .1);
  1029. text-align: center;
  1030. line-height: 64px;
  1031. color: #fff;
  1032. }
  1033. }
  1034. }
  1035. </style>