9046e6e63bd9e6c69e8d1236aacdaeefb1417e95.svn-base 39 KB

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