9a1a3e479af787de76e09f9f9f3f9a24d53ce2e4.svn-base 45 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076
  1. <template>
  2. <div>
  3. <el-card class="box-card">
  4. <div class="search_wrapper">
  5. <el-form :inline="true" :model="problemSearch" class="demo-form-inline">
  6. <el-form-item label="问题类别">
  7. <el-select v-model="problemSearch.inspPblmName" clearable style="width: 100px">
  8. <el-option :label="item.pblmType" :value="item.pblmType" v-for="(item,index) in problemType" :key="index"></el-option>
  9. </el-select>
  10. </el-form-item>
  11. <el-form-item label="问题状态">
  12. <el-select v-model="problemSearch.reviConc" clearable style="width: 100px">
  13. <el-option :label="item.name" :value="item.value" v-for="(item,index) in problemStatus" :key="index"></el-option>
  14. </el-select>
  15. </el-form-item>
  16. <el-form-item label="严重程度">
  17. <el-select v-model="problemSearch.inspPblmCate" clearable style="width: 100px">
  18. <el-option :label="item.name" :value="item.value" v-for="(item,index) in severity" :key="index"></el-option>
  19. </el-select>
  20. </el-form-item>
  21. <el-form-item label="发现时间">
  22. <el-date-picker
  23. v-model="findTime"
  24. type="daterange"
  25. value-format="yyyy-MM-dd"
  26. range-separator="至"
  27. start-placeholder="开始日期"
  28. end-placeholder="结束日期">
  29. </el-date-picker>
  30. </el-form-item>
  31. </el-form>
  32. <div>
  33. <el-button type="primary" @click="search">查询</el-button>
  34. <el-button type="primary" @click="emitListData" v-if="canEdit">上传不通过涉及问题</el-button>
  35. <!-- <el-button type="primary" @click="toAddProblem" v-if="ownPriv('manage') && showAddBtn">新增问题</el-button> -->
  36. <!--
  37. <br>
  38. <br>
  39. <el-button type="success"
  40. style="float:right"
  41. @click="showPlDialog"
  42. icon="el-icon-upload2"
  43. >批量新增</el-button> -->
  44. </div>
  45. <!-- 工程批量导入弹窗 -->
  46. <wen-ti-tian-bao-pl v-if="showWenTiTianBaoPl" @closePlDialog="closePlDialog"
  47. :objId="problemForm.objId"
  48. :regId="problemSearch.regId"
  49. ></wen-ti-tian-bao-pl>
  50. </div>
  51. <el-table
  52. @select="handleSelectionChange"
  53. :data="tableData"
  54. border
  55. :height="tableHeight"
  56. v-loading="loading"
  57. style="width: 100%">
  58. <el-table-column
  59. type="selection"
  60. width="40">
  61. </el-table-column>
  62. <el-table-column
  63. prop="nm"
  64. show-overflow-tooltip
  65. label="工程名称"
  66. width="180">
  67. </el-table-column>
  68. <el-table-column
  69. v-if="!unitLevel"
  70. prop="unitNm"
  71. label="责任单位"
  72. show-overflow-tooltip
  73. width="180">
  74. </el-table-column>
  75. <el-table-column
  76. v-if="unitLevel"
  77. label="管理单位"
  78. show-overflow-tooltip
  79. width="180">
  80. <template slot-scope="scope">
  81. {{scope.row.firstName ? scope.row.firstName : scope.row.secondName ? scope.row.secondName : scope.row.thirdName}}
  82. </template>
  83. </el-table-column>
  84. <el-table-column
  85. show-overflow-tooltip
  86. prop="inspPblmDesc"
  87. label="质量问题信息"
  88. width="150">
  89. </el-table-column>
  90. <el-table-column
  91. prop="inspPblmCate"
  92. label="严重程度"
  93. width="90">
  94. <template slot-scope="scope">
  95. {{scope.row.inspPblmCate | inspPblmCate}}
  96. </template>
  97. </el-table-column>
  98. <el-table-column
  99. prop="ifCasePblm"
  100. label="是否典型"
  101. width="90">
  102. <template slot-scope="scope">
  103. {{scope.row.ifCasePblm == '1' ? '典型' : scope.row.ifCasePblm == '0' ? '非典型' : ''}}
  104. </template>
  105. </el-table-column>
  106. <el-table-column
  107. prop="collTime"
  108. label="发现时间"
  109. width="150">
  110. <template slot-scope="scope">
  111. {{scope.row.collTime ? formatDateTime(scope.row.collTime) : ''}}
  112. </template>
  113. </el-table-column>
  114. <el-table-column
  115. prop="reviConc"
  116. label="问题状态"
  117. width="90">
  118. <template slot-scope="scope">
  119. <p v-if="scope.row.reviConc == 0">新问题</p>
  120. <p v-if="scope.row.reviConc == 1">未复查</p>
  121. <p v-if="scope.row.reviConc == 2">已复查</p>
  122. </template>
  123. </el-table-column>
  124. <!-- <el-table-column
  125. prop="zip"
  126. label="复查时间"
  127. width="120">
  128. </el-table-column> -->
  129. <el-table-column
  130. prop="hasVedio"
  131. label="有无多媒体"
  132. width="100">
  133. <template slot-scope="scope">
  134. <p v-if="scope.row.hasVedio == 1">是</p>
  135. <p v-if="scope.row.hasVedio == 0">否</p>
  136. </template>
  137. </el-table-column>
  138. <el-table-column
  139. v-if="!canEdit"
  140. fixed="right"
  141. label="操作"
  142. align="center"
  143. min-width="130">
  144. <!-- <template slot-scope="scope"> -->
  145. <!-- <el-button type="text" size="small" v-if="ownPriv('manage') && (!scope.row.reviConc || scope.row.reviConc =='0')" @click="toEditProblem(scope.row)">编辑</el-button>
  146. <el-button type="text" size="small" v-if="ownPriv('manage') && (scope.row.reviConc == '1' || scope.row.reviConc =='2')" @click="toRecheckProblem(scope.row)">复查</el-button>
  147. <el-button type="text" size="small" @click="toShowDetail(scope.row)">详情</el-button>
  148. <el-button type="text" size="small" title="删除问题" @click="deteleProblem(scope.row)" v-if="ownPriv('manage')">删除</el-button> -->
  149. <!-- </template> -->
  150. <template slot-scope="scope">
  151. <el-button
  152. size="mini"
  153. type="success"
  154. plain
  155. @click="sHInfo(scope.row,'dcInfo')"
  156. >查看</el-button>
  157. </template>
  158. </el-table-column>
  159. </el-table>
  160. <el-pagination :pager-count="5" :current-page="pageIndex"
  161. :page-size="pageSize" layout="total, prev, pager, next" :total="total"
  162. @current-change="pageIndexChange" @size-change="handleSizeChange"
  163. ></el-pagination>
  164. </el-card>
  165. <el-dialog
  166. :title="dialogType + '问题'"
  167. width="60%"
  168. :visible.sync="add_dialogVisible">
  169. <el-form ref="form" :model="problemForm" label-width="120px">
  170. <el-form-item label="问题类别">
  171. <el-select v-model="problemForm.problemType" @change="problemTypeChange">
  172. <el-option :label="item.pblmType" :value="item.pblmType" v-for="(item,index) in problemType" :key="index"></el-option>
  173. </el-select>
  174. </el-form-item>
  175. <el-form-item label="质量问题信息">
  176. <el-input type="textarea" v-model="problemForm.inspPblmDesc"></el-input>
  177. </el-form-item>
  178. <p class="slide-line"></p>
  179. <p style="margin-top: 10px; margin-bottom: 10px;color:#999"><i class="el-icon-caret-right"></i><span style="width: 120px; padding-left: 6px;">对应标准</span><span class="hrs"></span></p>
  180. <el-form-item :label="weigui.pblmPoint" v-show="weigui.pblmRelDics.length">
  181. <el-select v-model="problemForm.weigui" @change="selectWeiguiChange">
  182. <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in weigui.pblmRelDics" :key="index"></el-option>
  183. </el-select>
  184. <div style="width: 380px;float:right">
  185. <span>问题序号</span>
  186. <el-input type="text" style="width: 100px;" @focus="showPblmList(weigui,problemForm.weigui,'违规')" readonly v-model="weigui.pblmSn"></el-input>
  187. <my-cascader :pblmDescList="pblmDescList" v-if="chooseWeiguiProblem" @sendPblmsTypeIdWeigui="sendPblmsTypeIdWeigui"></my-cascader>
  188. </div>
  189. </el-form-item>
  190. <!-- -->
  191. <el-form-item :label="hetong.pblmPoint" v-show="hetong.pblmRelDics.length">
  192. <el-select v-model="problemForm.hetong" @change="selectHetongChange">
  193. <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in hetong.pblmRelDics" :key="index"></el-option>
  194. </el-select>
  195. <div style="width: 380px;float:right">
  196. <span>问题序号</span>
  197. <el-input type="text" style="width: 100px;" @focus="showPblmList(hetong,problemForm.hetong,'合同')" readonly v-model="hetong.pblmSn"></el-input>
  198. <my-cascader-hetong :pblmDescList="pblmDescListHetong" v-if="chooseHeTongProblem" @sendPblmsTypeIdHetong="sendPblmsTypeIdHetong"></my-cascader-hetong>
  199. </div>
  200. </el-form-item>
  201. <!-- -->
  202. <el-form-item :label="quanlity.pblmPoint" v-show="quanlity.pblmRelDics.length">
  203. <el-select v-model="problemForm.quanlity" @change="selectQuanlityChange">
  204. <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in quanlity.pblmRelDics" :key="index"></el-option>
  205. </el-select>
  206. <div style="width: 380px;float:right">
  207. <span>问题序号</span>
  208. <el-input type="text" style="width: 100px;" @focus="showPblmList(quanlity,problemForm.quanlity,'质量')" readonly v-model="quanlity.pblmSn"></el-input>
  209. <my-cascader :pblmDescList="pblmDescList" v-if="chooseQuanlityProblem" @sendPblmsTypeIdQuanlity="sendPblmsTypeIdQuanlity"></my-cascader>
  210. </div>
  211. </el-form-item>
  212. <!-- -->
  213. <el-form-item :label="gongcheng.pblmPoint" v-show="gongcheng.pblmRelDics.length">
  214. <el-select v-model="problemForm.gongcheng" @change="selectGongchengChange">
  215. <el-option :label="attach.pblmAttachName" :value="attach.pblmAttach" v-for="(attach,index) in gongcheng.pblmRelDics" :key="index"></el-option>
  216. </el-select>
  217. <div style="width: 380px;float:right">
  218. <span>问题序号</span>
  219. <el-input type="text" style="width: 100px;" @focus="showPblmList(gongcheng,problemForm.gongcheng,'工程')" readonly v-model="gongcheng.pblmSn"></el-input>
  220. <!-- <span style="color:blue;cursor:pointer;font-size:12px;" v-if="!chooseGongchengProblem" @click="chooseGongchengProblem = true"> 选择</span> -->
  221. <my-cascader :pblmDescList="pblmDescList" :showThreeLevel="true" v-if="chooseGongchengProblem" @sendPblmsTypeIdGongcheng="sendPblmsTypeIdGongcheng"></my-cascader>
  222. </div>
  223. </el-form-item>
  224. <p class="slide-line"></p>
  225. <el-form-item label="严重性">
  226. <span>{{problemForm.inspPblmCate | inspPblmCate}}</span>
  227. </el-form-item>
  228. <el-form-item label="列为典型问题" style="text-align:left">
  229. <el-checkbox v-model="checked"></el-checkbox>
  230. </el-form-item>
  231. <el-form-item label="相关文件">
  232. <upload ref="uploadFile" :url="`/pdcApi/file/insert?bizId=`" @uploadOver="removeNewSupervision"></upload>
  233. </el-form-item>
  234. <el-form-item style="margin-top: 50px">
  235. <el-button type="primary" @click="onSubmit" style="width: 100px;float:right">保存</el-button>
  236. </el-form-item>
  237. </el-form>
  238. </el-dialog>
  239. <el-dialog
  240. :title="'整改情况'"
  241. width="50%"
  242. :visible.sync="recheck_dialogVisible">
  243. <el-form ref="form" :model="rectifyForm" label-width="120px">
  244. <el-form-item label="整改情况">
  245. <el-select v-model="rectifyForm.rectConc">
  246. <el-option :label="item.name" :value="item.value" v-for="(item,index) in rectifyStatus" :key="index"></el-option>
  247. </el-select>
  248. </el-form-item>
  249. <el-form-item label="整改时间">
  250. <el-date-picker
  251. v-model="rectifyForm.collTime"
  252. type="date"
  253. value-format="yyyy-MM-dd">
  254. </el-date-picker>
  255. </el-form-item>
  256. <el-form-item label="整改详细情况">
  257. <el-input type="textarea" v-model="rectifyForm.rectMeas"></el-input>
  258. </el-form-item>
  259. <el-form-item label="相关文件">
  260. <upload ref="uploadFile" :url="`/pdcApi/file/insert?bizId=`" @uploadOver="removeNewSupervision"></upload>
  261. </el-form-item>
  262. <el-form-item style="margin-top: 50px">
  263. <el-button type="primary" @click="rectifySubmit" style="width: 100px;float:right">保存</el-button>
  264. </el-form-item>
  265. </el-form>
  266. </el-dialog>
  267. <el-dialog class="outerDialog custom_dialog detail_dialog" width="60%" title="" :visible.sync="supervisionDetailsVisible">
  268. <el-tabs v-model="activeName" @tab-click="handleDetailClick">
  269. <el-tab-pane label="问题详情" name="problem-detail">
  270. <problem-detail :problemId="problemId" :projectType="projectType" :reviConc="reviConc"></problem-detail>
  271. </el-tab-pane>
  272. <el-tab-pane label="整改详情" name="rectify-detail" v-if="reviConc == '2'">
  273. <rectify-detail :rectifyId="rectifyId"></rectify-detail>
  274. </el-tab-pane>
  275. </el-tabs>
  276. <span slot="footer">
  277. <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
  278. </span>
  279. </el-dialog>
  280. <problem-modify :problemId="problemId" :projectType="projectType" :villType="villType" :unitProblemInfo="problemInfo" :unitLevel="unitLevel" v-if="edit_dialogVisible" @closeEditDialog="closeEditDialog"></problem-modify>
  281. <rectify-modify :problemId="problemId" :projectType="projectType" :villType="villType" :rectifyProblemInfo="rectifyProblemInfo" v-if="recheck_edit_dialogVisible" @closeEditDialog="closeRectifyEditDialog"></rectify-modify>
  282. <!-- 基础信息 -->
  283. <jichuxinxi172 ref="172JcxxRef" v-if="show172BaseInfo" :currentResCode=current172Code></jichuxinxi172>
  284. </div>
  285. </template>
  286. <script>
  287. import {formatDateTime2} from '../../../utils/gw_date.js'
  288. import request from '../../../utils/gw_ajax_request.js'
  289. import myCascader from '../../duChaTianBao/project/problemList.vue'
  290. import myCascaderHetong from '../../duChaTianBao/project/problemList.vue'
  291. import problemDetail from '../../duChaTianBao/project/problemDetails.vue'
  292. import rectifyDetail from '../../duChaTianBao/project/rectifyDetails.vue'
  293. import problemModify from '../../duChaTianBao/project/problemModify.vue'
  294. import rectifyModify from '../../duChaTianBao/project/rectifyModify.vue'
  295. import WenTiTianBaoPl from '../../duChaDuiXiang/reportTb/gongchengwenti-tianbao-piliang.vue'
  296. import jichuxinxi172 from "../../zongHeXinXiOl/components/popupWindow/172/main.vue";
  297. export default {
  298. props: ['unitProblemInfo','currentRow','villType','unitLevel','showAddBtn','canEdit','canReview','adCodes'],
  299. data(){
  300. return{
  301. tableHeight: window.innerHeight - 280,
  302. tableData:[
  303. // {
  304. // date: '',
  305. // name: '',
  306. // province: '',
  307. // city: '',
  308. // address: '',
  309. // zip: ''
  310. // }
  311. ],
  312. problemSearch:{
  313. inspPblmName: '',
  314. inspPblmCate: '',
  315. reviConc: '',
  316. regid: '',
  317. regId: '',
  318. pType: '',
  319. pageSize: '10',
  320. pageNum: 1
  321. },
  322. problemForm:{
  323. objId: '',
  324. objType: '',
  325. problemType: '',
  326. inspPblmDesc: '',
  327. pblmsTypeId: '',
  328. qualityTypeId: '',
  329. pblmsId: '',
  330. defectTypeId: '',
  331. ifCasePblm: '',
  332. inspPblmCate: '',
  333. weigui: '',
  334. hetong: '',
  335. quanlity: '',
  336. gongcheng: '',
  337. gwComFiles: []
  338. },
  339. rectifyForm: {
  340. rectConc: '',
  341. rectMeas: '',
  342. collTime: '',
  343. gwComFiles: [{
  344. id: "",
  345. filePath: "",
  346. bizId: ""
  347. }]
  348. },
  349. weigui: {
  350. pblmRelDics: [],
  351. pblmSn: ''
  352. },
  353. hetong: {
  354. pblmRelDics: [],
  355. pblmSn: ''
  356. },
  357. quanlity: {
  358. pblmRelDics: [],
  359. pblmSn: ''
  360. },
  361. gongcheng: {
  362. pblmRelDics: [],
  363. pblmSn: ''
  364. },
  365. pblmPointNum: '',
  366. pblmDescList: '',
  367. pblmDescListHetong: '',
  368. pblmAttach: [],
  369. pblmsTypeId: '',
  370. pblmId: '',
  371. imgList: [],
  372. videoList:[],
  373. audioList: [],
  374. pblmStat: '',
  375. gwComFiles: [],
  376. problemType: [
  377. {name: '违规行为',value:'1'},
  378. {name: '质量缺陷',value:'2'},
  379. {name: '合同问题',value:'3'}
  380. ],
  381. problemStatus: [
  382. {name: '已复查',value:'2'},
  383. {name: '未复查',value:'1'},
  384. {name: '新问题',value:'0'}
  385. ],
  386. rectifyStatus: [
  387. {name: '未整改',value:'0'},
  388. {name: '整改中',value:'1'},
  389. {name: '已整改',value:'2'}
  390. ],
  391. severity:[
  392. {name: '一般',value:'0'},
  393. {name: '较重',value:'1'},
  394. {name: '严重',value:'2'},
  395. {name: '非常严重',value:'3'}
  396. ],
  397. dialogType: '添加',
  398. dialogVisible: true,
  399. add_dialogVisible: false,
  400. recheck_dialogVisible: false,
  401. chooseWeiguiProblem: false,
  402. chooseHeTongProblem: false,
  403. chooseQuanlityProblem: false,
  404. chooseGongchengProblem: false,
  405. checked: false,
  406. problemId: '',
  407. supervisionDetailsVisible:false,
  408. projectType: '',
  409. reviConc: '',
  410. findTime: [],
  411. rectifyRow: {},
  412. isRectify: false,
  413. rectifyId: '',
  414. activeName: 'problem-detail',
  415. pageIndex: 1,
  416. pageSize: 20,
  417. total: 0,
  418. loading: false,
  419. showWenTiTianBaoPl: false,
  420. //问题修改弹窗
  421. problemInfo: null,
  422. rectifyProblemInfo: null,
  423. edit_dialogVisible: false,
  424. recheck_edit_dialogVisible: false,
  425. multipleSelection: [],
  426. qusListsSelet: [],
  427. show172BaseInfo: false,
  428. current172Code: ''
  429. }
  430. },
  431. computed: {
  432. persId() {
  433. return localStorage.getItem("userid")
  434. ? localStorage.getItem("userid")
  435. : "1098101939614724096";
  436. },
  437. formatDateTime(){
  438. return formatDateTime2
  439. }
  440. },
  441. components: {
  442. upload: resolve => {
  443. require(["../../../widgets/uploadFile.vue"], resolve);
  444. },
  445. myCascader: myCascader,
  446. myCascaderHetong: myCascaderHetong,
  447. problemDetail: problemDetail,
  448. rectifyDetail: rectifyDetail,
  449. problemModify: problemModify,
  450. rectifyModify: rectifyModify,
  451. WenTiTianBaoPl: WenTiTianBaoPl,
  452. jichuxinxi172
  453. },
  454. mounted(){
  455. // this.search()
  456. this.listPblmType()
  457. this.$emit('qusSeletLists',this.multipleSelection);
  458. // this.$emit('qusLists',this.tableData);
  459. },
  460. activated(){
  461. // this.search()
  462. },
  463. methods:{
  464. emitListData(){
  465. this.$emit('qusSeletLists',this.multipleSelection);
  466. this.$message.success("操作成功");
  467. },
  468. handleSelectionChange(selection,row) {
  469. var _self = this;
  470. this.canEdit = true;
  471. // this.multipleSelection = val;
  472. // this.qusListsSelet = val;\
  473. _self.multipleSelection.push({
  474. "ifCasePblm": row.ifCasePblm,
  475. "pblmId": row.pblmId,
  476. "pblmNm": row.nm,
  477. "pblmPasi": row.inspPblmCate
  478. })
  479. },
  480. search(){
  481. if(this.adCodes.length){
  482. this.searchList()
  483. }
  484. },
  485. searchList(){
  486. this.loading = true
  487. this.problemSearch.persId = this.persId
  488. this.problemSearch.pType = this.villType == '8' ? '4' : '7'
  489. this.problemSearch['codes'] = this.unitProblemInfo.codes ? this.unitProblemInfo.codes : '' //工程code过滤
  490. this.problemSearch['secId'] = this.unitProblemInfo.secId ? this.unitProblemInfo.secId : '' //工程code过滤
  491. this.problemSearch.regid = this.unitProblemInfo.oneUnitId ? this.unitProblemInfo.oneUnitId : this.unitProblemInfo.id //管理单位唯一标识
  492. this.problemSearch.regId = this.unitProblemInfo.oneUnitId ? this.unitProblemInfo.oneUnitId : this.unitProblemInfo.id //管理单位唯一标识
  493. this.problemSearch.pageSize = this.pageSize
  494. this.problemSearch.pageNum = this.pageIndex
  495. console.log(this.findTime)
  496. if(this.findTime && this.findTime.length){
  497. this.problemSearch['startTime'] = this.findTime[0]
  498. this.problemSearch['endTime'] = this.findTime[1]
  499. this.problemSearch.reviConc = this.problemSearch.reviConc || "0"
  500. }else{
  501. this.problemSearch['startTime'] = ''
  502. this.problemSearch['endTime'] = ''
  503. }
  504. request.post(`/dc/insp/pblm/page/keyReg`, this.problemSearch).then(res => {
  505. if (res.success) {
  506. this.tableData = res.data.list;
  507. this.total = res.data.total;
  508. if(this.problemSearch.pType == '7'){
  509. this.tableData.forEach(ele=>{
  510. ele['reviOrg'] = this.unitLevel
  511. })
  512. }
  513. }
  514. this.loading = false
  515. });
  516. },
  517. listPblmType(){
  518. let paramObj = {}
  519. if(this.unitProblemInfo.nature){
  520. paramObj = {
  521. orgType: this.unitProblemInfo.nature,
  522. proType: '1'
  523. }
  524. }else{
  525. paramObj = {
  526. reviOrg: this.unitLevel,
  527. proType: '2'
  528. }
  529. }
  530. request.post(`/obj/key/pblm/listPblmType`, paramObj).then(res => {
  531. if (res.success) {
  532. this.problemType = res.data;
  533. this.problemForm.problemType = this.problemType[0].pblmType
  534. }
  535. });
  536. },
  537. // 标准 附件 序号
  538. convertGroup(){
  539. let paramObj = {}
  540. if(this.unitProblemInfo.nature){
  541. paramObj = {
  542. orgType: this.unitProblemInfo.nature,
  543. proType: '1',
  544. pblmType: this.problemForm.problemType
  545. }
  546. }else{
  547. paramObj = {
  548. reviOrg: this.unitLevel,
  549. proType: '2',
  550. pblmType: this.problemForm.problemType
  551. }
  552. }
  553. this.hetong.pblmRelDics = []
  554. this.weigui.pblmRelDics = []
  555. this.quanlity.pblmRelDics = []
  556. this.gongcheng.pblmRelDics = []
  557. request.post(`/obj/key/pblm/convertGroup`, paramObj).then(res => {
  558. if (res.success) {
  559. this.pblmPointNum = res.data;
  560. this.pblmPointNum.forEach(ele=>{
  561. ele.pblmAttach = ele.pblmAttach.split(',')
  562. // ele.pblmSn = ele.pblmSn.split(',')
  563. if(ele.pblmPoint.indexOf('合同') > -1){
  564. this.hetong = ele
  565. }
  566. if(ele.pblmPoint.indexOf('违规') > -1){
  567. this.weigui = ele
  568. }
  569. if(ele.pblmPoint.indexOf('质量') > -1){
  570. this.quanlity = ele
  571. }
  572. if(ele.pblmPoint.indexOf('工程') > -1){
  573. this.gongcheng = ele
  574. }
  575. })
  576. if(this.dialogType == '添加'){
  577. this.weigui.pblmSn = ''
  578. this.hetong.pblmSn = ''
  579. this.quanlity.pblmSn = ''
  580. this.gongcheng.pblmSn = ''
  581. }else{
  582. if(this.weigui.pblmRelDics.length){
  583. this.weigui.pblmRelDics.forEach(ele=>{
  584. if(ele.pblmAttach == this.problemForm.weigui){
  585. this.weigui.pblmSn = ele.pblmSn
  586. }
  587. })
  588. }
  589. if(this.hetong.pblmRelDics.length){
  590. this.hetong.pblmRelDics.forEach(ele=>{
  591. if(ele.pblmAttach == this.problemForm.hetong){
  592. this.hetong.pblmSn = ele.pblmSn
  593. }
  594. })
  595. }
  596. if(this.quanlity.pblmRelDics.length){
  597. this.quanlity.pblmRelDics.forEach(ele=>{
  598. if(ele.pblmAttach == this.problemForm.quanlity){
  599. this.quanlity.pblmSn = ele.pblmSn
  600. }
  601. })
  602. }
  603. if(this.gongcheng.pblmRelDics.length){
  604. this.gongcheng.pblmRelDics.forEach(ele=>{
  605. if(ele.pblmAttach == this.problemForm.gongcheng){
  606. this.gongcheng.pblmSn = ele.pblmSn
  607. }
  608. })
  609. }
  610. }
  611. }
  612. });
  613. },
  614. //具体问题描述列表
  615. showPblmList(obj,attach,type){
  616. type == '违规' ? this.chooseWeiguiProblem = true : type == '合同' ? this.chooseHeTongProblem = true : type == '工程' ? this.chooseGongchengProblem = true : this.chooseQuanlityProblem = true
  617. let paramObj = {}
  618. if(this.unitProblemInfo.nature){
  619. paramObj = {
  620. pblmType: obj.pblmPoint,
  621. // sheetName: obj.reviOrg,
  622. sheetName: obj.pblmPoint,
  623. attachType: obj.proType,
  624. attach: attach,
  625. sn: obj.pblmSn
  626. }
  627. }else{
  628. paramObj = {
  629. pblmType: obj.pblmPoint,
  630. sheetName: obj.pblmPoint,
  631. attachType: obj.proType,
  632. attach: attach,
  633. sn: obj.pblmSn,
  634. version: ''
  635. }
  636. if(obj.pblmPoint == '工程缺陷'){
  637. paramObj.version = "v3"
  638. }
  639. }
  640. request.post(`/obj/key/pblm/pblmsList`, paramObj).then(res => {
  641. if (res.success) {
  642. if(type == '合同'){
  643. this.pblmDescListHetong = res.data;
  644. }else{
  645. this.pblmDescList = res.data;
  646. }
  647. }
  648. });
  649. },
  650. sendPblmsTypeIdWeigui(val){
  651. this.problemForm.pblmsTypeId = val.id
  652. this.problemForm.inspPblmCate = val.inspPblmCate
  653. },
  654. sendPblmsTypeIdHetong(val){
  655. this.problemForm.pblmsId = val.id
  656. this.problemForm.inspPblmCate = val.inspPblmCate
  657. },
  658. sendPblmsTypeIdQuanlity(val){
  659. this.problemForm.qualityTypeId = val.id
  660. this.problemForm.inspPblmCate = val.inspPblmCate
  661. },
  662. sendPblmsTypeIdGongcheng(val){
  663. this.problemForm.defectTypeId = val.id
  664. this.problemForm.inspPblmCate = val.inspPblmCate
  665. },
  666. toAddProblem(){
  667. this.dialogType = '添加'
  668. this.problemForm = {
  669. objId: '',
  670. objType: '',
  671. problemType: '',
  672. inspPblmDesc: '',
  673. pblmsTypeId: '',
  674. qualityTypeId: '',
  675. pblmsId: '',
  676. defectTypeId: '',
  677. ifCasePblm: '',
  678. inspPblmCate: '',
  679. weigui: '',
  680. hetong: '',
  681. quanlity: '',
  682. gongcheng: '',
  683. gwComFiles: []
  684. },
  685. this.problemForm.problemType = this.problemType[0].pblmType
  686. this.chooseQuanlityProblem = false
  687. this.chooseHeTongProblem = false
  688. this.chooseWeiguiProblem = false
  689. this.chooseGongchengProblem = false
  690. this.add_dialogVisible = true
  691. },
  692. toEditProblem(row){
  693. this.dialogType = '修改'
  694. this.problemId = row.pblmId
  695. this.problemInfo = row
  696. this.projectType = row.villType == '8' ? '1' : row.villType == '9' ? '2' : '1'
  697. this.edit_dialogVisible = true
  698. },
  699. onSubmit(){
  700. this.isRectify = false
  701. this.problemForm.ifCasePblm = this.checked ? '1' : '0'
  702. this.problemForm.inspPblmName = this.problemForm.problemType
  703. this.problemForm.recPers = this.persId
  704. if(this.weigui.pblmRelDics.length && !this.problemForm.pblmsTypeId){
  705. this.$message.warning('请选择违规附件对应问题')
  706. return
  707. }else if(!this.weigui.pblmRelDics.length){
  708. this.problemForm.pblmsTypeId = ''
  709. }
  710. if(this.hetong.pblmRelDics.length && !this.problemForm.pblmsId && !this.weigui.pblmRelDics.length){
  711. this.$message.warning('请选择合同管理附件对应问题')
  712. return
  713. }else if(!this.hetong.pblmRelDics.length){
  714. this.problemForm.pblmsId = ''
  715. }
  716. if(this.quanlity.pblmRelDics.length && !this.problemForm.qualityTypeId){
  717. this.$message.warning('请选择质量缺陷附件对应问题')
  718. return
  719. }else if(!this.quanlity.pblmRelDics.length){
  720. this.problemForm.qualityTypeId = ''
  721. }
  722. if(this.gongcheng.pblmRelDics.length && !this.problemForm.defectTypeId){
  723. this.$message.warning('请选择工程缺陷附件对应问题')
  724. return
  725. }else if(!this.gongcheng.pblmRelDics.length){
  726. this.problemForm.defectTypeId = ''
  727. }
  728. if(this.dialogType == '添加'){
  729. this.problemForm.regid = this.unitProblemInfo.oneUnitId ? this.unitProblemInfo.oneUnitId : this.unitProblemInfo.id //管理单位唯一标识
  730. this.problemForm.regId = this.unitProblemInfo.oneUnitId ? this.unitProblemInfo.oneUnitId : this.unitProblemInfo.id //管理单位唯一标识
  731. this.problemForm.objId = this.currentRow.objId
  732. // this.problemForm.objType = '4'
  733. this.problemForm.objType = this.villType == '8' ? '4' : '7'
  734. this.problemForm.villType = this.villType
  735. this.problemForm.pblmStat = "0";
  736. delete this.problemForm.weigui
  737. delete this.problemForm.hetong
  738. delete this.problemForm.quanlity
  739. delete this.problemForm.gongcheng
  740. request.post('/dc/insp/pblm',this.problemForm).then(res=>{
  741. if (res.success) {
  742. this.pblmId = res.data.pblmId;
  743. this.gwComFiles = [];
  744. this.pblmStat = res.data.pblmStat;
  745. this.add_dialogVisible = false
  746. this.searchList()
  747. if (this.$refs.uploadFile.submitUpload(res.data.pblmId)) {
  748. this.removeNewSupervision();
  749. }
  750. }
  751. })
  752. }else{
  753. request.post('/dc/insp/pblm/update',this.problemForm).then(res=>{
  754. if (res.success) {
  755. this.pblmId = res.data.pblmId;
  756. this.gwComFiles = [];
  757. this.pblmStat = res.data.pblmStat;
  758. this.add_dialogVisible = false
  759. this.searchList()
  760. if (this.$refs.uploadFile.submitUpload(res.data.pblmId)) {
  761. this.removeNewSupervision();
  762. }
  763. }
  764. })
  765. }
  766. },
  767. // 复查
  768. toRecheckProblem(row){
  769. this.dialogType = row.reviConc == '1' ? '添加' : row.reviConc == '2' ? '修改' : '添加'
  770. this.rectifyForm.rectConc = row.rectConc
  771. this.rectifyForm.rectMeas = row.rectMeas
  772. Object.assign(this.rectifyRow,row)
  773. if(this.dialogType == '添加'){
  774. this.rectifyForm.collTime = ''
  775. this.recheck_dialogVisible = true
  776. }else{
  777. this.rectifyProblemInfo = row
  778. this.problemId = row.pblmId
  779. this.projectType = row.villType == '8' ? '1' : row.villType == '9' ? '2' : '1'
  780. this.rectifyForm.collTime = this.formatDateTime(row.collTime)
  781. this.recheck_edit_dialogVisible = true
  782. }
  783. },
  784. rectifySubmit(){
  785. this.isRectify = true
  786. this.rectifyForm['recPers'] = this.persId
  787. if(this.dialogType == '添加'){
  788. this.rectifyForm['pblmId'] = this.rectifyRow.pblmId
  789. this.rectifyForm['orgGuid'] = this.rectifyRow.regid
  790. request.post('/dc/insp/rectFdbk',this.rectifyForm).then(res=>{
  791. if (res.success) {
  792. // this.pblmId = res.data.pblmId;
  793. this.pblmId = this.rectifyRow.pblmId
  794. this.gwComFiles = [];
  795. this.pblmStat = res.data.pblmStat;
  796. this.recheck_dialogVisible = false
  797. this.searchList()
  798. if (this.$refs.uploadFile.submitUpload(res.data.guid)) {
  799. this.removeNewSupervision();
  800. }
  801. }
  802. })
  803. }else{
  804. // this.rectifyForm['guid'] = this.rectifyRow.guid
  805. this.rectifyForm['pblmId'] = this.rectifyRow.pblmId
  806. this.rectifyForm['orgGuid'] = this.rectifyRow.regid
  807. this.rectifyForm['id'] = this.rectifyRow.guid
  808. delete this.rectifyForm.collTime
  809. request.post('/dc/insp/rectFdbk',this.rectifyForm).then(res=>{
  810. if (res.success) {
  811. this.pblmId = res.data.guid;
  812. // this.pblmId = this.rectifyRow.pblmId
  813. this.gwComFiles = [];
  814. this.pblmStat = res.data.pblmStat;
  815. this.recheck_dialogVisible = false
  816. this.searchList()
  817. if (this.$refs.uploadFile.submitUpload(res.data.guid)) {
  818. this.removeNewSupervision();
  819. }
  820. }
  821. })
  822. }
  823. },
  824. // 查看详情
  825. toShowDetail(row){
  826. this.problemId = row.pblmId
  827. this.rectifyId = row.guid
  828. this.projectType = row.villType == '8' ? '1' : row.villType == '9' ? '2' : '1'
  829. this.reviConc = row.reviConc
  830. this.supervisionDetailsVisible = true
  831. },
  832. deteleProblem(row){
  833. this.$confirm('确认删除当前问题吗?', '提示', {
  834. confirmButtonText: '确定',
  835. cancelButtonText: '取消',
  836. type: 'warning'
  837. }).then(() => {
  838. request.get(`/dc/insp/pblm/delete/${row.pblmId}/${this.persId}`).then(res=>{
  839. if(res.success){
  840. this.$message.success('删除成功')
  841. this.searchList()
  842. }else{
  843. this.$message.error(res.message)
  844. }
  845. })
  846. }).catch(() => {
  847. });
  848. },
  849. // 文件上传
  850. submitUpload() {
  851. this.$refs.upload.submit();
  852. },
  853. updatefilelist(arg) {
  854. if(this.isRectify){
  855. request.post('/dc/insp/rectFdbk',{
  856. id: this.pblmId,
  857. gwComFiles: arg
  858. }).then(res => {
  859. this.removeNewSupervision()
  860. });
  861. }else{
  862. if(this.dialogType == '修改'){
  863. this.problemForm.gwComFiles = this.problemForm.gwComFiles.concat(arg)
  864. }else{
  865. this.problemForm.gwComFiles = arg
  866. }
  867. request.post('/dc/insp/pblm/update',{
  868. pblmId: this.pblmId,
  869. gwComFiles: this.problemForm.gwComFiles,
  870. pblmStat: this.pblmStat
  871. }).then(res => {
  872. this.searchList()
  873. this.removeNewSupervision()
  874. });
  875. }
  876. },
  877. removeNewSupervision(arg){
  878. if (arg) {
  879. console.log(arg);
  880. var args = this.gwComFiles.concat(arg);
  881. this.updatefilelist(args);
  882. }
  883. this.$message.success('保存成功')
  884. this.$emit('closeDialog')
  885. this.gwComFiles = [];
  886. this.$refs.uploadFile.init();
  887. },
  888. handleClose(){
  889. this.$emit('dialogClose')
  890. },
  891. selectHetongChange(val){
  892. this.$forceUpdate()
  893. let _this = this
  894. this.chooseHeTongProblem = false
  895. this.hetong.pblmRelDics.forEach(ele=>{
  896. if(ele.pblmAttach == val){
  897. _this.hetong.pblmSn = ele.pblmSn
  898. }
  899. })
  900. },
  901. selectWeiguiChange(val){
  902. this.$forceUpdate()
  903. let _this = this
  904. this.chooseWeiguiProblem = false
  905. this.weigui.pblmRelDics.forEach(ele=>{
  906. if(ele.pblmAttach == val){
  907. _this.weigui.pblmSn = ele.pblmSn
  908. }
  909. })
  910. },
  911. selectQuanlityChange(val){
  912. this.$forceUpdate()
  913. let _this = this
  914. this.chooseQuanlityProblem = false
  915. this.quanlity.pblmRelDics.forEach(ele=>{
  916. if(ele.pblmAttach == val){
  917. _this.quanlity.pblmSn = ele.pblmSn
  918. }
  919. })
  920. },
  921. selectGongchengChange(val){
  922. this.$forceUpdate()
  923. let _this = this
  924. this.chooseGongchengProblem = false
  925. this.gongcheng.pblmRelDics.forEach(ele=>{
  926. if(ele.pblmAttach == val){
  927. _this.gongcheng.pblmSn = ele.pblmSn
  928. }
  929. })
  930. },
  931. handleDetailClick(tab, event) {
  932. console.log(tab, event);
  933. },
  934. problemTypeChange(val){
  935. // alert(val)
  936. this.weigui.pblmSn = ''
  937. this.hetong.pblmSn = ''
  938. this.quanlity.pblmSn = ''
  939. this.gongcheng.pblmSn = ''
  940. this.problemForm.weigui = ''
  941. this.problemForm.hetong = ''
  942. this.problemForm.quanlity = ''
  943. this.problemForm.gongcheng = ''
  944. this.chooseHeTongProblem = false
  945. this.chooseWeiguiProblem = false
  946. this.chooseQuanlityProblem = false
  947. this.chooseGongchengProblem = false
  948. },
  949. pageIndexChange(val) {
  950. this.pageIndex = val;
  951. this.searchList();
  952. },
  953. handleSizeChange(val) {
  954. this.pageSize = val;
  955. this.searchList();
  956. },
  957. showPlDialog() {
  958. this.showWenTiTianBaoPl = true;
  959. },
  960. closePlDialog(val) {
  961. this.showWenTiTianBaoPl = false;
  962. },
  963. // 控制修改弹窗
  964. closeEditDialog(){
  965. this.edit_dialogVisible = false
  966. this.searchList()
  967. },
  968. closeRectifyEditDialog(){
  969. this.recheck_edit_dialogVisible = false
  970. this.searchList()
  971. },
  972. sHInfo(row, info) {
  973. this.show172BaseInfo = true;
  974. if (this.$refs['172JcxxRef']) {
  975. this.$refs['172JcxxRef'].showDialog();
  976. }
  977. this.current172Code = row.code;
  978. },
  979. },
  980. watch:{
  981. 'problemForm.problemType':{
  982. deep: true,
  983. handler(newVal,oldVal){
  984. this.convertGroup()
  985. }
  986. },
  987. 'unitProblemInfo.id':{
  988. deep: true,
  989. handler(newVal,oldVal){
  990. this.searchList()
  991. this.listPblmType()
  992. }
  993. },
  994. 'unitProblemInfo.codes':{
  995. deep: true,
  996. handler(newVal,oldVal){
  997. this.searchList()
  998. }
  999. },
  1000. 'unitProblemInfo.secId':{
  1001. deep: true,
  1002. handler(newVal,oldVal){
  1003. this.searchList()
  1004. }
  1005. }
  1006. // 'weigui.pblmSn':{
  1007. // deep: true,
  1008. // handler(val){
  1009. // this.showPblmList(this.weigui,this.problemForm.weigui,'违规')
  1010. // }
  1011. // },
  1012. // 'hetong.pblmSn':{
  1013. // deep: true,
  1014. // handler(val){
  1015. // this.showPblmList(this.hetong,this.problemForm.hetong,'合同')
  1016. // }
  1017. // },
  1018. // 'quanlity.pblmSn':{
  1019. // deep: true,
  1020. // handler(val){
  1021. // this.showPblmList(this.quanlity,this.problemForm.quanlity,'质量')
  1022. // }
  1023. // },
  1024. // 'gongcheng.pblmSn':{
  1025. // deep: true,
  1026. // handler(val){
  1027. // this.showPblmList(this.gongcheng,this.problemForm.gongcheng,'工程')
  1028. // }
  1029. // }
  1030. },
  1031. filters:{
  1032. inspPblmCate(val){
  1033. if(!val || val == ''){
  1034. return ''
  1035. }
  1036. if(val == '0'){
  1037. return '一般'
  1038. }else if(val == '1'){
  1039. return '较重'
  1040. }else if(val == '2'){
  1041. return '严重'
  1042. }else if(val == '3'){
  1043. return '非常严重'
  1044. }else{
  1045. return val
  1046. }
  1047. },
  1048. }
  1049. }
  1050. </script>
  1051. <style lang="scss">
  1052. .search_wrapper{
  1053. display: flex;
  1054. justify-content: space-between;
  1055. div:last-child{
  1056. min-width: 152px !important;
  1057. }
  1058. }
  1059. .slide-line{
  1060. width: 96%;
  1061. margin-left: 3%;
  1062. height: 1px;
  1063. margin-bottom: 10px;
  1064. border-bottom: dashed 1px #DCDFE6;
  1065. }
  1066. .detail_dialog .el-dialog__body{
  1067. padding: 0 20px 30px;
  1068. }
  1069. </style>