index.vue 38 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207
  1. <!--
  2. *@description: 基建工程
  3. *@author: yh Fu
  4. *@date: 2024-01-04 13:05:28
  5. *@version: V1.0.5
  6. -->
  7. <template>
  8. <div class="app-container">
  9. <el-form :model="searchParams" ref="searchForm" size="small" :inline="true" label-width="110px">
  10. <el-form-item label="工程名称" prop="enginName">
  11. <el-input v-model="searchParams.enginName" placeholder="请输入工程名称"></el-input>
  12. </el-form-item>
  13. <el-form-item>
  14. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  15. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  16. </el-form-item>
  17. </el-form>
  18. <el-row :gutter="10" class="mb8">
  19. <el-col :span="1.5">
  20. <el-button
  21. type="primary"
  22. plain
  23. icon="el-icon-plus"
  24. size="mini"
  25. @click="handleAdd"
  26. v-hasPermi="['zdsz:engineeringInfrastructure:add']"
  27. >新增</el-button>
  28. </el-col>
  29. <el-col :span="1.5">
  30. <el-button
  31. type="success"
  32. plain
  33. icon="el-icon-edit"
  34. size="mini"
  35. :disabled="single"
  36. @click="handleUpdate"
  37. v-hasPermi="['zdsz:engineeringInfrastructure:edit']"
  38. >修改</el-button>
  39. </el-col>
  40. <el-col :span="1.5">
  41. <el-button
  42. type="danger"
  43. plain
  44. icon="el-icon-delete"
  45. size="mini"
  46. :disabled="multiple"
  47. @click="handleDelete"
  48. v-hasPermi="['zdsz:engineeringInfrastructure:remove']"
  49. >删除</el-button>
  50. </el-col>
  51. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  52. </el-row>
  53. <el-table v-loading="loading" :data="comprehensiveList" @selection-change="handleSelectionChange">
  54. <el-table-column type="selection" width="55" align="center" />
  55. <!-- <el-table-column label="" align="center" prop="id" v-if="true"/>-->
  56. <el-table-column label="工程名称" align="center" prop="enginName" />
  57. <el-table-column label="工程地址" align="center" prop="enginAddre" />
  58. <el-table-column label="建设单位" align="center" prop="constructUnit" />
  59. <el-table-column label="开工时间" align="center" prop="startTime" />
  60. <el-table-column label="备注" align="center" prop="enginContent" show-overflow-tooltip/>
  61. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="400">
  62. <template slot-scope="scope">
  63. <el-button
  64. size="mini"
  65. type="text"
  66. icon="el-icon-edit"
  67. @click="handleUpdate(scope.row)"
  68. v-hasPermi="['zdsz:engineeringInfrastructure:edit']"
  69. >修改工程信息
  70. </el-button>
  71. <el-button
  72. size="mini"
  73. type="text"
  74. icon="el-icon-edit"
  75. @click="addNodeInfo(scope.row)"
  76. v-hasPermi="['zdsz:engineeringInfrastructure:add']"
  77. >修改节点信息
  78. </el-button>
  79. <el-button
  80. size="mini"
  81. type="text"
  82. icon="el-icon-delete"
  83. @click="handleDelete(scope.row)"
  84. v-hasPermi="['zdsz:engineeringInfrastructure:remove']"
  85. >删除</el-button>
  86. <el-button
  87. size="mini"
  88. type="text"
  89. icon="el-icon-circle-check"
  90. @click="viewSource(scope.row,'check')"
  91. v-hasPermi="['zdsz:engineeringInfrastructure:review']"
  92. >审核
  93. </el-button>
  94. <el-button
  95. size="mini"
  96. type="text"
  97. icon="el-icon-time"
  98. @click="viewSource(scope.row)"
  99. v-hasPermi="['zdsz:engineeringInfrastructure:query']"
  100. >历史用料
  101. </el-button>
  102. <!-- <el-button-->
  103. <!-- size="mini"-->
  104. <!-- type="text"-->
  105. <!-- icon="el-icon-edit"-->
  106. <!-- @click="addNewPipe(scope.row)"-->
  107. <!-- >新增顶管工程</el-button>-->
  108. <el-button
  109. size="mini"
  110. type="text"
  111. icon="el-icon-edit"
  112. v-hasPermi="['zdsz:engineeringInfrastructure:add']"
  113. @click="addMaterial(scope.row)"
  114. >添加用料
  115. </el-button>
  116. </template>
  117. </el-table-column>
  118. </el-table>
  119. <pagination
  120. v-show="total>0"
  121. :total="total"
  122. :page.sync="queryParams.pageNum"
  123. :limit.sync="queryParams.pageSize"
  124. @pagination="getList"
  125. />
  126. <!-- 顶管工程新增 -->
  127. <EngineePipe ref="enginPipe"/>
  128. <!-- 添加或修改开栓|安检|维修对话框 -->
  129. <el-dialog :title="title" ref="nodeForm" :visible.sync="open" append-to-body customClass="appendElDialog" @close="onClose">
  130. <el-form ref="form" :model="queryParams" :rules="rules" label-width="110px">
  131. <el-form-item label="工程名称" prop="enginName">
  132. <el-input v-model="queryParams.enginName" placeholder="请输入工程名称" maxlength="50"></el-input>
  133. </el-form-item>
  134. <el-form-item label="工程地址" prop="enginAddre">
  135. <el-input v-model="queryParams.enginAddre" placeholder="请输入工程地址" maxlength="100"></el-input>
  136. </el-form-item>
  137. <el-form-item label="建设单位" prop="constructUnit">
  138. <el-input v-model="queryParams.constructUnit" placeholder="请输入建设单位" maxlength="100"></el-input>
  139. </el-form-item>
  140. <el-form-item label="开工时间" prop="startTime">
  141. <el-date-picker
  142. v-model="queryParams.startTime"
  143. value-format="yyyy-MM-dd hh:mm:ss"
  144. type="datetime"
  145. placeholder="请选择开工时间">
  146. </el-date-picker>
  147. </el-form-item>
  148. <el-form-item label="竣工时间" prop="completedTime">
  149. <el-date-picker
  150. v-model="queryParams.completedTime"
  151. value-format="yyyy-MM-dd hh:mm:ss"
  152. type="datetime"
  153. placeholder="请选择竣工时间">
  154. </el-date-picker>
  155. </el-form-item>
  156. <el-form-item label="计划工期" prop="plannedDuration">
  157. <el-input v-model="queryParams.plannedDuration" placeholder="请输入计划工期" maxlength="50"></el-input>
  158. </el-form-item>
  159. <el-form-item label="文件" prop="files" v-if="queryParams.id">
  160. <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999" :value="queryParams.pics" @input="filesUpload"
  161. ></ObsFileUpload>
  162. </el-form-item>
  163. <el-form-item label="文件" prop="files" v-else>
  164. <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999" :value="queryParams.files" @input="filesUpload"
  165. ></ObsFileUpload>
  166. </el-form-item>
  167. <el-form-item label="工程内容" prop="enginContent">
  168. <el-input
  169. v-model="queryParams.enginContent"
  170. type="textarea"
  171. placeholder="请输入内容"
  172. class="remark_input"
  173. maxlength="100"
  174. />
  175. </el-form-item>
  176. <el-form-item label="节点" style="width: 100%;margin-left: 0;" v-if="title!=='修改基建工程'">
  177. <el-checkbox-group v-model="currentCheckList" @change="console.log(currentCheckList)">
  178. <el-checkbox
  179. :label="item.label"
  180. v-for="item in checkList"
  181. :key="item.label"
  182. ></el-checkbox>
  183. </el-checkbox-group>
  184. </el-form-item>
  185. <EnginNodeInfo
  186. v-for="(e,idx) in currentCheckList"
  187. :key="idx"
  188. :name="e"
  189. :ref="'EnginNodeInfo'+idx"
  190. :currentContain="(listContain.find(i => i.name == e)).components"
  191. :types="currentCheckList"
  192. :status="enginNodeStatus"
  193. enginType="基建工程"
  194. />
  195. </el-form>
  196. <div slot="footer" class="dialog-footer">
  197. <!-- <el-button :loading="buttonLoading" type="primary" @click="submitForm">确定</el-button> -->
  198. <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">
  199. <span v-if="queryParams.id">修改</span>
  200. <span v-else>添加</span>
  201. </el-button>
  202. <el-button @click="cancel">取 消</el-button>
  203. </div>
  204. </el-dialog>
  205. <!-- 节点信息dialog -->
  206. <enginee-node
  207. ref="childNode"
  208. @closeToSucceed="closeToSucceed"
  209. />
  210. <!-- 查看历史 -->
  211. <ConstructionDetails
  212. ref="ConstructionDetails"
  213. :currentCollapses="currentCollapses"
  214. :type="nodeDetailType"
  215. :status="status"
  216. @updateNodeOption="updateNodeOption"
  217. @checkWorking="checkWorking"
  218. enginType="基建工程"
  219. />
  220. </div>
  221. </template>
  222. <script>
  223. import { listComprehensive, getComprehensive, delComprehensive, addComprehensive, updateComprehensive} from "@/api/zdsz/comprehensive";
  224. import { viewEngineeringInfrastructureSource } from "@/api/zdsz/enginee"
  225. import {getBuildings} from "@/api/zdsz/building";
  226. import {getUnits} from "@/api/zdsz/unit";
  227. import {getAreas} from "@/api/zdsz/area";
  228. import {getHouses, listHouse} from "@/api/zdsz/house";
  229. import EngineeNode from '@/components/EngineeNode/index'
  230. import EnginNodeInfo from "@/components/EnginNodeInfo/index";
  231. import {
  232. getEngineeringInfrastructure, // 查询基建工程列表
  233. addEngineeringInfrastructure, // 新增基建工程
  234. getAreaList, // 获取当前小区集合
  235. getBuildingList, // 获取当前楼栋集合
  236. getUnitList, // 获取当前单元集合
  237. getHousesList, // 获取当前房间集合
  238. putEngineeringCivil, // 民用工程修改
  239. viewEngineeringInfrastructure, // 基建工程查看详情
  240. deleteEngineeringInfrastructure, // 删除民用工程
  241. getDictList,
  242. putEngineeringInfrastructure,
  243. engineeringCivilReview
  244. } from "@/api/zdsz/enginee"
  245. import EngineePipe from "@/components/EngineePipe"
  246. import ConstructionDetails from "@/components/ConstructionDetails"
  247. export default {
  248. name: "openrepair",
  249. dicts:['pass_check',
  250. 'is_repair',
  251. 'engin_type',
  252. 'self_closing_valve_type',
  253. 'visit_type','district',
  254. 'new_built_indoor_engin',
  255. "old_renovation_indoor_engin",
  256. "old_renovation_courtyard",
  257. "old_renovation_overhead",
  258. "new_built_indoor_engin",
  259. "new_built_courtyard",
  260. "new_built_overhead",
  261. "engin_cycle",
  262. "engineering_infrastructure",
  263. ],
  264. components:{
  265. EngineePipe,
  266. EngineeNode,
  267. ConstructionDetails,
  268. EnginNodeInfo
  269. },
  270. data() {
  271. var validatePicPass = (rule, value, callback) => {
  272. console.log('校验值', value)
  273. if (value === '') {
  274. callback(new Error('请输入密码'));
  275. } else {
  276. if (this.ruleForm.checkPass !== '') {
  277. this.$refs.ruleForm.validateField('checkPass');
  278. }
  279. callback();
  280. }
  281. };
  282. return {
  283. listContain:[
  284. {
  285. name:'施工进场',
  286. components:[
  287. [
  288. 'materialQuality', // 材质
  289. 'specifications', // 规格
  290. 'number', // 数量
  291. ],
  292. 'constructTime', // 施工时间
  293. 'zEngiineeringPhotoBoList', // 照片
  294. ]
  295. },
  296. {
  297. name:'水电施工',
  298. components:[
  299. [
  300. 'materialQuality', // 材质
  301. 'specifications', // 规格
  302. 'number', // 数量
  303. ],
  304. 'constructTime', // 施工时间
  305. 'zEngiineeringPhotoBoList', // 照片
  306. ]
  307. },
  308. {
  309. name:'瓦工',
  310. components:[
  311. [
  312. 'materialQuality', // 材质
  313. 'specifications', // 规格
  314. 'number', // 数量
  315. ],
  316. 'constructTime', // 施工时间
  317. 'zEngiineeringPhotoBoList', // 照片
  318. ]
  319. },
  320. {
  321. name:'木工',
  322. components:[
  323. [
  324. 'materialQuality', // 材质
  325. 'specifications', // 规格
  326. 'number', // 数量
  327. ],
  328. 'constructTime', // 施工时间
  329. 'zEngiineeringPhotoBoList', // 照片
  330. ]
  331. },
  332. {
  333. name:'防水',
  334. components:[
  335. [
  336. 'materialQuality', // 材质
  337. 'specifications', // 规格
  338. 'number', // 数量
  339. ],
  340. 'constructTime', // 施工时间
  341. 'zEngiineeringPhotoBoList', // 照片
  342. ]
  343. },
  344. {
  345. name:'门窗',
  346. components:[
  347. [
  348. 'materialQuality', // 材质
  349. 'specifications', // 规格
  350. 'number', // 数量
  351. ],
  352. 'constructTime', // 施工时间
  353. 'zEngiineeringPhotoBoList', // 照片
  354. ]
  355. },
  356. {
  357. name:'地板',
  358. components:[
  359. [
  360. 'materialQuality', // 材质
  361. 'specifications', // 规格
  362. 'number', // 数量
  363. ],
  364. 'constructTime', // 施工时间
  365. 'zEngiineeringPhotoBoList', // 照片
  366. ]
  367. },
  368. {
  369. name:'油工',
  370. components:[
  371. [
  372. 'materialQuality', // 材质
  373. 'specifications', // 规格
  374. 'number', // 数量
  375. ],
  376. 'constructTime', // 施工时间
  377. 'zEngiineeringPhotoBoList', // 照片
  378. ]
  379. },
  380. {
  381. name:'设备',
  382. components:[
  383. [
  384. 'materialQuality', // 材质
  385. 'specifications', // 规格
  386. 'number', // 数量
  387. ],
  388. 'constructTime', // 施工时间
  389. 'zEngiineeringPhotoBoList', // 照片
  390. ]
  391. },
  392. {
  393. name:'灯具',
  394. components:[
  395. [
  396. 'materialQuality', // 材质
  397. 'specifications', // 规格
  398. 'number', // 数量
  399. ],
  400. 'constructTime', // 施工时间
  401. 'zEngiineeringPhotoBoList', // 照片
  402. ]
  403. },
  404. {
  405. name:'保洁',
  406. components:[
  407. [
  408. 'materialQuality', // 材质
  409. 'specifications', // 规格
  410. 'number', // 数量
  411. ],
  412. 'constructTime', // 施工时间
  413. 'zEngiineeringPhotoBoList', // 照片
  414. ]
  415. },
  416. {
  417. name:'竣工',
  418. components:[
  419. [
  420. 'materialQuality', // 材质
  421. 'specifications', // 规格
  422. 'number', // 数量
  423. ],
  424. 'constructTime', // 施工时间
  425. 'zEngiineeringPhotoBoList', // 照片
  426. ]
  427. },
  428. ],
  429. enginNodeStatus:null,
  430. currentCollapses:[],
  431. searchParams:{
  432. pageSize:10,
  433. pageNum:1,
  434. enginName:null
  435. },
  436. // 按钮loading
  437. buttonLoading: false,
  438. // 遮罩层
  439. loading: true,
  440. // 选中数组
  441. ids: [],
  442. // 非单个禁用
  443. single: true,
  444. // 非多个禁用
  445. multiple: true,
  446. // 显示搜索条件
  447. showSearch: true,
  448. // 总条数
  449. total: 0,
  450. // 开栓|安检|维修表格数据
  451. comprehensiveList: [],
  452. // 弹出层标题
  453. title: "",
  454. // 是否显示弹出层
  455. open: false,
  456. enginTypeOption:[
  457. {
  458. value:'old_renovation',
  459. label:'旧改'
  460. },
  461. {
  462. value:'new_built',
  463. label:'新建'
  464. }
  465. ],
  466. nodeType:'1', // 节点类型
  467. enginClassification:'',
  468. // 查询参数
  469. queryParams: {
  470. district:null, // 行政区
  471. enginAddre:'', // 工程地址
  472. enginType:'', // 工程类型
  473. constructUnit:null, // 建设单位
  474. startTime:null, // 开工时间
  475. completedTime:null, // 竣工时间
  476. plannedDuration:null, // 计划工期
  477. enginContent:null,
  478. files:[],
  479. // zEngineeringNodeBo:{
  480. // type:'',
  481. // zEngineeringInfoBo:{}, //节点信息
  482. // }
  483. },
  484. zEngineeringInfoBo:{
  485. constructAddre:'', // 施工地址
  486. constructPhone:'', // 施工人电话
  487. constructUser:'', // 施工人
  488. headName:'', // 负责人
  489. headPhone:'', // 负责人电话
  490. constructAccordingDrawings:'', // 是否按图纸施工
  491. segmentedCompressionQualified:'', // 分段打压是否合格
  492. selfClosingValveType:'', // 自闭阀类型
  493. visitType:'', // 上门类型
  494. backfillTime:'', // 回填时间
  495. constructTime:'', // 施工时间
  496. zEngiineeringPhotoBoList:[], // 图片列表
  497. zEngineeringMaterialBo:[],// 用料对象
  498. }, // 节点信息
  499. constructAccordingDrawingsOption:[
  500. {
  501. value:'1',
  502. label:'是'
  503. },
  504. {
  505. value:'0',
  506. label:'否'
  507. }
  508. ],
  509. segmentedCompressionQualifiedOption:[
  510. {
  511. value:'1',
  512. label:'是'
  513. },
  514. {
  515. value:'0',
  516. label:'否'
  517. }
  518. ],
  519. nodeDetailVisible:false,
  520. // 表单参数
  521. form: {},
  522. areas: [],
  523. builds: [],
  524. units: [],
  525. rooms: [],
  526. houses: [],
  527. // 表单校验
  528. rules: {
  529. enginAddre: [
  530. { required: true, message: "工程地址不能为空", trigger: "blur" }
  531. ],
  532. enginName: [
  533. { required: true, message: "工程名称不能为空" ,trigger: 'blur'}
  534. ],
  535. constructUnit: [
  536. { required: true, message: "建设单位不能为空" ,trigger: 'blur'}
  537. ],
  538. startTime: [
  539. { required: true, message: "开工时间不能为空", trigger: "change" }
  540. ],
  541. completedTime: [
  542. { required: true, message: "竣工时间不能为空", trigger: "change" }
  543. ],
  544. plannedDuration: [
  545. { required: true, message: "计划工期不能为空", trigger: "blur" }
  546. ],
  547. enginContent: [
  548. { required: true, message: "工程内容不能为空", trigger: "blur" }
  549. ],
  550. },
  551. // 节点规则校验
  552. nodeRules:{
  553. type: [
  554. { required: true, message: "施工地址不能为空" ,trigger: 'blur'}
  555. ],
  556. constructAddre: [
  557. { required: true, message: "施工地址不能为空" ,trigger: 'blur'}
  558. ],
  559. constructPhone: [
  560. { required: true, message: "施工人电话不能为空" ,trigger: 'blur'}
  561. ],
  562. constructUser: [
  563. { required: true, message: "施工人不能为空" ,trigger: 'blur'}
  564. ],
  565. headName: [
  566. { required: true, message: "负责人不能为空" ,trigger: 'blur'}
  567. ],
  568. headPhone: [
  569. { required: true, message: "负责人电话不能为空" ,trigger: 'blur'}
  570. ],
  571. },
  572. currentDistrict:null, // 当前行政区
  573. currentCommunity:null, // 当前小区
  574. currentBuilding:null, // 当前楼宇
  575. currentUnit:null, // 当前单元
  576. communityOptions:[
  577. ],
  578. buildingOptions:[], // 楼栋集合
  579. unitOptions:[], // 单元集合
  580. houseOptions:[], // 房间集合
  581. enginClassification_list:[],// 室内节点
  582. new_built_list:[
  583. {
  584. label:'旧改',
  585. value:'old'
  586. },
  587. {
  588. label:'新建',
  589. value:'new'
  590. },
  591. ],
  592. currentEnginType:[],
  593. enginTypeOptions:[
  594. {
  595. value:'old_renovation',
  596. label:'旧改',
  597. children:[
  598. {
  599. value:'inside',
  600. lable:'室内',
  601. },
  602. {
  603. value:'yard',
  604. lable:'庭院',
  605. },
  606. {
  607. value:'float',
  608. lable:'架空',
  609. },
  610. ]
  611. },
  612. {
  613. value:'new_built',
  614. label:'新建',
  615. children:[
  616. {
  617. value:'inside',
  618. lable:'室内',
  619. },
  620. {
  621. value:'yard',
  622. lable:'庭院',
  623. },
  624. {
  625. value:'float',
  626. lable:'架空',
  627. },
  628. ]
  629. },
  630. ],
  631. value: [],
  632. options: [
  633. {
  634. value: 'old_renovation',
  635. label: '旧改',
  636. children: [
  637. {
  638. value: 'old_renovation_indoor_engin',
  639. label: '室内',
  640. },
  641. {
  642. value: 'old_renovation_courtyard',
  643. label: '庭院',
  644. },
  645. {
  646. value: 'old_renovation_overhead',
  647. label: '架空',
  648. }
  649. ]
  650. },
  651. {
  652. value: 'new_built',
  653. label: '新建',
  654. children: [
  655. {
  656. value: 'new_built_indoor_engin',
  657. label: '室内',
  658. },
  659. {
  660. value: 'new_built_courtyard',
  661. label: '庭院',
  662. },
  663. {
  664. value: 'new_built_overhead',
  665. label: '架空',
  666. }
  667. ]
  668. },
  669. ],
  670. enginClassificationOption:[], // 工程节点集合
  671. currentType:null,
  672. nodeList:[],
  673. currentCheckList:[],
  674. checkList:[],
  675. nodeDetailType:null,
  676. enginId:null,
  677. updateParams:{},
  678. status:null,
  679. createTime:''
  680. };
  681. },
  682. created() {
  683. this.getList();
  684. },
  685. mounted(){
  686. console.log(this.dict.type.engineering_infrastructure)
  687. this.checkList = this.dict.type.engineering_infrastructure
  688. },
  689. methods: {
  690. // 节点单项审核
  691. checkWorking(checkingInfo){
  692. let params = checkingInfo
  693. params.createTime = this.createTime
  694. engineeringCivilReview(params).then(res => {
  695. if(res.code == 200){
  696. this.$message({
  697. message: '审核成功',
  698. type: 'success'
  699. });
  700. }
  701. })
  702. },
  703. addNodeInfo(e){
  704. this.status = 'put'
  705. this.nodeDetailType = '修改'
  706. this.currentId = e.id
  707. this.$refs.ConstructionDetails.open(this.dict.type.engineering_infrastructure)
  708. },
  709. filesUpload(){
  710. },
  711. // 添加用料
  712. addMaterial(data){
  713. this.title = "添加用料";
  714. this.enginNodeStatus = '添加用料'
  715. this.loading = true;
  716. this.reset();
  717. const id = data.id || this.ids
  718. viewEngineeringInfrastructure(id).then(res => {
  719. this.loading = false;
  720. let newData = res.data
  721. this.queryParams = newData
  722. this.currentType = 'addMaterial'
  723. this.open = true
  724. })
  725. },
  726. // 查看历史
  727. viewSource(e,type = null){
  728. console.log(e)
  729. this.currentId = e.id
  730. this.$refs.ConstructionDetails.open(this.dict.type.engineering_infrastructure,type)
  731. this.status = 'read-only'
  732. },
  733. // 填写节点信息
  734. updateNodeOption(zEngineeringInfoBoList){
  735. delete this.updateParams.zEngineeringNodeBoList
  736. this.updateParams.zEngineeringNodeBo.zEngineeringInfoBoList = zEngineeringInfoBoList
  737. putEngineeringInfrastructure(this.updateParams).then(res => {
  738. console.log(res)
  739. if(res.code == 200){
  740. this.$message({
  741. message: '修改成功',
  742. type: 'success'
  743. });
  744. this.$refs.ConstructionDetails.dialogVisible = false
  745. this.updateParams = {}
  746. }
  747. })
  748. },
  749. viewNodeSource(e){
  750. console.log(this.currentId)
  751. viewEngineeringInfrastructureSource({
  752. id:this.currentId,
  753. type:e
  754. }).then(res => {
  755. this.createTime = res.data.createTime
  756. console.log(res)
  757. try {
  758. this.updateParams = res.data
  759. this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
  760. } catch (error) {
  761. this.currentCollapses = [];
  762. }
  763. console.log('折叠面板info',this.currentCollapses)
  764. })
  765. },
  766. onClose(){
  767. console.log(this.currentCheckList)
  768. this.currentCheckList = []
  769. this.$refs['form'].resetFields()
  770. },
  771. closeToSucceed(){
  772. this.open = false;
  773. this.getList()
  774. },
  775. currentEnginTypeChange(val){
  776. const enginDict = val[1]
  777. const enginType = val[0]
  778. this.queryParams.enginType = enginType
  779. this.enginClassificationOption = this.dict.type[enginDict]
  780. },
  781. // 当前所选行政区发生改变 查询当前小区集合
  782. districtHasChanged(district){
  783. this.queryParams.areaId = null
  784. this.queryParams.buildingId = null
  785. this.queryParams.unitId = null
  786. getAreaList({district}).then(res => {
  787. this.communityOptions = res.data
  788. })
  789. },
  790. // 当前所选小区发生改变 查询当前楼栋集合
  791. communityHasChanged(areaId){
  792. this.queryParams.buildingId = null
  793. this.queryParams.unitId = null
  794. getBuildingList({areaId}).then(res => {
  795. this.buildingOptions = res.data
  796. })
  797. },
  798. buildingHasChanged(buildingId){
  799. this.queryParams.unitId = null
  800. getUnitList({buildingId}).then(res => {
  801. this.unitOptions = res.data
  802. })
  803. },
  804. unitHasChanged(unitId){
  805. getHousesList({unitId}).then(res => {
  806. console.log(res)
  807. this.houseOptions = res.data
  808. })
  809. },
  810. enginTypeHasChanged(val){
  811. if(val == 'old_renovation'){
  812. }else if(val == 'new_built'){
  813. }
  814. },
  815. // 新增顶管工程
  816. addNewPipe(data){
  817. this.$refs.enginPipe.openDialog({
  818. id:data.id
  819. },'add',data)
  820. },
  821. nodeCancel(){
  822. this.nodeDetailVisible = false
  823. },
  824. toNodeDetail(){
  825. let nodeCollection = []
  826. // 收集节点信息
  827. this.currentCheckList.forEach((e,idx) => {
  828. let nodeItem = this.$refs['EnginNodeInfo'+ idx][0].infoCollection()
  829. // console.log(nodeItem)
  830. delete nodeItem.zEngiineeringPhotoBoList
  831. nodeCollection.push(nodeItem)
  832. })
  833. this.queryParams.zEngineeringNodeBoList = nodeCollection
  834. console.log('queryParams',this.queryParams)
  835. if (this.title == '修改基建工程') {
  836. this.$refs["form"].validate(valid => {
  837. if (valid) {
  838. this.queryParams.files = this.$refs['obsFileUpload'].fileList;
  839. if (this.$refs.obsFileUpload.fileList==null||this.$refs.obsFileUpload.fileList.length===0){
  840. this.$message.warning('必须上传文件!')
  841. return
  842. }
  843. let param = this.queryParams
  844. delete param.zEngineeringNodeBo
  845. putEngineeringInfrastructure(param).then(res => {
  846. if (res.code == 200) {
  847. this.$message({
  848. message: '添加成功',
  849. type: 'success'
  850. });
  851. this.open = false
  852. console.log('选中节点集合', this.currentCheckList)
  853. this.currentCheckList = []
  854. this.getList()
  855. // this.$emit('closeToSucceed')
  856. }
  857. })
  858. }
  859. });
  860. } else if(this.enginNodeStatus == '添加用料'){
  861. this.queryParams.files = this.$refs['obsFileUpload'].fileList;
  862. addEngineeringInfrastructure(this.queryParams).then(res => {
  863. if(res.code == 200){
  864. this.$message({
  865. message: '添加成功',
  866. type: 'success'
  867. });
  868. this.open = false
  869. console.log('选中节点集合',this.currentCheckList)
  870. this.currentCheckList = []
  871. this.getList()
  872. // this.$emit('closeToSucceed')
  873. }
  874. })
  875. }else{
  876. this.$refs["form"].validate(valid => {
  877. if (valid) {
  878. this.queryParams.files = this.$refs['obsFileUpload'].fileList;
  879. if (this.$refs.obsFileUpload.fileList==null||this.$refs.obsFileUpload.fileList.length===0){
  880. this.$message.warning('必须上传文件!')
  881. return
  882. }
  883. addEngineeringInfrastructure(this.queryParams).then(res => {
  884. if(res.code == 200){
  885. this.$message({
  886. message: '新增成功',
  887. type: 'success'
  888. });
  889. this.open = false
  890. console.log('选中节点集合',this.currentCheckList)
  891. this.currentCheckList = []
  892. this.getList()
  893. // this.$emit('closeToSucceed')
  894. }
  895. })
  896. }
  897. });
  898. }
  899. return
  900. getDictList({enginType:['engineering_infrastructure']}).then(res => {
  901. this.nodeList = res.data
  902. if(this.currentType == 'put'){
  903. this.$refs.childNode.open(this.queryParams,14)
  904. this.currentType = null
  905. return
  906. }
  907. // 加工 enginClassification 工程节点
  908. // const parts = this.value[1].split('_');
  909. // let result = parts.slice(2).join('_');
  910. // this.queryParams.zEngineeringNodeBo.type = this.enginClassification
  911. // this.queryParams.enginClassification = result
  912. // console.log(this.queryParams)
  913. this.$refs.childNode.open(this.queryParams,4,this.nodeList)
  914. })
  915. },
  916. getUrl(url) {
  917. this.zEngineeringInfoBo.zEngiineeringPhotoBoList = this.$refs.obsImageUpload.fileList?this.$refs.obsImageUpload.fileList.map(e=>e.url):[];
  918. },
  919. getBuildings(id) {
  920. this.units = []
  921. this.houses = []
  922. this.queryParams.buildingId = undefined
  923. this.queryParams.unitId = undefined
  924. this.queryParams.houseId = undefined
  925. getBuildings(id).then(res => {
  926. this.builds = res.data
  927. })
  928. },
  929. getUnits(id) {
  930. this.houses = []
  931. this.queryParams.unitId = undefined
  932. this.queryParams.houseId = undefined
  933. getUnits(id).then(res => {
  934. this.units = res.data
  935. })
  936. },
  937. getAreas() {
  938. this.builds = []
  939. this.units = []
  940. this.houses = []
  941. this.queryParams.buildingId = undefined
  942. this.queryParams.unitId = undefined
  943. this.queryParams.houseId = undefined
  944. this.form.buildingId = undefined
  945. this.form.unitId = undefined
  946. this.form.houseId = undefined
  947. getAreas().then(res => {
  948. this.areas = res.data;
  949. });
  950. },
  951. getHouses() {
  952. this.houses = []
  953. this.queryParams.houseId = undefined
  954. getHouses(this.queryParams.unitId).then(res => {
  955. this.houses = res.data;
  956. });
  957. },
  958. getBuildings1(id) {
  959. this.units = []
  960. this.houses = []
  961. this.form.buildingId = undefined
  962. this.form.unitId = undefined
  963. this.form.houseId = undefined
  964. getBuildings(id).then(res => {
  965. this.builds = res.data
  966. })
  967. },
  968. getUnits1(id) {
  969. this.houses = []
  970. this.form.unitId = undefined
  971. this.form.houseId = undefined
  972. getUnits(id).then(res => {
  973. this.units = res.data
  974. })
  975. },
  976. getHouses1() {
  977. this.houses = []
  978. this.form.houseId = undefined
  979. getHouses(this.form.unitId).then(res => {
  980. this.houses = res.data;
  981. });
  982. },
  983. /** 查询民用工程列表 */
  984. getList() {
  985. this.loading = true;
  986. getEngineeringInfrastructure(this.searchParams).then(res => {
  987. console.log(res)
  988. this.comprehensiveList = res.rows;
  989. this.total = res.total;
  990. this.loading = false;
  991. });
  992. },
  993. // 取消按钮
  994. cancel() {
  995. this.open = false;
  996. this.reset();
  997. this.houses = []
  998. this.units = []
  999. this.builds = []
  1000. },
  1001. // 表单重置
  1002. reset() {
  1003. this.form = {
  1004. id: undefined,
  1005. district: undefined,
  1006. areaId: undefined,
  1007. buildingId: undefined,
  1008. unitId: undefined,
  1009. houseId: undefined,
  1010. enginType: undefined,
  1011. enginClassification: undefined,
  1012. enginCycle: undefined,
  1013. completionStatus: undefined,
  1014. version: undefined,
  1015. imgUrl: undefined,
  1016. enginContent: undefined,
  1017. delFlag: undefined,
  1018. createBy: undefined,
  1019. createTime: undefined,
  1020. updateBy: undefined,
  1021. updateTime: undefined
  1022. };
  1023. this.queryParams = {
  1024. district: undefined,
  1025. areaId: undefined,
  1026. buildingId: undefined,
  1027. unitId: undefined,
  1028. houseId: undefined,
  1029. enginType: undefined,
  1030. enginClassification: undefined,
  1031. enginCycle: undefined,
  1032. completionStatus: undefined,
  1033. imgUrl: undefined,
  1034. files:[],
  1035. // zEngineeringNodeBo: {
  1036. // type: undefined,
  1037. // zEngineeringInfoBo: {
  1038. // constructAddre: undefined, // 施工地址
  1039. // constructPhone: undefined, // 施工人电话
  1040. // constructUser: undefined, // 施工人
  1041. // headName: undefined, // 负责人
  1042. // headPhone: undefined, // 负责人电话
  1043. // constructAccordingDrawings: undefined, // 是否按图纸施工
  1044. // segmentedCompressionQualified: undefined, // 分段打压是否合格
  1045. // selfClosingValveType: undefined, // 自闭阀类型
  1046. // visitType: undefined, // 上门类型
  1047. // backfillTime: undefined, // 回填时间
  1048. // constructTime: undefined, // 施工时间
  1049. // zEngiineeringPhotoBoList: undefined, // 图片列表
  1050. // zEngineeringMaterialBo: undefined,// 用料对象, //节点信息
  1051. // }
  1052. // },
  1053. }
  1054. this.enginClassification = null
  1055. this.resetForm("form");
  1056. },
  1057. /** 搜索按钮操作 */
  1058. handleQuery() {
  1059. this.searchParams.pageNum = 1;
  1060. this.getList();
  1061. },
  1062. /** 重置按钮操作 */
  1063. resetQuery() {
  1064. this.resetForm("searchForm");
  1065. this.handleQuery();
  1066. },
  1067. // 多选框选中数据
  1068. handleSelectionChange(selection) {
  1069. this.ids = selection.map(item => item.id)
  1070. this.single = selection.length!==1
  1071. this.multiple = !selection.length
  1072. },
  1073. /** 新增按钮操作 */
  1074. handleAdd() {
  1075. this.reset();
  1076. this.open = true;
  1077. this.enginNodeStatus == '新增'
  1078. this.title = "新增工程";
  1079. },
  1080. /** 修改按钮操作 */
  1081. handleUpdate(row) {
  1082. this.title = "修改基建工程";
  1083. viewEngineeringInfrastructure(row.id).then(res => {
  1084. console.log(res)
  1085. let newData = res.data
  1086. console.log(newData)
  1087. console.log(res.data.zEngineeringNodeBoList[0].type)
  1088. let zEngineeringNodeBo = {
  1089. type:res.data.zEngineeringNodeBoList[0].type,
  1090. zEngineeringInfoBo:res.data.zEngineeringNodeBoList[0].zEngineeringInfoBo
  1091. }
  1092. newData.zEngineeringNodeBo = zEngineeringNodeBo
  1093. this.currentType = 'put'
  1094. this.queryParams = newData
  1095. console.log(this.queryParams)
  1096. this.zEngineeringInfoBo = newData.zEngineeringNodeBo.zEngineeringInfoBo
  1097. this.open = true
  1098. })
  1099. },
  1100. /** 提交按钮 */
  1101. submitForm() {
  1102. // this.$refs["nodeForm"].validate(valid => {
  1103. // if (valid) {
  1104. this.queryParams.zEngineeringNodeBo.zEngineeringInfoBo = this.zEngineeringInfoBo
  1105. console.log(this.queryParams)
  1106. addEngineeringInfrastructure(this.queryParams).then(res => {
  1107. console.log(res)
  1108. })
  1109. // }
  1110. // });
  1111. },
  1112. /** 删除按钮操作 */
  1113. handleDelete(row) {
  1114. const id = row.id || this.ids
  1115. deleteEngineeringInfrastructure(id).then(res => {
  1116. if(res.code == 200){
  1117. this.$modal.msgSuccess("删除成功");
  1118. this.getList()
  1119. }
  1120. })
  1121. },
  1122. /** 导出按钮操作 */
  1123. handleExport() {
  1124. this.download('zdsz/openbolt/export', {
  1125. ...this.queryParams
  1126. }, `comprehensive_${new Date().getTime()}.xlsx`)
  1127. }
  1128. }
  1129. };
  1130. </script>
  1131. <style lang="scss" scoped>
  1132. ::v-deep .appendElDialog{
  1133. width: 70%;
  1134. height: 80%;
  1135. .el-dialog__body{
  1136. overflow: hidden;
  1137. overflow-y: scroll;
  1138. height: 85%;
  1139. }
  1140. .el-form-item{
  1141. margin-bottom: 22px;
  1142. width: 44%;
  1143. display: inline-block;
  1144. }
  1145. .el-form-item:nth-child(2n+2){
  1146. margin-left: 5%;
  1147. }
  1148. .el-form-item:not(:nth-child(1):nth-child(2)){
  1149. margin-top: 0.5%;
  1150. }
  1151. .remark_input{
  1152. .el-textarea__inner{
  1153. width: 100%;
  1154. height: 140px;
  1155. }
  1156. }
  1157. }
  1158. ::v-deep .appendElNodeDialog{
  1159. // width: 70%;
  1160. height: 80%;
  1161. .el-dialog__body{
  1162. height: 85%;
  1163. }
  1164. .el-form-item{
  1165. margin-bottom: 22px;
  1166. width: 44%;
  1167. display: inline-block;
  1168. }
  1169. .el-form-item:nth-child(2n+2){
  1170. margin-left: 5%;
  1171. }
  1172. .el-form-item:not(:nth-child(1):nth-child(2)){
  1173. margin-top: 0.5%;
  1174. }
  1175. }
  1176. </style>