81a72ce1fcadab5716b5c69273ea3dfc7f4e91b2.svn-base 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043
  1. <template>
  2. <div>
  3. <el-container>
  4. <el-aside
  5. width="318px"
  6. style="border-right:2px solid #d5d5ff;float:left;height:calc(100vh - 100px);text-align: center;">
  7. <span style="display: flex;justify-content: center;align-items: center;border-bottom: 1px solid #ebeef5;">
  8. <el-button size="mini" :class="tabType==1 ? 'skactive' : 'sknormal'" @click="tabChange('1')">当前数据</el-button>
  9. <!-- <el-button size="mini" :class="tabType==2 ? 'skactive' : 'sknormal'" @click="tabChange('2')">历史数据</el-button>-->
  10. <el-button size="mini" :class="tabType==0 ? 'skactive' : 'sknormal'" @click="tabChange('0')">全部数据</el-button>
  11. </span>
  12. <div class="tree" style="height: calc(100% - 54px);width: 100%;overflow: auto;display: inline-flex;">
  13. <el-tree
  14. :highlight-current="true"
  15. style="height:100%;"
  16. :data="treeData"
  17. node-key="id"
  18. show-checkbox
  19. @check-change="handleCheckChange"
  20. ref="jigou_tree">
  21. <div class="custom-tree-node" slot-scope="{ node, data }">
  22. <span style="float:left;">
  23. {{ data.pnm}}
  24. </span>
  25. <div style="float:right;display: flex;justify-content: flex-end;align-items: center;width:50%;">
  26. <span style="color:blue;width:80px;"></span>
  27. </div>
  28. </div>
  29. </el-tree>
  30. </div>
  31. </el-aside>
  32. <el-main style="margin:0px;padding:10px;overflow-y:hidden;" class="shuiku" v-loading="exportLoading">
  33. <div class="search_wrapper">
  34. <el-form :inline="true" :model="problemSearch" class="demo-form-inline">
  35. <el-form-item label="问题类别">
  36. <el-select v-model="problemSearch.problemType" clearable>
  37. <el-option :label="item.pblmType" :value="item.value" v-for="(item,index) in problemType" :key="index"></el-option>
  38. </el-select>
  39. </el-form-item>
  40. <!-- <el-form-item label="问题状态">
  41. <el-select v-model="problemSearch.reviConc" clearable>
  42. <el-option :label="item.name" :value="item.value" v-for="(item,index) in problemStatus" :key="index"></el-option>
  43. </el-select>
  44. </el-form-item> -->
  45. <!-- <el-form-item label="整改情况">
  46. <el-select v-model="problemSearch.region" clearable :disabled="problemSearch.reviConc !== '2'">
  47. <el-option :label="item.name" :value="item.value" v-for="(item,index) in rectifyStatus" :key="index"></el-option>
  48. </el-select>
  49. </el-form-item> -->
  50. <el-form-item label="严重程度">
  51. <el-select v-model="problemSearch.inspPblmCate" clearable>
  52. <el-option :label="item.name" :value="item.value" v-for="(item,index) in severity" :key="index"></el-option>
  53. </el-select>
  54. </el-form-item>
  55. <el-form-item label="发现时间">
  56. <el-date-picker
  57. v-model="findTime"
  58. type="daterange"
  59. value-format="yyyy-MM-dd"
  60. range-separator="至"
  61. start-placeholder="开始日期"
  62. end-placeholder="结束日期">
  63. </el-date-picker>
  64. </el-form-item>
  65. <!-- <el-form-item label="复查时间">
  66. <el-date-picker
  67. v-model="problemSearch.recheckDate"
  68. type="daterange"
  69. value-format="yyyy-MM-dd"
  70. range-separator="至"
  71. start-placeholder="开始日期"
  72. end-placeholder="结束日期">
  73. </el-date-picker>
  74. </el-form-item> -->
  75. <el-form-item label="问题督查状态:">
  76. <el-select v-model="problemSearch.state" clearable placeholder="请选择">
  77. <el-option
  78. v-for="item in stateList"
  79. :key="item.value"
  80. :label="item.label"
  81. :value="item.value"
  82. ></el-option>
  83. </el-select>
  84. </el-form-item>
  85. <el-form-item style="display: flex;justify-content: right;">
  86. <el-button style="color:rgba(255,255,255,1);"
  87. type="success"
  88. icon="el-icon-download"
  89. @click="exportExcel">导出EXCEL
  90. </el-button>
  91. <!-- <el-button style="color:rgba(255,255,255,1);float:right;margin-right:10px;margin-bottom:5px;"-->
  92. <!-- type="success"-->
  93. <!-- icon="el-icon-download"-->
  94. <!-- @click="exportWord">导出WORD-->
  95. <!-- </el-button>-->
  96. <el-button style="color:rgba(255,255,255,1);"
  97. type="primary"
  98. icon="el-icon-search"
  99. @click="search">&nbsp;查&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;询&nbsp;
  100. </el-button>
  101. <el-button
  102. style="color:rgba(255,255,255,1);"
  103. type="success"
  104. @click="submitBtn"
  105. >问题提交
  106. </el-button>
  107. <el-button
  108. v-if="isGd"
  109. style="color:rgba(255,255,255,1);"
  110. type="success"
  111. icon="el-icon-download"
  112. @click="toForm"
  113. >导出一表一单
  114. </el-button>
  115. </el-form-item>
  116. </el-form>
  117. </div>
  118. <el-table
  119. v-loading="loading"
  120. :data="tableData"
  121. border
  122. @row-click="openDetails"
  123. @selection-change="handleSelectionChange"
  124. :height="tableHeight"
  125. style="width: 100%">
  126. <el-table-column
  127. type="selection"
  128. min-width="55">
  129. </el-table-column>
  130. <el-table-column
  131. prop="nm"
  132. align="center"
  133. show-overflow-tooltip
  134. label="工程名称"
  135. min-width="100">
  136. </el-table-column>
  137. <el-table-column
  138. show-overflow-tooltip
  139. prop="inspPblmName"
  140. align="center"
  141. label="问题类别"
  142. min-width="100">
  143. </el-table-column>
  144. <el-table-column
  145. prop="reviOrg"
  146. label="责任单位"
  147. align="center"
  148. show-overflow-tooltip
  149. min-width="100">
  150. </el-table-column>
  151. <!-- <el-table-column
  152. v-if="unitLevel"
  153. label="单位名称"
  154. width="180">
  155. <template slot-scope="scope">
  156. {{ scope.row.firstName ? scope.row.firstName : scope.row.secondName ? scope.row.secondName : scope.row.thirdName}}
  157. </template>
  158. </el-table-column> -->
  159. <!-- <el-table-column-->
  160. <!-- show-overflow-tooltip-->
  161. <!-- prop="inspPblmDesc"-->
  162. <!-- align="center"-->
  163. <!-- label="质量问题信息"-->
  164. <!-- width="120">-->
  165. <!-- </el-table-column>-->
  166. <el-table-column
  167. prop="inspPblmCate"
  168. align="center"
  169. label="严重程度"
  170. min-width="80">
  171. <template slot-scope="scope">
  172. <p v-if="scope.row.inspPblmCate == 0"><span class="inspPblmCate" style="background: #27C19F;">一般</span></p>
  173. <p v-if="scope.row.inspPblmCate == 1"><span class="inspPblmCate" style="background: #E6A23C;" >较重</span></p>
  174. <p v-if="scope.row.inspPblmCate == 2"><span class="inspPblmCate" style="background: #F56C6C;" >严重</span></p>
  175. <p v-if="scope.row.inspPblmCate == 3"><span class="inspPblmCate" style="background: #795548;">特别严重</span></p>
  176. </template>
  177. </el-table-column>
  178. <el-table-column
  179. header-align="center"
  180. align="center"
  181. min-width="120"
  182. prop="state"
  183. label="问题督查状态">
  184. <template slot-scope="scope">
  185. <p v-if="Number(scope.row.state) === 0"><span class="inspPblmCate"
  186. style="background: #F56C6C;">未提交</span>
  187. </p>
  188. <p v-if="scope.row.state == 2"><span class="inspPblmCate"
  189. style="background: #409EFF;">已提交</span>
  190. </p>
  191. <p v-if="scope.row.state == 3"><span class="inspPblmCate"
  192. style="background: #67C23A;">已发布</span>
  193. </p>
  194. </template>
  195. </el-table-column>
  196. <el-table-column
  197. prop="ifCasePblm"
  198. label="是否典型"
  199. align="center"
  200. min-width="80">
  201. <template slot-scope="scope">
  202. {{scope.row.ifCasePblm == '1' ? '典型' : scope.row.ifCasePblm == '0' ? '非典型' : ''}}
  203. </template>
  204. </el-table-column>
  205. <!-- <el-table-column-->
  206. <!-- show-overflow-tooltip-->
  207. <!-- prop="attachWgName"-->
  208. <!-- label="违规行为附件"-->
  209. <!-- align="center"-->
  210. <!-- width="80">-->
  211. <!-- </el-table-column>-->
  212. <!-- <el-table-column-->
  213. <!-- show-overflow-tooltip-->
  214. <!-- prop="attachWgSn"-->
  215. <!-- label="违规行为序号"-->
  216. <!-- align="center"-->
  217. <!-- width="80">-->
  218. <!-- </el-table-column>-->
  219. <!-- <el-table-column-->
  220. <!-- show-overflow-tooltip-->
  221. <!-- prop="attachHetongName"-->
  222. <!-- align="center"-->
  223. <!-- label="合同管理附件"-->
  224. <!-- width="80">-->
  225. <!-- </el-table-column>-->
  226. <!-- <el-table-column-->
  227. <!-- show-overflow-tooltip-->
  228. <!-- prop="attachHetongSn"-->
  229. <!-- label="合同管理序号"-->
  230. <!-- align="center"-->
  231. <!-- width="80">-->
  232. <!-- </el-table-column>-->
  233. <!-- <el-table-column-->
  234. <!-- show-overflow-tooltip-->
  235. <!-- prop="attachQuaName"-->
  236. <!-- align="center"-->
  237. <!-- label="质量缺陷附件"-->
  238. <!-- width="80">-->
  239. <!-- </el-table-column>-->
  240. <!-- <el-table-column-->
  241. <!-- show-overflow-tooltip-->
  242. <!-- prop="attachQuaSn"-->
  243. <!-- align="center"-->
  244. <!-- label="质量缺陷序号"-->
  245. <!-- width="80">-->
  246. <!-- </el-table-column>-->
  247. <!-- <el-table-column-->
  248. <!-- show-overflow-tooltip-->
  249. <!-- prop="attachGongdiName"-->
  250. <!-- align="center"-->
  251. <!-- label="工地标准化附件"-->
  252. <!-- width="80">-->
  253. <!-- </el-table-column>-->
  254. <!-- <el-table-column-->
  255. <!-- show-overflow-tooltip-->
  256. <!-- prop="attachGongdiSn"-->
  257. <!-- align="center"-->
  258. <!-- label="工地标准化序号"-->
  259. <!-- width="80">-->
  260. <!-- </el-table-column>-->
  261. <el-table-column
  262. show-overflow-tooltip
  263. prop="persName"
  264. align="center"
  265. label="上报人"
  266. min-width="80">
  267. </el-table-column>
  268. <el-table-column
  269. show-overflow-tooltip
  270. prop="orgNm"
  271. align="center"
  272. label="所在组"
  273. min-width="100">
  274. </el-table-column>
  275. <el-table-column
  276. prop="collTime"
  277. label="发现时间"
  278. align="center"
  279. min-width="100">
  280. <template slot-scope="scope">
  281. {{scope.row.collTime ? formatDateTime(scope.row.collTime) : ''}}
  282. </template>
  283. </el-table-column>
  284. <!-- <el-table-column
  285. prop="reviConc"
  286. label="问题状态"
  287. width="90">
  288. <template slot-scope="scope">
  289. <p v-if="scope.row.reviConc == 0">新问题</p>
  290. <p v-if="scope.row.reviConc == 1">未复查</p>
  291. <p v-if="scope.row.reviConc == 2">已复查</p>
  292. </template>
  293. </el-table-column> -->
  294. <!-- <el-table-column
  295. prop="zip"
  296. label="复查时间"
  297. width="120">
  298. </el-table-column> -->
  299. <el-table-column
  300. prop="hasVedio"
  301. label="有无多媒体"
  302. align="center"
  303. min-width="100">
  304. <template slot-scope="scope">
  305. <p v-if="scope.row.hasVedio == 1">是</p>
  306. <p v-if="scope.row.hasVedio == 0">否</p>
  307. </template>
  308. </el-table-column>
  309. <el-table-column
  310. fixed="right"
  311. label="操作"
  312. min-width="100">
  313. <template slot-scope="scope">
  314. <el-button icon="el-icon-edit" title="修改问题" type="text" v-if="ownPriv('manage') && (!scope.row.reviConc || scope.row.reviConc =='0')" @click.native.stop="toEditProblem(scope.row)"></el-button>
  315. <el-button icon="el-icon-edit" title="修改问题" type="text" v-if="ownPriv('manage') && (scope.row.reviConc == '1' || scope.row.reviConc =='2')" @click.native.stop="toRecheckProblem(scope.row)"></el-button>
  316. <el-button icon="el-icon-view" title="查看详情"type="text" @click.native.stop="toShowDetail(scope.row)"></el-button>
  317. <el-button icon="el-icon-delete" type="text" title="删除问题" @click.native.stop="deteleProblem(scope.row)" v-if="ownPriv('manage')"></el-button>
  318. </template>
  319. </el-table-column>
  320. </el-table>
  321. <el-pagination :pager-count="5" :current-page="pageIndex" background
  322. :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"
  323. :page-sizes="[10, 20, 50, 100]"
  324. @current-change="pageIndexChange" @size-change="handleSizeChange"
  325. ></el-pagination>
  326. </el-main>
  327. </el-container>
  328. <problem-modify :problemId="problemId" :projectType="projectType" :villType="'8'" :unitProblemInfo="unitProblemInfo" v-if="add_dialogVisible" @closeEditDialog="closeEditDialog"></problem-modify>
  329. <rectify-modify :problemId="problemId" :projectType="projectType" :villType="'8'" :rectifyProblemInfo="rectifyProblemInfo" v-if="recheck_dialogVisible" @closeEditDialog="closeRectifyEditDialog"></rectify-modify>
  330. <el-dialog class="outerDialog custom_dialog detail_dialog" width="60%" title="" v-if="supervisionDetailsVisible" :visible.sync="supervisionDetailsVisible">
  331. <el-tabs v-model="activeName" @tab-click="handleDetailClick">
  332. <el-tab-pane label="问题详情" name="problem-detail">
  333. <problem-detail :problemId="problemId" :projectType="projectType" :reviConc="reviConc"></problem-detail>
  334. </el-tab-pane>
  335. <el-tab-pane label="整改详情" name="rectify-detail" v-if="reviConc == '2'">
  336. <rectify-detail :rectifyId="rectifyId"></rectify-detail>
  337. </el-tab-pane>
  338. </el-tabs>
  339. <span slot="footer">
  340. <el-button style="margin-top:5px;" @click="supervisionDetailsVisible = false">返回</el-button>
  341. </span>
  342. </el-dialog>
  343. <el-dialog
  344. class="outerDialog custom_dialog"
  345. title="类型"
  346. width="20%"
  347. :visible.sync="isToFormVisible">
  348. <span>
  349. <p style="display: flex;align-items: center;">
  350. 类型 <el-select v-model="oneForm" placeHolder="请选择一表一单类型" style="width:calc(100% - 60px)!important;padding-left: 10px;">
  351. <el-option label="问题(现场)确认单" value="wtxcqrd-1"></el-option>
  352. <el-option label="问题提交单(流域机构督查办)" value="wttjd-2"></el-option>
  353. </el-select>
  354. </p>
  355. </span>
  356. <span slot="footer">
  357. <el-button type="primary" @click="toFormOk">确定</el-button>
  358. </span>
  359. </el-dialog>
  360. </div>
  361. </template>
  362. <script>
  363. import axios from 'axios';
  364. import {formatDateTime2,formatDateTime2New} from '../../utils/gw_date.js'
  365. import {pblmSubmit} from "../../api/duChaAPI.js";
  366. import {exportModel} from "@util/gw_exportModel";
  367. import request from '../../utils/gw_ajax_request.js'
  368. import { hostUrl } from "@util/global_variable.js";
  369. import problemModify from '../duChaTianBao/project/problemModify.vue'
  370. import rectifyModify from '../duChaTianBao/project/rectifyModify.vue'
  371. import problemDetail from '../duChaTianBao/project/problemDetails.vue'
  372. import rectifyDetail from '../duChaTianBao/project/rectifyDetails.vue'
  373. export default {
  374. props: [],
  375. data(){
  376. return{
  377. oneForm:"wtxcqrd-1",
  378. isToFormVisible:false,
  379. ids:"",
  380. tabType:"0",//0全部数据,1当前数据,2历史数据
  381. tableHeight: window.innerHeight - 280,
  382. tableData:[
  383. {
  384. date: '',
  385. name: '',
  386. province: '',
  387. city: '',
  388. address: '',
  389. zip: ''
  390. }
  391. ],
  392. problemSearch:{
  393. problemType: '',
  394. inspPblmCate: '',
  395. reviConc: '',
  396. regid: '',
  397. regId: '',
  398. pType: '',
  399. state: "",
  400. pageSize: '20',
  401. pageNum: 1
  402. },
  403. stateList: [
  404. {
  405. label: '未提交',
  406. value: '0'
  407. },
  408. {
  409. label: '已提交',
  410. value: '2'
  411. },
  412. {
  413. label: '已发布',
  414. value: '3'
  415. }
  416. ],
  417. problemForm:{
  418. objId: '',
  419. objType: '',
  420. problemType: '',
  421. inspPblmDesc: '',
  422. pblmsTypeId: '',
  423. qualityTypeId: '',
  424. pblmsId: '',
  425. defectTypeId: '',
  426. ifCasePblm: '',
  427. inspPblmCate: '',
  428. weigui: '',
  429. hetong: '',
  430. quanlity: '',
  431. gongcheng: '',
  432. gwComFiles: []
  433. },
  434. rectifyForm: {
  435. rectConc: '',
  436. rectMeas: '',
  437. collTime: '',
  438. gwComFiles: [{
  439. id: "",
  440. filePath: "",
  441. bizId: ""
  442. }]
  443. },
  444. weigui: {
  445. pblmRelDics: [],
  446. pblmSn: ''
  447. },
  448. hetong: {
  449. pblmRelDics: [],
  450. pblmSn: ''
  451. },
  452. quanlity: {
  453. pblmRelDics: [],
  454. pblmSn: ''
  455. },
  456. gongcheng: {
  457. pblmRelDics: [],
  458. pblmSn: ''
  459. },
  460. pblmPointNum: '',
  461. pblmDescList: '',
  462. pblmDescListHetong: '',
  463. pblmAttach: [],
  464. pblmsTypeId: '',
  465. pblmId: '',
  466. imgList: [],
  467. videoList:[],
  468. audioList: [],
  469. pblmStat: '',
  470. gwComFiles: [],
  471. problemType: [
  472. {pblmType: '违规行为',value:'0'},
  473. {pblmType: '质量缺陷',value:'1'},
  474. {pblmType: '合同问题',value:'2'},
  475. {pblmType: '工程缺陷',value:'3'}
  476. ],
  477. problemStatus: [
  478. {name: '已复查',value:'2'},
  479. {name: '未复查',value:'1'},
  480. {name: '新问题',value:'0'}
  481. ],
  482. rectifyStatus: [
  483. {name: '未整改',value:'0'},
  484. {name: '整改中',value:'1'},
  485. {name: '已整改',value:'2'}
  486. ],
  487. severity:[
  488. {name: '一般',value:'0'},
  489. {name: '较重',value:'1'},
  490. {name: '严重',value:'2'},
  491. {name: '非常严重',value:'3'}
  492. ],
  493. dialogType: '添加',
  494. dialogVisible: true,
  495. add_dialogVisible: false,
  496. recheck_dialogVisible: false,
  497. chooseWeiguiProblem: false,
  498. chooseHeTongProblem: false,
  499. chooseQuanlityProblem: false,
  500. chooseGongchengProblem: false,
  501. checked: false,
  502. problemId: '',
  503. supervisionDetailsVisible:false,
  504. projectType: '',
  505. reviConc: '',
  506. findTime: [],
  507. rectifyRow: {},
  508. isRectify: false,
  509. rectifyId: '',
  510. activeName: 'problem-detail',
  511. pageIndex: 1,
  512. pageSize: 20,
  513. total: 0,
  514. treeData: [],
  515. findUseOrgArray: [],
  516. treeNodeArray: [],
  517. loading: true,
  518. multipleSelection: [], // 已选
  519. rectifyProblemInfo: null,
  520. exportLoading:false,
  521. datas:{}
  522. }
  523. },
  524. computed: {
  525. persId() {
  526. return localStorage.getItem("userid")
  527. ? localStorage.getItem("userid")
  528. : "1098101939614724096";
  529. },
  530. formatDateTime(){
  531. return formatDateTime2New
  532. },
  533. hostUrl(){
  534. return hostUrl
  535. },
  536. isGd(){
  537. if(localStorage.getItem('currentRlcode').substring(0,2)=="44"){
  538. return true;
  539. }else{
  540. return false;
  541. }
  542. }
  543. },
  544. components: {
  545. upload: resolve => {
  546. require(["../../widgets/uploadFile.vue"], resolve);
  547. },
  548. problemModify: problemModify,
  549. problemDetail: problemDetail,
  550. rectifyDetail: rectifyDetail,
  551. rectifyModify: rectifyModify
  552. },
  553. mounted(){
  554. this.getLeftTreeData();
  555. this.searchList()
  556. },
  557. activated(){
  558. // 监督司提的一个优化,来回切换页签的时候,能不能不主动刷新页面,这样他们不方便来回对比数据
  559. // this.getLeftTreeData();
  560. // this.search();
  561. // this.findParams = {
  562. // hasVedio:"",
  563. // adCode: "",
  564. // pblmStat: "",
  565. // inspPblmCate: "",
  566. // ifCasePblm: "",
  567. // nm: "",
  568. // rsName: "",
  569. // adFullName: "",
  570. // startTime: "",
  571. // endTime: "",
  572. // objType: 1,
  573. // inspPblmName: "",
  574. // persId: localStorage.getItem("userid")
  575. // }
  576. },
  577. methods:{
  578. openDetails(row){
  579. this.problemId = row.pblmId
  580. this.rectifyId = row.guid
  581. this.projectType = row.villType == '8' ? '1' : row.villType == '9' ? '2' : '1'
  582. this.reviConc = row.reviConc
  583. this.supervisionDetailsVisible = true
  584. },
  585. tabChange(tabType){
  586. this.tabType = tabType;
  587. this.getLeftTreeData();
  588. this.searchList();
  589. },
  590. getLeftTreeData() {
  591. var _self = this;
  592. request.get("/dc/organization/base/getAllNode", {
  593. params: {
  594. userId: this.persId,
  595. orgType: "004",
  596. tabType:this.tabType
  597. }
  598. }).then(res => {
  599. let data = res.data;
  600. data.forEach(ele => {
  601. if (ele.pid == null || ele.pid == "") {
  602. ele.pid = "004";
  603. }
  604. });
  605. data = _self.getTrees(data);
  606. _self.treeData = data;
  607. console.log(data);
  608. });
  609. },
  610. search(){
  611. this.searchList()
  612. },
  613. searchList(){
  614. let _self = this;
  615. this.problemSearch.persId = this.persId
  616. this.problemSearch.pType = '4'
  617. // this.problemSearch.regid = this.unitProblemInfo.oneUnitId ? this.unitProblemInfo.oneUnitId : this.unitProblemInfo.id //管理单位唯一标识
  618. // this.problemSearch.regId = this.unitProblemInfo.oneUnitId ? this.unitProblemInfo.oneUnitId : this.unitProblemInfo.id //管理单位唯一标识
  619. this.problemSearch.pageSize = this.pageSize
  620. this.problemSearch.pageNum = this.pageIndex
  621. this.problemSearch.reviConc = "0"
  622. console.log(this.findTime)
  623. if(this.findTime && this.findTime.length){
  624. this.problemSearch['startTime'] = this.findTime[0]
  625. this.problemSearch['endTime'] = this.findTime[1]
  626. }else{
  627. this.problemSearch['startTime'] = ''
  628. this.problemSearch['endTime'] = ''
  629. }
  630. this.problemSearch.tabType = this.tabType;
  631. request.get("/dc/organization/base/getAllNode", {params: {userId: this.userId,orgType: "004",tabType:this.tabType}}).then(res => {
  632. _self.loading = true;
  633. let orgAllNode = res.data;
  634. let data = _self.problemSearch;
  635. _self.findUseOrgArray = [];
  636. _self.treeNodeArray.forEach(item => {
  637. if (item.id.length < 12) {
  638. orgAllNode.forEach(orgItem => {
  639. if (orgItem.id.startsWith(item.code)) {
  640. _self.findUseOrgArray.push(orgItem.id);
  641. }
  642. });
  643. }
  644. _self.findUseOrgArray.push(item.id);
  645. });
  646. if (_self.findUseOrgArray.length > 0) {
  647. data["orgIds"] = _self.findUseOrgArray.join(",");
  648. } else {
  649. data["orgIds"] = "";
  650. }
  651. request.post(`/dc/insp/pblm/page/keyReg`, this.problemSearch).then(res => {
  652. _self.loading = false;
  653. _self.multipleSelection = [];
  654. if (res.success) {
  655. this.tableData = res.data.list;
  656. this.total = res.data.total;
  657. if(this.problemSearch.pType == '7'){
  658. // this.tableData.forEach(ele=>{
  659. // ele['reviOrg'] = this.unitLevel
  660. // })
  661. }
  662. }
  663. });
  664. });
  665. },
  666. async submitBtn() {
  667. if (this.multipleSelection.length === 0) {
  668. this.$message.warning('请至少选择一条问题');
  669. return;
  670. }
  671. let newArray = this.multipleSelection.map((item) => {
  672. return {
  673. "objId": item.objId,
  674. "objType": item.objType,
  675. "state": "3"
  676. }
  677. });
  678. const {success, message} = await pblmSubmit(newArray);
  679. if (success) {
  680. this.$message.success('问题发布成功');
  681. this.search();
  682. } else {
  683. this.$message.warning(message);
  684. }
  685. },
  686. toEditProblem(row){
  687. this.dialogType = '修改'
  688. this.unitProblemInfo = row
  689. this.problemId = row.pblmId
  690. this.projectType = row.villType == '8' ? '1' : row.villType == '9' ? '2' : '1'
  691. this.add_dialogVisible = true
  692. },
  693. // 复查
  694. toRecheckProblem(row){
  695. this.rectifyProblemInfo = row
  696. this.dialogType = row.reviConc == '1' ? '添加' : row.reviConc == '2' ? '修改' : '添加'
  697. this.rectifyForm.rectConc = row.rectConc
  698. this.rectifyForm.rectMeas = row.rectMeas
  699. Object.assign(this.rectifyRow,row)
  700. if(this.dialogType == '添加'){
  701. this.rectifyForm.collTime = ''
  702. }else{
  703. this.rectifyForm.collTime = this.formatDateTime(row.collTime)
  704. }
  705. this.recheck_dialogVisible = true
  706. },
  707. // 查看详情
  708. toShowDetail(row){
  709. this.problemId = row.pblmId
  710. this.rectifyId = row.guid
  711. this.projectType = row.villType == '8' ? '1' : row.villType == '9' ? '2' : '1'
  712. this.reviConc = row.reviConc
  713. this.supervisionDetailsVisible = true
  714. },
  715. deteleProblem(row){
  716. this.$confirm('确认删除当前问题吗?', '提示', {
  717. confirmButtonText: '确定',
  718. cancelButtonText: '取消',
  719. type: 'warning'
  720. }).then(() => {
  721. request.get(`/dc/insp/pblm/delete/${row.pblmId}/${this.persId}`).then(res=>{
  722. if(res.success){
  723. this.$message.success('删除成功')
  724. this.searchList()
  725. }else{
  726. this.$message.error(res.message)
  727. }
  728. })
  729. }).catch(() => {
  730. });
  731. },
  732. // 文件上传
  733. submitUpload() {
  734. this.$refs.upload.submit();
  735. },
  736. updatefilelist(arg) {
  737. if(this.isRectify){
  738. request.post('/dc/insp/rectFdbk',{
  739. id: this.pblmId,
  740. gwComFiles: arg
  741. }).then(res => {
  742. this.removeNewSupervision()
  743. });
  744. }else{
  745. if(this.dialogType == '修改'){
  746. this.problemForm.gwComFiles = this.problemForm.gwComFiles.concat(arg)
  747. }else{
  748. this.problemForm.gwComFiles = arg
  749. }
  750. request.post('/dc/insp/pblm/update',{
  751. pblmId: this.pblmId,
  752. gwComFiles: this.problemForm.gwComFiles,
  753. pblmStat: this.pblmStat
  754. }).then(res => {
  755. this.searchList()
  756. this.removeNewSupervision()
  757. });
  758. }
  759. },
  760. removeNewSupervision(arg){
  761. if (arg) {
  762. console.log(arg);
  763. var args = this.gwComFiles.concat(arg);
  764. this.updatefilelist(args);
  765. }
  766. this.$message.success('保存成功')
  767. this.$emit('closeDialog')
  768. this.gwComFiles = [];
  769. this.$refs.uploadFile.init();
  770. },
  771. handleClose(){
  772. this.$emit('dialogClose')
  773. },
  774. handleDetailClick(tab, event) {
  775. console.log(tab, event);
  776. },
  777. pageIndexChange(val) {
  778. this.pageIndex = val;
  779. this.searchList();
  780. },
  781. handleSizeChange(val) {
  782. this.pageSize = val;
  783. this.searchList();
  784. },
  785. //格式化树形数据
  786. getTrees(list) {
  787. //@wxcwater重写方法 适应多个树
  788. let highLevelLength = 99;//预设最大节点id长度,目前最大应该为12,所以设置为99保证正常
  789. let _self =this;
  790. list.forEach((item,index)=>{
  791. item['pidLength'] = item.pid&&item.pid!=''?item.pid.length:0;
  792. if(highLevelLength>item.pidLength){
  793. highLevelLength = item.pidLength;
  794. }
  795. });
  796. console.log(highLevelLength);
  797. let heightLevelNode = [];
  798. list.forEach((item,index)=>{
  799. if(highLevelLength>=item.pidLength){
  800. heightLevelNode.push(item);
  801. }
  802. });
  803. list.forEach((item,index)=>{
  804. heightLevelNode.forEach((pItem)=>{
  805. _self.addTreeNode(pItem,item);
  806. });
  807. });
  808. console.log(heightLevelNode);
  809. return heightLevelNode;
  810. },
  811. addTreeNode:function(treeNode,leafNode){
  812. let _self = this;
  813. if(!treeNode.hasOwnProperty('children')){
  814. treeNode['children'] = [];
  815. }
  816. if(leafNode.pid == treeNode.id){
  817. treeNode.children.push(leafNode);
  818. return;
  819. }
  820. treeNode.children.forEach((item) => {
  821. _self.addTreeNode(item,leafNode);
  822. });
  823. },
  824. handleCheckChange(data, checked, indeterminate) {
  825. let cNarray = this.$refs["jigou_tree"].getCheckedNodes();
  826. console.log(cNarray);
  827. this.treeNodeArray = cNarray;
  828. },
  829. // 已选择项
  830. handleSelectionChange(val) {
  831. this.multipleSelection = val;
  832. },
  833. closeEditDialog(){
  834. this.add_dialogVisible = false
  835. this.searchList()
  836. },
  837. closeRectifyEditDialog(){
  838. this.recheck_dialogVisible = false
  839. this.searchList()
  840. },
  841. toForm(){
  842. var idArr = [];
  843. if(this.multipleSelection && this.multipleSelection.length==0){
  844. this.$message.warning("请选择数据");
  845. return false;
  846. }else{
  847. this.multipleSelection.forEach((item)=>{
  848. idArr.push(item.pblmId);
  849. })
  850. }
  851. this.ids = idArr.join(",");
  852. this.isToFormVisible = true;
  853. },
  854. toFormOk(){
  855. let host = hostUrl;
  856. let nginx = '/pageofficePath/';
  857. var params = {
  858. ids:this.ids
  859. }
  860. axios.post('/pageofficePath/pageoffice/pblm/list/sendIds',params).then((res)=> {
  861. if(res.status==200){
  862. let href = 'pageoffice://|' + host + nginx + '/pageoffice/pblm/list/word?filename='+this.oneForm+'|width=1100px;height=800px;ismodal=false;||91A4EE66EC1921F376873E85D6C74FFA|A890649B44577C32CE1930797E1299F9';
  863. let a = document.createElement('a'); // 创建a标签
  864. a.setAttribute('href', href);// href链接
  865. a.click();// 自执行点击事件
  866. }
  867. })
  868. },
  869. async exportExcel() {
  870. let _self = this;
  871. _self.exportLoading = true;
  872. await request.get("/dc/organization/base/getAllNode", {
  873. params: {
  874. userId: this.persId,
  875. orgType: "004"
  876. }
  877. }).then(res => {
  878. let orgAllNode = res.data;
  879. let data = _self.problemSearch;
  880. data.pageNum = _self.pageIndex;
  881. data.pageSize = _self.pageSize;
  882. data.villType = "8";
  883. data.pType = "4";
  884. this.datas = JSON.stringify(data);
  885. _self.treeNodeArray.forEach(item => {
  886. console.log(item);
  887. if (item.id.length < 12) {
  888. orgAllNode.forEach(orgItem => {
  889. if (orgItem.id.startsWith(item.id)) {
  890. _self.findUseOrgArray.push(orgItem.id);
  891. }
  892. });
  893. } else {
  894. _self.findUseOrgArray.push(item.id);
  895. }
  896. });
  897. });
  898. let url = "/pdcApi/dc/insp/pblm/page/export";
  899. let type = "post";
  900. let exportName = "水利工程建设问题列表.xls"
  901. let result = await exportModel(type,url,exportName,this.datas);
  902. _self.exportLoading = result;
  903. },
  904. async exportWord() {
  905. let _self = this;
  906. _self.exportLoading = true;
  907. await request.get("/dc/organization/base/getAllNode", {
  908. params: {
  909. userId: this.persId,
  910. orgType: "004"
  911. }
  912. }).then(res => {
  913. let orgAllNode = res.data;
  914. let data = _self.findParams;
  915. data.pageNum = _self.pageIndex;
  916. data.pageSize = _self.pageSize;
  917. data.villType = "8";
  918. data.pType = "4";
  919. this.datas = data;
  920. _self.treeNodeArray.forEach(item => {
  921. if (item.id.length < 12) {
  922. orgAllNode.forEach(orgItem => {
  923. if (orgItem.id.startsWith(item.id)) {
  924. _self.findUseOrgArray.push(orgItem.id);
  925. }
  926. });
  927. } else {
  928. _self.findUseOrgArray.push(item.id);
  929. }
  930. });
  931. });
  932. //下载word文档2
  933. await request.post('/keyReg/doc',this.datas).then(res=>{
  934. if(res.success){
  935. _self.exportLoading = false;
  936. console.log(this.response)
  937. var a = document.createElement('a');
  938. a.href = `${this.hostUrl}${res.data.downloadPath}`;
  939. //设置文件名称
  940. a.download = '水利工程运行问题详情.doc';
  941. a.click();
  942. }else{
  943. _self.$mesage.error(res.message)
  944. }
  945. }).catch(res=>{
  946. _self.$mesage.error(res.message)
  947. })
  948. },
  949. },
  950. watch:{
  951. // 'weigui.pblmSn':{
  952. // deep: true,
  953. // handler(val){
  954. // this.showPblmList(this.weigui,this.problemForm.weigui,'违规')
  955. // }
  956. // },
  957. // 'hetong.pblmSn':{
  958. // deep: true,
  959. // handler(val){
  960. // this.showPblmList(this.hetong,this.problemForm.hetong,'合同')
  961. // }
  962. // },
  963. // 'quanlity.pblmSn':{
  964. // deep: true,
  965. // handler(val){
  966. // this.showPblmList(this.quanlity,this.problemForm.quanlity,'质量')
  967. // }
  968. // },
  969. // 'gongcheng.pblmSn':{
  970. // deep: true,
  971. // handler(val){
  972. // this.showPblmList(this.gongcheng,this.problemForm.gongcheng,'工程')
  973. // }
  974. // }
  975. },
  976. filters:{
  977. inspPblmCate(val){
  978. if(!val || val == ''){
  979. return ''
  980. }
  981. if(val == '0'){
  982. return '一般'
  983. }else if(val == '1'){
  984. return '较重'
  985. }else if(val == '2'){
  986. return '严重'
  987. }else if(val == '3'){
  988. return '非常严重'
  989. }else{
  990. return val
  991. }
  992. },
  993. }
  994. }
  995. </script>
  996. <style lang="scss">
  997. .search_wrapper{
  998. width: 100%;
  999. min-height: 70px;
  1000. div:last-child{
  1001. min-width: 160px;
  1002. }
  1003. }
  1004. .slide-line{
  1005. width: 96%;
  1006. margin-left: 3%;
  1007. height: 1px;
  1008. margin-bottom: 10px;
  1009. border-bottom: dashed 1px #DCDFE6;
  1010. }
  1011. .detail_dialog .el-dialog__body{
  1012. padding: 0 20px 30px;
  1013. }
  1014. .inspPblmCate{
  1015. padding: 2px 10px;
  1016. border-radius:10px;
  1017. color: #ffffff;
  1018. -webkit-border-radius: 10px;
  1019. -moz-border-radius: 10px;
  1020. border-radius: 10px;
  1021. }
  1022. .skactive{
  1023. background: #3f8eff !important;
  1024. color:white !important;
  1025. margin-top: 5px;
  1026. margin-bottom: 5px;
  1027. }
  1028. .sknormal{
  1029. background: white;
  1030. margin-top: 5px;
  1031. margin-bottom: 5px;
  1032. }
  1033. </style>