fc274572b0192883c3f67b5ee9f9638fe81b035b.svn-base 51 KB

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