45f3a63b6d15b1a0ee8633c5348ddfccefc8c9f5.svn-base 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558
  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-input v-model="problemSearch.nm" clearable></el-input>
  8. </el-form-item>
  9. <el-form-item label="问题类别">
  10. <el-select v-model="problemSearch.inspPblmName" clearable>
  11. <el-option :label="item.inspPblmsName" :value="item.inspPblmsName" v-for="(item,index) in problemType" :key="index"></el-option>
  12. </el-select>
  13. </el-form-item>
  14. <!--<el-form-item label="问题状态">-->
  15. <!--<el-select v-model="problemSearch.reviConc" clearable>-->
  16. <!--<el-option :label="item.name" :value="item.value" v-for="(item,index) in problemStatus" :key="index"></el-option>-->
  17. <!--</el-select>-->
  18. <!--</el-form-item>-->
  19. <el-form-item label="是否典型">
  20. <el-select v-model="problemSearch.ifCasePblm" clearable placeholder="请选择">
  21. <el-option
  22. v-for="item in supervision"
  23. :key="item.value"
  24. :label="item.label"
  25. :value="item.value"
  26. ></el-option>
  27. </el-select>
  28. </el-form-item>
  29. <el-form-item label="严重程度">
  30. <el-select v-model="problemSearch.inspPblmCate" clearable>
  31. <el-option :label="item.name" :value="item.value" v-for="(item,index) in severity" :key="index"></el-option>
  32. </el-select>
  33. </el-form-item>
  34. <el-form-item label="发现时间">
  35. <el-date-picker
  36. v-model="findTime"
  37. type="daterange"
  38. value-format="yyyy-MM-dd"
  39. range-separator="至"
  40. start-placeholder="开始日期"
  41. end-placeholder="结束日期">
  42. </el-date-picker>
  43. </el-form-item>
  44. </el-form>
  45. <div>
  46. <el-button type="primary" @click="search">查询</el-button>
  47. <!--<el-button type="primary" @click="toAddProblem" v-if="ownPriv('manage')">新增问题</el-button>-->
  48. </div>
  49. </div>
  50. <el-table
  51. :data="tableData"
  52. border
  53. :height="tableHeight"
  54. v-loading="loading"
  55. style="width: 100%">
  56. <el-table-column
  57. fixed
  58. prop="nm"
  59. show-overflow-tooltip
  60. label="工程名称"
  61. min-width="180">
  62. </el-table-column>
  63. <el-table-column
  64. min-width="140"
  65. prop="inspPblmsName"
  66. label="问题类别"
  67. show-overflow-tooltip
  68. ></el-table-column>
  69. <el-table-column
  70. show-overflow-tooltip
  71. prop="inspPblmDesc"
  72. label="督查问题描述"
  73. min-width="150">
  74. </el-table-column>
  75. <el-table-column
  76. prop="inspPblmCate"
  77. label="严重程度"
  78. min-width="90">
  79. <template slot-scope="scope">
  80. {{scope.row.inspPblmCate | inspPblmCate}}
  81. </template>
  82. </el-table-column>
  83. <el-table-column
  84. prop="ifCasePblm"
  85. label="是否典型"
  86. min-width="90">
  87. <template slot-scope="scope">
  88. {{scope.row.ifCasePblm == '1' ? '典型' : scope.row.ifCasePblm == '0' ? '非典型' : ''}}
  89. </template>
  90. </el-table-column>
  91. <el-table-column
  92. prop="collTime"
  93. label="发现时间"
  94. min-width="150">
  95. <template slot-scope="scope">
  96. {{scope.row.collTime ? formatDateTime(scope.row.collTime) : ''}}
  97. </template>
  98. </el-table-column>
  99. <el-table-column
  100. fixed="right"
  101. label="操作"
  102. min-width="160">
  103. <template slot-scope="scope">
  104. <el-button type="success" plain @click="lookOver(scope.row)">查看</el-button>
  105. </template>
  106. </el-table-column>
  107. </el-table>
  108. <el-pagination :pager-count="5" :current-page="pageIndex"
  109. :page-size="pageSize" layout="total, prev, pager, next" :total="total"
  110. @current-change="pageIndexChange" @size-change="handleSizeChange"
  111. ></el-pagination>
  112. </el-card>
  113. <!-- 淤地坝督查信息 -->
  114. <ydbDuChaInfo v-if="showYdbDuChaInfo"
  115. ref="ydbTianBaoRef"
  116. :currentObjectRgstrId="currentRgstrId"
  117. :currentYdbCode="currentYdbCode"
  118. :currentObjectId="currentObjId"
  119. :currentObjectName="currentObjectName"
  120. showOrEdit="show"
  121. :activeName="activeName"
  122. @cancelHandler="ydbCancelHandler"></ydbDuChaInfo>
  123. </div>
  124. </template>
  125. <script>
  126. import {formatDateTime2} from '../../../utils/gw_date.js'
  127. import request from '../../../utils/gw_ajax_request.js'
  128. import problemDialog from "../../duChaWenTi/addProblem/yudiba_problem_dialog.vue";
  129. export default {
  130. props: ['unitProblemInfo','currentRow','villType','unitLevel'],
  131. data(){
  132. return{
  133. tableHeight: window.innerHeight - 330,
  134. tableData:[],
  135. problemSearch:{
  136. inspPblmName: '',
  137. inspPblmCate: '',
  138. reviConc: '',
  139. pType: '',
  140. pageSize: '10',
  141. pageNum: 1
  142. },
  143. problemForm:{
  144. objId: '',
  145. objType: '',
  146. problemType: '',
  147. inspPblmDesc: '',
  148. pblmsTypeId: '',
  149. qualityTypeId: '',
  150. pblmsId: '',
  151. defectTypeId: '',
  152. ifCasePblm: '',
  153. inspPblmCate: '',
  154. weigui: '',
  155. hetong: '',
  156. quanlity: '',
  157. gongcheng: '',
  158. gwComFiles: []
  159. },
  160. rectifyForm: {
  161. rectConc: '',
  162. rectMeas: '',
  163. collTime: '',
  164. gwComFiles: [{
  165. id: "",
  166. filePath: "",
  167. bizId: ""
  168. }]
  169. },
  170. weigui: {
  171. pblmRelDics: [],
  172. pblmSn: ''
  173. },
  174. hetong: {
  175. pblmRelDics: [],
  176. pblmSn: ''
  177. },
  178. quanlity: {
  179. pblmRelDics: [],
  180. pblmSn: ''
  181. },
  182. gongcheng: {
  183. pblmRelDics: [],
  184. pblmSn: ''
  185. },
  186. pblmPointNum: '',
  187. pblmDescList: '',
  188. pblmDescListHetong: '',
  189. pblmAttach: [],
  190. pblmsTypeId: '',
  191. pblmId: '',
  192. imgList: [],
  193. videoList:[],
  194. audioList: [],
  195. pblmStat: '',
  196. gwComFiles: [],
  197. problemType: [],
  198. problemStatus: [],
  199. severity:[
  200. {name: '一般',value:'0'},
  201. {name: '较重',value:'1'},
  202. {name: '严重',value:'2'},
  203. // {name: '非常严重',value:'3'}
  204. ],
  205. dialogType: '添加',
  206. dialogVisible: true,
  207. add_dialogVisible: false,
  208. recheck_dialogVisible: false,
  209. chooseWeiguiProblem: false,
  210. chooseHeTongProblem: false,
  211. chooseQuanlityProblem: false,
  212. chooseGongchengProblem: false,
  213. checked: false,
  214. problemId: '',
  215. supervisionDetailsVisible:false,
  216. projectType: '',
  217. reviConc: '',
  218. findTime: [],
  219. rectifyRow: {},
  220. isRectify: false,
  221. rectifyId: '',
  222. activeName: 'problem-detail',
  223. pageIndex: 1,
  224. pageSize: 20,
  225. total: 0,
  226. loading: false,
  227. showWenTiTianBaoPl: false,
  228. //问题修改弹窗
  229. problemInfo: null,
  230. rectifyProblemInfo: null,
  231. edit_dialogVisible: false,
  232. recheck_edit_dialogVisible: false,
  233. showAddProblemDialog: false,
  234. supervision: [
  235. {
  236. value: "1",
  237. label: "是"
  238. },
  239. {
  240. value: "0",
  241. label: "否"
  242. }
  243. ],
  244. showYdbDuChaInfo: false,
  245. currentYdbCode: "",
  246. currentObjectName: "",
  247. currentObjId: "",
  248. currentRgstrId: ""
  249. }
  250. },
  251. computed: {
  252. persId() {
  253. return localStorage.getItem("userid")
  254. ? localStorage.getItem("userid")
  255. : "1098101939614724096";
  256. },
  257. formatDateTime(){
  258. return formatDateTime2
  259. }
  260. },
  261. components: {
  262. upload: resolve => {
  263. require(["../../../widgets/uploadFile.vue"], resolve);
  264. },
  265. // 修改问题
  266. problemEdit: resolve => {
  267. require(["../../duChaWenTi/yuDiBaProblemModify.vue"], resolve);
  268. },
  269. //详情页
  270. supervisionDetails: resolve => {
  271. require(["../../duChaWenTi/supervisionDetails_yudiba.vue"], resolve);
  272. },
  273. problemDialog: problemDialog,
  274. ydbDuChaInfo: resolve => {
  275. require(['../../../views/zongHeXinXiOl/components/popupWindow/ydb/main'], resolve)
  276. },
  277. },
  278. methods:{
  279. search(){
  280. this.searchList()
  281. },
  282. closePlDialog(val) {
  283. this.showAddProblemDialog = false;
  284. this.search()
  285. },
  286. searchList(){
  287. if(this.currentRow.children == undefined){
  288. delete this.problemSearch.orgId;
  289. this.problemSearch.objId = this.currentRow.id;
  290. this.loading = true
  291. this.problemSearch.persId = this.persId
  292. this.problemSearch.pType = this.villType
  293. this.problemSearch.pageSize = this.pageSize
  294. this.problemSearch.pageNum = this.pageIndex
  295. console.log(this.findTime)
  296. if(this.findTime && this.findTime.length){
  297. this.problemSearch['startTime'] = this.findTime[0]
  298. this.problemSearch['endTime'] = this.findTime[1]
  299. this.problemSearch.reviConc = this.problemSearch.reviConc || "0"
  300. }else{
  301. this.problemSearch['startTime'] = ''
  302. this.problemSearch['endTime'] = ''
  303. }
  304. request.post(`/dc/insp/pblm/page/sdPblm`, this.problemSearch).then(res => {
  305. if (res.success) {
  306. this.tableData = res.data.list;
  307. this.total = res.data.total;
  308. }
  309. this.loading = false
  310. });
  311. }else{
  312. this.tableData = [];
  313. this.total = 0;
  314. }
  315. },
  316. toAddProblem(){
  317. if(this.problemSearch.objId){
  318. this.showAddProblemDialog = true
  319. }else{
  320. this.$message.error("请选择左侧工程");
  321. }
  322. },
  323. toEditProblem(row){
  324. this.dialogType = '修改'
  325. this.problemId = row.pblmId
  326. this.problemInfo = row
  327. this.projectType = row.objType
  328. this.edit_dialogVisible = true
  329. },
  330. // 查看详情
  331. toShowDetail(row){
  332. this.problemId = row.pblmId
  333. this.supervisionDetailsVisible = true
  334. },
  335. deteleProblem(row){
  336. this.$confirm('确认删除当前问题吗?', '提示', {
  337. confirmButtonText: '确定',
  338. cancelButtonText: '取消',
  339. type: 'warning'
  340. }).then(() => {
  341. request.get(`/dc/insp/pblm/delete/${row.pblmId}/${this.persId}`).then(res=>{
  342. if(res.success){
  343. this.$message.success('删除成功')
  344. this.searchList()
  345. }else{
  346. this.$message.error(res.message)
  347. }
  348. })
  349. }).catch(() => {
  350. });
  351. },
  352. // 文件上传
  353. submitUpload() {
  354. this.$refs.upload.submit();
  355. },
  356. updatefilelist(arg) {
  357. if(this.isRectify){
  358. request.post('/dc/insp/rectFdbk',{
  359. id: this.pblmId,
  360. gwComFiles: arg
  361. }).then(res => {
  362. this.removeNewSupervision()
  363. });
  364. }else{
  365. if(this.dialogType == '修改'){
  366. this.problemForm.gwComFiles = this.problemForm.gwComFiles.concat(arg)
  367. }else{
  368. this.problemForm.gwComFiles = arg
  369. }
  370. request.post('/dc/insp/pblm/update',{
  371. pblmId: this.pblmId,
  372. gwComFiles: this.problemForm.gwComFiles,
  373. pblmStat: this.pblmStat
  374. }).then(res => {
  375. this.searchList()
  376. this.removeNewSupervision()
  377. });
  378. }
  379. },
  380. removeNewSupervision(arg){
  381. if (arg) {
  382. console.log(arg);
  383. var args = this.gwComFiles.concat(arg);
  384. this.updatefilelist(args);
  385. }
  386. this.$message.success('保存成功')
  387. this.$emit('closeDialog')
  388. this.gwComFiles = [];
  389. this.$refs.uploadFile.init();
  390. },
  391. handleDetailClick(tab, event) {
  392. console.log(tab, event);
  393. },
  394. pageIndexChange(val) {
  395. this.pageIndex = val;
  396. this.searchList();
  397. },
  398. handleSizeChange(val) {
  399. this.pageSize = val;
  400. this.searchList();
  401. },
  402. showPlDialog() {
  403. this.showWenTiTianBaoPl = true;
  404. },
  405. // closePlDialog(val) {
  406. // this.showWenTiTianBaoPl = false;
  407. // },
  408. // 控制修改弹窗
  409. closeEditDialog(){
  410. this.edit_dialogVisible = false
  411. this.problemId = "";
  412. this.searchList()
  413. },
  414. getproblemSmallType() {
  415. let result = [];
  416. request.get('/dc/insp/pblms/getPblmType', {
  417. params: {
  418. type: '11',
  419. pguid: '11000000000000000000000000000000'
  420. }
  421. }).then(res => {
  422. if (res.success) {
  423. res.data.forEach((ele) => {
  424. let haveinspPblmsName = false;
  425. result.forEach((inspPblm) => {
  426. if (inspPblm['inspPblmsName'] == ele.inspPblmsName) {
  427. //
  428. let havechekPoint = false;
  429. inspPblm['checkPoints'].forEach((chekPoint) => {
  430. if (chekPoint['checkPointName'] == ele.checkPoint) {
  431. //
  432. chekPoint['pblmDescs'].push({
  433. pblmDesc: ele.pblmDesc,
  434. sn: ele.sn,
  435. guid: ele.guid,
  436. });
  437. havechekPoint = true;
  438. }
  439. });
  440. if (!havechekPoint) {
  441. let newCheckPoint = {};
  442. newCheckPoint['checkPointName'] = ele.checkPoint;
  443. newCheckPoint['sort2'] = ele.sort2;
  444. newCheckPoint['pblmDescs'] = [{
  445. pblmDesc: ele.pblmDesc,
  446. sn: ele.sn,
  447. guid: ele.guid,
  448. }]
  449. inspPblm['checkPoints'].push(newCheckPoint);
  450. }
  451. haveinspPblmsName = true;
  452. }
  453. });
  454. if (!haveinspPblmsName) {
  455. let haveinspPblmsObj = {};
  456. haveinspPblmsObj['inspPblmsName'] = ele.inspPblmsName;
  457. haveinspPblmsObj['sort1'] = ele.sort1;
  458. haveinspPblmsObj['checkPoints'] = [{
  459. checkPointName: ele.checkPoint,
  460. sort2: ele.sort2,
  461. pblmDescs: [{
  462. pblmDesc: ele.pblmDesc,
  463. sn: ele.sn,
  464. guid: ele.guid,
  465. }]
  466. }];
  467. result.push(haveinspPblmsObj);
  468. }
  469. })
  470. this.problemType = result;
  471. console.log(this.problemType);
  472. }
  473. })
  474. },
  475. //成果查看
  476. lookOver(row){
  477. this.currentYdbCode = row.code;
  478. this.currentObjectName = row.nm;
  479. if (row.rgstrId) {
  480. this.currentRgstrId = row.rgstrId;
  481. }
  482. if (row.objId) {
  483. this.currentObjId = row.objId;
  484. }
  485. this.activeName = "登记信息";
  486. this.showYdbDuChaInfo = true;
  487. if (this.$refs['ydbTianBaoRef']) {
  488. this.$refs['ydbTianBaoRef'].showDialog();
  489. }
  490. }
  491. },
  492. watch:{
  493. 'currentRow.id':{
  494. deep: true,
  495. handler(newVal,oldVal){
  496. this.searchList()
  497. }
  498. },
  499. 'problemForm.problemType':{
  500. deep: true,
  501. handler(newVal,oldVal){
  502. this.convertGroup()
  503. }
  504. },
  505. 'unitProblemInfo.id':{
  506. deep: true,
  507. handler(newVal,oldVal){
  508. this.searchList()
  509. }
  510. }
  511. },
  512. filters:{
  513. inspPblmCate(val){
  514. if(!val || val == ''){
  515. return ''
  516. }
  517. if(val == '0'){
  518. return '一般'
  519. }else if(val == '1'){
  520. return '较重'
  521. }else if(val == '2'){
  522. return '严重'
  523. }
  524. // else if(val == '3'){
  525. // return '非常严重'
  526. // }
  527. else{
  528. return val
  529. }
  530. },
  531. }
  532. }
  533. </script>
  534. <style lang="scss">
  535. .search_wrapper{
  536. display: flex;
  537. justify-content: space-between;
  538. div:last-child{
  539. min-width: 160px;
  540. }
  541. }
  542. .slide-line{
  543. width: 96%;
  544. margin-left: 3%;
  545. height: 1px;
  546. margin-bottom: 10px;
  547. border-bottom: dashed 1px #DCDFE6;
  548. }
  549. .detail_dialog .el-dialog__body{
  550. padding: 0 20px 30px;
  551. }
  552. </style>