index.vue 61 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793
  1. <template>
  2. <div class="app-container">
  3. <el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
  4. <el-form-item label="行政区" prop="district">
  5. <el-select v-model="queryParams1.district" placeholder="请选择行政区" clearable
  6. @change="queryParams1.areaId = undefined;getAreaList(queryParams1.district)"
  7. @clear="queryParams1.areaId = undefined;areaList=[];
  8. queryParams1.buildingId = undefined;buildingList=[];
  9. queryParams1.unitId = undefined;unitList=[]">
  10. <el-option
  11. v-for="dict in dict.type.district"
  12. :key="dict.value"
  13. :label="dict.label"
  14. :value="dict.value"
  15. />
  16. </el-select>
  17. </el-form-item>
  18. <el-form-item label="小区名称" prop="areaId">
  19. <el-select v-model="queryParams1.areaId" filterable clearable placeholder="请选择小区"
  20. @change="queryParams1.buildingId = undefined;getBuildingList1(queryParams1.areaId)"
  21. @clear="queryParams1.buildingId = undefined;buildingList=[];
  22. queryParams1.unitId = undefined;unitList=[]">
  23. <el-option
  24. v-for="item in areaList"
  25. :key="item.id"
  26. :label="item.name"
  27. :value="item.id">
  28. </el-option>
  29. </el-select>
  30. </el-form-item>
  31. <el-form-item label="楼宇名称" prop="buildingId">
  32. <el-select v-model="queryParams1.buildingId" filterable clearable placeholder="请选择楼宇"
  33. @change="queryParams1.unitId = undefined;getUnitList1(queryParams1.buildingId)"
  34. @clear="queryParams1.unitId = undefined;unitList=[]"
  35. >
  36. <el-option
  37. v-for="item in buildingList"
  38. :key="item.id"
  39. :label="item.name"
  40. :value="item.id">
  41. </el-option>
  42. </el-select>
  43. </el-form-item>
  44. <el-form-item label="单元" prop="unitId">
  45. <el-select v-model="queryParams1.unitId" placeholder="请选择单元" filterable clearable>
  46. <el-option
  47. v-for="obj in unitList"
  48. :key="obj.id"
  49. :label="obj.name"
  50. :value="obj.id"
  51. ></el-option>
  52. </el-select>
  53. </el-form-item>
  54. <el-form-item label="工程类型" prop="enginType">
  55. <el-select v-model="queryParams1.enginType" placeholder="请选择工程类型" clearable
  56. @change="enginTypeHasChangeds"
  57. @clear="currentEnginTypeChangeOptions1=[];queryParams1.enginClassification=undefined;queryParams1.enginType=undefined">
  58. <el-option
  59. v-for="dict in enginTypeOption"
  60. :key="dict.value"
  61. :label="dict.label"
  62. :value="dict.value"
  63. />
  64. </el-select>
  65. </el-form-item>
  66. <el-form-item label="工程分类" prop="enginClassification">
  67. <el-select v-model="queryParams1.enginClassification" placeholder="请选择工程分类" clearable
  68. @change="nodeTypeHasChangeds"
  69. @clear="">
  70. <el-option
  71. v-for="dict in currentEnginTypeChangeOptions1"
  72. :key="dict.dictValue"
  73. :label="dict.dictLabel"
  74. :value="dict.dictValue"
  75. />
  76. </el-select>
  77. </el-form-item>
  78. <el-form-item label="工程步骤" prop="type">
  79. <el-select v-model="queryParams1.type" placeholder="请选择工程步骤" clearable
  80. @clear="">
  81. <el-option
  82. v-for="dict in currentEnginTypeChangeOptions2"
  83. :key="dict.dictValue"
  84. :label="dict.dictLabel"
  85. :value="dict.dictValue"
  86. />
  87. </el-select>
  88. </el-form-item>
  89. <!-- <el-form-item label="工程周期" prop="enginCycle">-->
  90. <!-- <el-select v-model="queryParams1.enginCycle" placeholder="请选择工程周期" clearable-->
  91. <!-- @clear="">-->
  92. <!-- <el-option-->
  93. <!-- v-for="dict in dict.type.engin_cycle"-->
  94. <!-- :key="dict.value"-->
  95. <!-- :label="dict.label"-->
  96. <!-- :value="dict.value"-->
  97. <!-- />-->
  98. <!-- </el-select>-->
  99. <!-- </el-form-item>-->
  100. <el-form-item>
  101. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  102. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  103. </el-form-item>
  104. </el-form>
  105. <el-row :gutter="10" class="mb8">
  106. <el-col :span="1.5">
  107. <el-button
  108. type="primary"
  109. plain
  110. icon="el-icon-plus"
  111. size="mini"
  112. @click="handleAdd"
  113. v-hasPermi="['zdsz:engineeringCivil:add']"
  114. >新增
  115. </el-button>
  116. </el-col>
  117. <el-col :span="1.5">
  118. <el-button
  119. type="success"
  120. plain
  121. icon="el-icon-edit"
  122. size="mini"
  123. :disabled="single"
  124. @click="handleUpdate"
  125. v-hasPermi="['zdsz:engineeringCivil:edit']"
  126. >修改工程信息
  127. </el-button>
  128. </el-col>
  129. <el-col :span="1.5">
  130. <el-button
  131. type="danger"
  132. plain
  133. icon="el-icon-delete"
  134. size="mini"
  135. :disabled="multiple"
  136. @click="handleDelete"
  137. v-hasPermi="['zdsz:engineeringCivil:remove']"
  138. >删除
  139. </el-button>
  140. </el-col>
  141. <el-col :span="1.5">
  142. <el-button
  143. type="warning"
  144. plain
  145. icon="el-icon-download"
  146. size="mini"
  147. @click="handleExport"
  148. v-hasPermi="['zdsz:engineeringCivil:export']"
  149. >导出
  150. </el-button>
  151. </el-col>
  152. <el-col :span="1.5">
  153. <el-button
  154. type="danger"
  155. icon="el-icon-circle-check"
  156. size="mini"
  157. @click="handleCheckings"
  158. v-hasPermi="['zdsz:engineeringCivil:review']"
  159. >批量审核
  160. </el-button>
  161. </el-col>
  162. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  163. </el-row>
  164. <el-table v-loading="loading" :data="engineeringCivilList" @selection-change="handleSelectionChange">
  165. <el-table-column type="selection" width="55" align="center"/>
  166. <el-table-column label="主键" align="center" prop="id" v-if="false"/>
  167. <el-table-column label="行政区" align="center" prop="district">
  168. <template slot-scope="scope">
  169. <dict-tag :options="dict.type.district" :value="scope.row.district"/>
  170. </template>
  171. </el-table-column>
  172. <el-table-column label="小区名称" align="center" prop="areaName"/>
  173. <el-table-column label="楼宇名称" align="center" prop="buildingName"/>
  174. <el-table-column label="单元名称" align="center" prop="unitName"/>
  175. <el-table-column label="房间名称" align="center" prop="houseName"/>
  176. <el-table-column label="工程类型" align="center" prop="enginType">
  177. <template slot-scope="scope">
  178. {{ scope.row.enginType === 'old_renovation' ? "旧改工程" : "新建" }}
  179. </template>
  180. </el-table-column>
  181. <el-table-column label="工程分类" align="center" prop="enginClassificationName"/>
  182. <!-- <el-table-column label="工程周期" align="center" prop="enginCycle">-->
  183. <!-- <template slot-scope="scope">-->
  184. <!-- <dict-tag :options="dict.type.engin_cycle" :value="scope.row.enginCycle"/>-->
  185. <!-- </template>-->
  186. <!-- </el-table-column>-->
  187. <!-- <el-table-column label="完工状态" align="center" prop="completionStatus"/>-->
  188. <el-table-column label="审核状态" align="center" prop="nodeReViewStateList" width="250">
  189. <template slot-scope="scope">
  190. <div style="text-align:center">
  191. <el-popover
  192. v-for="item in scope.row.nodeReViewStateList"
  193. placement="top-start"
  194. trigger="hover"
  195. :content="item.Type">
  196. <span slot="reference" v-if="item.state == '0'" style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #30B08F"></span>
  197. <span slot="reference" v-if="item.state == '1'" style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #C03639"></span>
  198. </el-popover>
  199. </div>
  200. </template>
  201. </el-table-column>
  202. <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
  203. <template slot-scope="scope">
  204. <el-button
  205. size="mini"
  206. type="text"
  207. icon="el-icon-edit"
  208. @click="handleUpdate(scope.row)"
  209. v-hasPermi="['zdsz:engineeringCivil:edit']"
  210. >修改工程信息
  211. </el-button>
  212. <el-button
  213. size="mini"
  214. type="text"
  215. icon="el-icon-edit"
  216. @click="addNodeInfo(scope.row)"
  217. v-hasPermi="['zdsz:engineeringCivil:add']"
  218. >修改施工信息
  219. </el-button>
  220. <el-button
  221. size="mini"
  222. type="text"
  223. icon="el-icon-delete"
  224. @click="handleDelete(scope.row)"
  225. v-hasPermi="['zdsz:engineeringCivil:remove']"
  226. >删除
  227. </el-button>
  228. <el-button
  229. size="mini"
  230. type="text"
  231. icon="el-icon-circle-check"
  232. @click="viewSource(scope.row,'check')"
  233. v-hasPermi="['zdsz:engineeringCivil:review']"
  234. >审核
  235. </el-button>
  236. <el-button
  237. size="mini"
  238. type="text"
  239. icon="el-icon-time"
  240. @click="viewSource(scope.row)"
  241. v-hasPermi="['zdsz:engineeringCivil:query']"
  242. >历史施工
  243. </el-button>
  244. <el-button
  245. size="mini"
  246. type="text"
  247. icon="el-icon-edit"
  248. v-hasPermi="['zdsz:engineeringPipeJacking:add']"
  249. @click="addNewPipe(scope.row)"
  250. >新增顶管工程
  251. </el-button>
  252. <el-button
  253. size="mini"
  254. type="text"
  255. icon="el-icon-edit"
  256. v-hasPermi="['zdsz:engineeringCivil:add']"
  257. @click="addMaterial(scope.row)"
  258. >添加用料
  259. </el-button>
  260. </template>
  261. </el-table-column>
  262. </el-table>
  263. <pagination
  264. v-show="total>0"
  265. :total="total"
  266. :page.sync="queryParams1.pageNum"
  267. :limit.sync="queryParams1.pageSize"
  268. @pagination="getList"
  269. />
  270. <!-- 添加或修改民用工程对话框 -->
  271. <el-dialog :title="title" ref="nodeForm" :visible.sync="open" width="500" append-to-body custom-class="addDialog"
  272. @close="onClose">
  273. <el-form ref="form" :model="queryParams" :rules="rules" label-width="110px">
  274. <el-row>
  275. <el-col :span="12">
  276. <el-form-item label="行政区" prop="district">
  277. <el-select
  278. :disabled="title == '添加用料' "
  279. v-model="queryParams.district"
  280. placeholder="请选择行政区"
  281. filterable
  282. @change="districtHasChanged"
  283. >
  284. <el-option
  285. v-for="e in dict.type.district"
  286. :key="e.value"
  287. :label="e.label"
  288. :value="e.value"
  289. ></el-option>
  290. </el-select>
  291. </el-form-item>
  292. </el-col>
  293. <el-col :span="12">
  294. <el-form-item label="小区" prop="areaId">
  295. <el-select
  296. :disabled="title == '添加用料' "
  297. v-model="queryParams.areaId"
  298. filterable
  299. placeholder="请选择小区"
  300. @change="communityHasChanged"
  301. >
  302. <el-option
  303. v-for="e in communityOptions"
  304. :key="e.id"
  305. :label="e.name"
  306. :value="e.id"
  307. ></el-option>
  308. </el-select>
  309. </el-form-item>
  310. </el-col>
  311. </el-row>
  312. <el-row>
  313. <el-col :span="12">
  314. <el-form-item label="楼栋" prop="buildingId">
  315. <el-select
  316. :disabled="title == '添加用料' "
  317. filterable
  318. v-model="queryParams.buildingId"
  319. placeholder="请选择楼栋"
  320. @change="buildingHasChanged"
  321. >
  322. <el-option
  323. v-for="e in buildingOptions"
  324. :key="e.id"
  325. :label="e.name"
  326. :value="e.id"
  327. ></el-option>
  328. </el-select>
  329. </el-form-item>
  330. </el-col>
  331. <el-col :span="12">
  332. <el-form-item label="单元" prop="unitId">
  333. <el-select
  334. :disabled="title == '添加用料' "
  335. v-model="queryParams.unitId"
  336. filterable
  337. placeholder="请选择单元"
  338. @change="unitHasChanged"
  339. >
  340. <el-option
  341. v-for="e in unitOptions"
  342. :key="e.id"
  343. :label="e.name"
  344. :value="e.id"
  345. ></el-option>
  346. </el-select>
  347. </el-form-item>
  348. </el-col>
  349. </el-row>
  350. <el-row>
  351. <el-col :span="12">
  352. <el-form-item label="房间" prop="houseId">
  353. <el-select
  354. :disabled="title == '添加用料' "
  355. v-model="queryParams.houseId"
  356. filterable
  357. placeholder="请选择房间"
  358. >
  359. <el-option
  360. v-for="e in houseOptions"
  361. :key="e.id"
  362. :label="e.name"
  363. :value="e.id"
  364. ></el-option>
  365. </el-select>
  366. </el-form-item>
  367. </el-col>
  368. <el-col :span="12">
  369. <el-form-item label="工程类型" prop="enginType">
  370. <el-select
  371. :disabled="title == '添加用料' "
  372. v-model="queryParams.enginType"
  373. placeholder="请选择工程类型"
  374. @change="enginTypeHasChanged"
  375. >
  376. <el-option
  377. v-for="e in enginTypeOption"
  378. :key="e.value"
  379. :label="e.label"
  380. :value="e.value"
  381. ></el-option>
  382. </el-select>
  383. </el-form-item>
  384. </el-col>
  385. </el-row>
  386. <el-row>
  387. <el-col :span="12">
  388. <el-form-item label="工程分类" prop="enginClassification">
  389. <el-select
  390. :disabled="title == '添加用料' "
  391. v-model="queryParams.enginClassification"
  392. placeholder="请选择工程分类"
  393. @change="currentEnginTypeChanged"
  394. >
  395. <el-option
  396. v-for="e in currentEnginTypeChangeOptions"
  397. :key="e.dictValue"
  398. :label="e.dictLabel"
  399. :value="e.dictValue"
  400. ></el-option>
  401. </el-select>
  402. </el-form-item>
  403. </el-col>
  404. <!-- <el-col :span="12">-->
  405. <!-- <el-form-item label="工程周期" prop="enginCycle">-->
  406. <!-- <el-select-->
  407. <!-- :disabled="title == '添加用料' "-->
  408. <!-- v-model="queryParams.enginCycle"-->
  409. <!-- placeholder="请填写工程周期"-->
  410. <!-- >-->
  411. <!-- <el-option-->
  412. <!-- v-for="e in dict.type.engin_cycle"-->
  413. <!-- :key="e.value"-->
  414. <!-- :label="e.label"-->
  415. <!-- :value="e.value"-->
  416. <!-- ></el-option>-->
  417. <!-- </el-select>-->
  418. <!-- </el-form-item>-->
  419. <!-- </el-col>-->
  420. </el-row>
  421. <el-row>
  422. <el-col :span="24" v-if="title!=='修改民用工程'">
  423. <el-form-item label="环节">
  424. <el-checkbox-group v-model="currentCheckList">
  425. <el-checkbox
  426. :disabled=enginNodeStatusExecuted(item)
  427. :label="item.dictValue"
  428. v-for="item in checkList"
  429. :key="item"
  430. ></el-checkbox>
  431. </el-checkbox-group>
  432. </el-form-item>
  433. </el-col>
  434. </el-row>
  435. <EnginNodeInfo
  436. v-for="(e,idx) in currentCheckList"
  437. :key="idx"
  438. :name="e"
  439. :ref="'EnginNodeInfo'+idx"
  440. :currentContain="(listContain.find(i => i.name == e)).components"
  441. :updateOption='(updateOption.find(i => i.type == e)) || {}'
  442. :types="currentCheckList"
  443. :status="enginNodeStatus"
  444. enginType="民用工程"
  445. :enginSort="queryParams.enginType"
  446. :enginNode="queryParams.enginClassification"
  447. />
  448. <!-- <el-tabs type="border-card" >
  449. <el-tab-pane label="用户管理">用户管理</el-tab-pane>
  450. <el-tab-pane label="配置管理">配置管理</el-tab-pane>
  451. <el-tab-pane label="角色管理">角色管理</el-tab-pane>
  452. <el-tab-pane label="定时任务补偿">定时任务补偿</el-tab-pane>
  453. </el-tabs> -->
  454. </el-form>
  455. <div slot="footer" class="dialog-footer">
  456. <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">{{ enginNodeStatus }}</el-button>
  457. <el-button @click="cancel">取 消</el-button>
  458. </div>
  459. </el-dialog>
  460. <!-- 查看历史 -->
  461. <ConstructionDetails
  462. ref="ConstructionDetails"
  463. :currentCollapses="currentCollapses"
  464. :type="nodeDetailType"
  465. @updateNodeOption="updateNodeOption"
  466. @checkWorking="checkWorking"
  467. :status="status"
  468. :zEngineeringNodeBo="zEngineeringNodeBo"
  469. enginType="民用工程"
  470. />
  471. <!-- 批量审核 -->
  472. <el-dialog
  473. ref="checkingAllForm"
  474. title="批量审核"
  475. :visible.sync="checkingsVisible"
  476. class="checkingAll"
  477. @close="checkingAllFormClosed"
  478. >
  479. <el-form :model="checkingForm" :rules="checkingFormRules" ref="checkingFormAll">
  480. <el-form-item label="工程类型" prop="enginType">
  481. <el-select
  482. v-model="checkingForm.enginType"
  483. placeholder="请选择工程类型"
  484. @change="enginTypeHasChanged"
  485. >
  486. <el-option
  487. v-for="e in enginTypeOption"
  488. :key="e.value"
  489. :label="e.label"
  490. :value="e.value"
  491. ></el-option>
  492. </el-select>
  493. </el-form-item>
  494. <el-form-item label="工程分类" prop="enginClassification">
  495. <el-select
  496. v-model="checkingForm.enginClassification"
  497. placeholder="请选择工程分类"
  498. @change="currentCheckingAllEnginTypeChanged"
  499. >
  500. <el-option
  501. v-for="e in currentEnginTypeChangeOptions"
  502. :key="e.dictValue"
  503. :label="e.dictLabel"
  504. :value="e.dictValue"
  505. ></el-option>
  506. </el-select>
  507. </el-form-item>
  508. <el-form-item label="环节" label-width="78px" prop="type">
  509. <el-select
  510. v-model="checkingForm.type"
  511. placeholder="请选择工程分类"
  512. >
  513. <el-option
  514. v-for="e in checkingAllList"
  515. :key="e.dictValue"
  516. :label="e.dictLabel"
  517. :value="e.dictValue"
  518. ></el-option>
  519. </el-select>
  520. </el-form-item>
  521. <el-form-item prop="reviewTime" label="工程创建时间" style="margin-left: -5%;">
  522. <el-date-picker
  523. v-model="checkingForm.reviewTime"
  524. type="month"
  525. value-format="yyyy-MM"
  526. placeholder="选择月">
  527. </el-date-picker>
  528. </el-form-item>
  529. <el-form-item
  530. label-width="78px"
  531. label="审核状态"
  532. prop="reviewStatus"
  533. >
  534. <el-select v-model="checkingForm.reviewStatus" placeholder="请选择审核状态" label="审核状态"
  535. @change="validateCHanged">
  536. <el-option
  537. v-for="e in reviewStatusList"
  538. :key="e.label"
  539. :label="e.label"
  540. :value="e.value"
  541. ></el-option>
  542. </el-select>
  543. </el-form-item>
  544. <el-form-item
  545. label-width="78px"
  546. label="审核内容"
  547. prop="reviewContent"
  548. >
  549. <div class="block" style="display: inline-block; margin-right: 20px;">
  550. <el-input
  551. v-model="checkingForm.reviewContent"
  552. placeholder="请输入审核内容"
  553. type="textarea"
  554. style="width: 100%"/>
  555. </div>
  556. </el-form-item>
  557. </el-form>
  558. <span slot="footer" class="dialog-footer">
  559. <el-button @click="checkingsVisible = false">取 消</el-button>
  560. <el-button type="primary" @click=checkingAllSubmit>提 交</el-button>
  561. </span>
  562. </el-dialog>
  563. <!-- 顶管工程新增 -->
  564. <EngineePipe ref="enginPipe"/>
  565. </div>
  566. </template>
  567. <!--engineeringPipeJacking-->
  568. <script>
  569. import {
  570. listEngineeringCivil,
  571. getEngineeringCivil,
  572. delEngineeringCivil,
  573. addEngineeringCivil,
  574. updateEngineeringCivil
  575. } from "@/api/zdsz/engineeringCivil";
  576. import {
  577. addEnginee, // 新增工程
  578. getHousesList, // 获取当前房间集合
  579. putEngineeringCivil, // 民用工程修改
  580. viewEngineeringCivil, // 民用工程查看详情
  581. deleteEngineeringCivil, // 删除民用工程
  582. getDictList,
  583. viewEngineeringInfrastructureSource,
  584. viewEngineeringCivilSource,
  585. engineeringCivilAllReview,
  586. CivilReview
  587. } from "@/api/zdsz/enginee"
  588. import {getAreaList} from "@/api/zdsz/area";
  589. import {getBuildingList} from "@/api/zdsz/building";
  590. import {getUnits} from "@/api/zdsz/unit";
  591. import {getDicts} from "@/api/system/dict/data";
  592. import EnginNodeInfo from "@/components/EnginNodeInfo/index";
  593. import EngineePipe from '@/components/EngineePipe'
  594. import ConstructionDetails from "@/components/ConstructionDetails/index.vue";
  595. function formatDate(date) {
  596. const days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
  597. const months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
  598. const day = days[date.getUTCDay()];
  599. const month = months[date.getUTCMonth()];
  600. const dateNum = String(date.getUTCDate()).padStart(2, '0');
  601. const hours = String(date.getUTCHours()).padStart(2, '0');
  602. const minutes = String(date.getUTCMinutes()).padStart(2, '0');
  603. const seconds = String(date.getUTCSeconds()).padStart(2, '0');
  604. const year = date.getUTCFullYear();
  605. return `${day} ${month} ${dateNum} ${hours}:${minutes}:${seconds} CST ${year}`;
  606. }
  607. export default {
  608. components: {
  609. ConstructionDetails,
  610. EnginNodeInfo,
  611. EngineePipe
  612. },
  613. name: "EngineeringCivil",
  614. dicts: ['pass_check',
  615. 'is_repair',
  616. 'engin_type',
  617. 'old_renovation',
  618. 'new_built',
  619. 'self_closing_valve_type',
  620. 'visit_type', 'district',
  621. 'new_built_indoor_engin',
  622. "old_renovation_indoor_engin",
  623. "old_renovation_courtyard",
  624. "old_renovation_overhead",
  625. "new_built_indoor_engin",
  626. "new_built_courtyard",
  627. "new_built_overhead",
  628. "engin_cycle"],
  629. data() {
  630. return {
  631. nodeDetailType: null,
  632. currentCollapses: [],
  633. enginId: undefined,
  634. checkingsVisible: false,
  635. updateOption: [],
  636. checkingFormRules: {
  637. enginType: [
  638. {required: true, message: "工程类型不能为空", trigger: ['change']}
  639. ],
  640. enginClassification: [
  641. {required: true, message: "工程分类不能为空", trigger: ['change']}
  642. ],
  643. type: [
  644. {required: true, message: "环节不能为空", trigger: ['change']}
  645. ],
  646. reviewTime: [
  647. {required: true, message: "工程创建时间不能为空", trigger: ['change']}
  648. ],
  649. reviewStatus: [
  650. {required: true, message: "审核状态不能为空", trigger: ['change']}
  651. ],
  652. reviewContent: [
  653. {required: true, message: "审核内容不能为空", trigger: ['change']}
  654. ],
  655. },
  656. listContain: [
  657. {
  658. name: '拆旧管',
  659. components: [
  660. [
  661. 'corrosionLevel', // 腐蚀等级
  662. ],
  663. 'constructTime', // 施工时间
  664. 'zEngiineeringPhotoBoList', // 照片
  665. ]
  666. },
  667. {
  668. name: '报警器切断阀',
  669. components: [
  670. [
  671. 'brand', // 品牌
  672. ],
  673. 'constructTime', // 施工时间
  674. 'zEngiineeringPhotoBoList', // 照片
  675. // 'remark', // 施工内容
  676. ]
  677. },
  678. {
  679. name: '开挖前',
  680. components: [
  681. [
  682. // 'materialQuality', // 材质
  683. // 'specifications', // 规格
  684. // 'number', // 数量
  685. ],
  686. 'constructTime', // 施工时间
  687. 'zEngiineeringPhotoBoList', // 照片
  688. // 'remark', // 施工内容
  689. ]
  690. },
  691. {
  692. name: '开挖后',
  693. components: [
  694. [
  695. // 'materialQuality', // 材质
  696. // 'specifications', // 规格
  697. // 'number', // 数量
  698. ],
  699. 'constructTime', // 施工时间
  700. 'zEngiineeringPhotoBoList', // 照片
  701. // 'remark', // 施工内容
  702. ]
  703. },
  704. {
  705. name: '焊口照片',
  706. components: [
  707. [
  708. // 'materialQuality', // 材质
  709. // 'specifications', // 规格
  710. // 'number', // 数量
  711. ],
  712. 'constructTime', // 施工时间
  713. 'zEngiineeringPhotoBoList', // 照片
  714. // 'remark', // 施工内容
  715. ]
  716. },
  717. {
  718. name: '下沟',
  719. components: [
  720. [
  721. // 'ductalEpithelium', // 材质
  722. // 'trenchProspect', // 规格
  723. // 'number', // 数量
  724. ],
  725. 'ductalEpithelium', // 材质
  726. 'trenchProspect',
  727. 'constructTime',
  728. 'Video'// 施工时间
  729. // 'zEngiineeringPhotoBoList', // 照片
  730. // 'remark', // 施工内容
  731. ]
  732. },
  733. {
  734. name: '回填',
  735. components: [
  736. [
  737. // 'materialQuality', // 材质
  738. // 'specifications', // 规格
  739. // 'number', // 数量
  740. ],
  741. 'stonePowder',
  742. 'warningtTape',
  743. 'photosAfter',
  744. // 'backfillTime', // 回填时间
  745. 'constructTime', // 施工时间
  746. // 'zEngiineeringPhotoBoList', // 照片
  747. // 'remark', // 施工内容
  748. ]
  749. },
  750. {
  751. name: '隐蔽工程',
  752. components: [
  753. [
  754. // 'materialQuality', // 材质
  755. // 'specifications', // 规格
  756. // 'number', // 数量
  757. ],
  758. // 'segmentedCompressionQualified', // 分段打压
  759. 'constructTime', // 施工时间
  760. 'zEngiineeringPhotoBoList', // 照片
  761. // 'remark', // 施工内容
  762. ]
  763. },
  764. {
  765. name: '除锈刷油',
  766. components: [
  767. [
  768. // 'materialQuality', // 材质
  769. // 'specifications', // 规格
  770. // 'number', // 数量
  771. ],
  772. 'constructTime', // 施工时间
  773. 'zEngiineeringPhotoBoList', // 照片
  774. // 'remark', // 施工内容
  775. ]
  776. },
  777. {
  778. name: '全貌照片',
  779. components: [
  780. [
  781. 'materialQuality', // 材质
  782. 'specifications', // 规格
  783. 'number', // 数量
  784. ],
  785. 'zhanshixinzeng', // 数量
  786. 'constructTime', // 施工时间
  787. 'zEngiineeringPhotoBoList', // 照片
  788. // 'remark', // 施工内容
  789. ]
  790. },
  791. {
  792. name: '打磨',
  793. components: [
  794. [
  795. 'materialQuality', // 材质
  796. 'specifications', // 规格
  797. 'number', // 数量
  798. ],
  799. 'constructTime', // 施工时间
  800. 'zEngiineeringPhotoBoList', // 照片
  801. // 'remark', // 施工内容
  802. ]
  803. },
  804. {
  805. name: '打孔',
  806. components: [
  807. [
  808. 'corrosionLevel', // 孔径/腐蚀等级
  809. ],
  810. 'constructTime', // 施工时间
  811. 'zEngiineeringPhotoBoList', // 照片
  812. ]
  813. },
  814. {
  815. name: '立杠',
  816. components: [
  817. [
  818. 'materialQuality', // 材质
  819. 'specifications', // 规格
  820. 'number', // 数量
  821. ],
  822. 'constructTime', // 施工时间
  823. 'zEngiineeringPhotoBoList', // 照片
  824. ]
  825. },
  826. {
  827. name: '挂表',
  828. components: [
  829. [
  830. 'brand', // 品牌
  831. ],
  832. 'constructTime', // 施工时间
  833. 'zEngiineeringPhotoBoList', // 照片
  834. // 'remark', // 施工内容
  835. ]
  836. },
  837. {
  838. name: '表后管',
  839. components: [
  840. [
  841. 'materialQuality', // 材质
  842. 'specifications', // 规格
  843. 'number', // 数量
  844. ],
  845. 'constructAccordingDrawings', // 是否按图纸施工
  846. 'constructTime', // 施工时间
  847. 'zEngiineeringPhotoBoList', // 照片
  848. ]
  849. },
  850. {
  851. name: '阀管',
  852. components: [
  853. [
  854. 'materialQuality', // 材质
  855. 'specifications', // 规格
  856. 'number', // 数量
  857. 'visitType', // 上门类型
  858. 'selfClosingValveType', // 自闭阀类型
  859. ],
  860. 'constructTime', // 施工时间
  861. 'zEngiineeringPhotoBoList', // 照片
  862. ]
  863. },
  864. {
  865. name: '底腿开挖前',
  866. components: [
  867. [
  868. 'caliber' // 管径
  869. ],
  870. 'constructTime',
  871. 'zEngiineeringPhotoBoList', // 照片
  872. ]
  873. }, {
  874. name: '底腿下沟',
  875. components: [
  876. [
  877. 'caliber' // 管径
  878. ],
  879. 'constructTime',
  880. 'zEngiineeringPhotoBoList', // 照片
  881. ]
  882. }, {
  883. name: '底腿回填',
  884. components: [
  885. [
  886. 'caliber' // 管径
  887. ],
  888. 'constructTime',
  889. 'zEngiineeringPhotoBoList', // 照片
  890. ]
  891. },
  892. {
  893. name: '管道施工记录',
  894. components: [
  895. [],
  896. 'constructTime',
  897. 'zEngiineeringPhotoBoList', // 照片
  898. ]
  899. }
  900. ],
  901. currentCheckList: [],
  902. enginClassificationinfo: '',
  903. enginClassification: '',
  904. enginClassificationOption: [],
  905. enginTypeOption: [
  906. {
  907. value: 'old_renovation',
  908. label: '旧改'
  909. }, {
  910. value: 'new_built',
  911. label: '新建'
  912. },
  913. ],
  914. currentEnginTypeChangeOptions: [],
  915. currentEnginTypeChangeOptions1: [],
  916. currentEnginTypeChangeOptions2: [],
  917. // 按钮loading
  918. buttonLoading: false,
  919. // 遮罩层
  920. loading: true,
  921. // 选中数组
  922. ids: [],
  923. // 非单个禁用
  924. single: true,
  925. // 非多个禁用
  926. multiple: true,
  927. // 显示搜索条件
  928. showSearch: true,
  929. // 总条数
  930. total: 0,
  931. // 民用工程表格数据
  932. engineeringCivilList: [],
  933. // 弹出层标题
  934. title: "",
  935. // 是否显示弹出层
  936. open: false,
  937. // 查询参数
  938. queryParams: {
  939. district: undefined,
  940. areaId: undefined,
  941. buildingId: undefined,
  942. unitId: undefined,
  943. houseId: undefined,
  944. enginType: undefined,
  945. enginCycle: 0,
  946. completionStatus: undefined,
  947. enginClassification: undefined,
  948. imgUrl: undefined,
  949. zEngineeringNodeBoList: {
  950. type: undefined,
  951. zEngineeringInfoBo: {
  952. constructAddre: undefined, // 施工地址
  953. constructPhone: undefined, // 施工人电话
  954. constructUser: undefined, // 施工人
  955. headName: undefined, // 负责人
  956. headPhone: undefined, // 负责人电话
  957. constructAccordingDrawings: undefined, // 是否按图纸施工
  958. segmentedCompressionQualified: undefined, // 分段打压是否合格
  959. selfClosingValveType: undefined, // 自闭阀类型
  960. visitType: undefined, // 上门类型
  961. backfillTime: undefined, // 回填时间
  962. constructTime: undefined, // 施工时间
  963. zEngiineeringPhotoBoList: undefined, // 图片列表
  964. zEngineeringMaterialBo: undefined,// 用料对象, //节点信息
  965. }
  966. }
  967. },
  968. queryParams1: {
  969. pageNum: 1,
  970. pageSize: 10,
  971. district: undefined,
  972. areaId: undefined,
  973. buildingId: undefined,
  974. unitId: undefined,
  975. houseId: undefined,
  976. enginType: undefined,
  977. enginClassification: undefined,
  978. enginCycle: 0,
  979. completionStatus: undefined,
  980. imgUrl: undefined,
  981. type: undefined
  982. },
  983. zEngineeringInfoBo: {
  984. constructAddre: '', // 施工地址
  985. constructPhone: '', // 施工人电话
  986. constructUser: '', // 施工人
  987. headName: '', // 负责人
  988. headPhone: '', // 负责人电话
  989. constructAccordingDrawings: '', // 是否按图纸施工
  990. segmentedCompressionQualified: '', // 分段打压是否合格
  991. selfClosingValveType: '', // 自闭阀类型
  992. visitType: '', // 上门类型
  993. backfillTime: '', // 回填时间
  994. constructTime: '', // 施工时间
  995. zEngiineeringPhotoBoList: [], // 图片列表
  996. zEngineeringMaterialBo: [],// 用料对象
  997. },
  998. nodeList: [],
  999. // 表单参数
  1000. form: {},
  1001. value: [],
  1002. // 表单校验
  1003. rules: {
  1004. id: [
  1005. {required: true, message: "主键不能为空", trigger: "blur"}
  1006. ],
  1007. district: [
  1008. {required: true, message: "行政区不能为空", trigger: "change"}
  1009. ],
  1010. areaId: [
  1011. {required: true, message: "小区不能为空", trigger: "change"}
  1012. ],
  1013. buildingId: [
  1014. {required: true, message: "楼宇不能为空", trigger: "change"}
  1015. ],
  1016. unitId: [
  1017. {required: true, message: "单元不能为空", trigger: "change"}
  1018. ],
  1019. houseId: [
  1020. {required: true, message: "房间不能为空", trigger: "change"}
  1021. ],
  1022. enginType: [
  1023. {required: true, message: "工程类型不能为空", trigger: "change"}
  1024. ],
  1025. enginClassification: [
  1026. {required: true, message: "工程分类不能为空", trigger: "change"}
  1027. ],
  1028. // enginCycle: [
  1029. // {required: true, message: "工程周期不能为空", trigger: "change"}
  1030. // ],
  1031. completionStatus: [
  1032. {required: true, message: "完工状态不能为空", trigger: "change"}
  1033. ],
  1034. imgUrl: [
  1035. {required: true, message: "默认图片地址不能为空", trigger: "blur"}
  1036. ],
  1037. remark: [
  1038. {required: true, message: "备注不能为空", trigger: "blur"}
  1039. ],
  1040. },
  1041. areaList: [],
  1042. buildingList: [],
  1043. unitList: [],
  1044. currentDistrict: null, // 当前行政区
  1045. currentCommunity: null, // 当前小区
  1046. currentBuilding: null, // 当前楼宇
  1047. currentUnit: null, // 当前单元
  1048. communityOptions: [],
  1049. buildingOptions: [], // 楼栋集合
  1050. unitOptions: [], // 单元集合
  1051. houseOptions: [], // 房间集合
  1052. enginClassification_list: [], // 室内节点,
  1053. checkList: [],// 节点集合
  1054. enginNodeStatus: null,
  1055. updateParams: {},
  1056. status: null,
  1057. createTime: '', // 工程创建时间
  1058. checkingForm: {
  1059. reviewStatus: '', // 审核状态
  1060. reviewContent: '', // 审核内容
  1061. enginType: null,
  1062. enginClassification: null,
  1063. reviewTime: '',
  1064. type: '',
  1065. },
  1066. checkingAllList: [],
  1067. reviewStatusList: [
  1068. {
  1069. value: '1',
  1070. label: '通过'
  1071. },
  1072. {
  1073. value: '0',
  1074. label: '不通过'
  1075. }
  1076. ],
  1077. zEngineeringNodeBo: {},
  1078. currentEnginName: null,
  1079. currentCheckingEnginList: []
  1080. };
  1081. },
  1082. created() {
  1083. this.getList();
  1084. },
  1085. mounted() {
  1086. },
  1087. computed: {
  1088. currentContain(e) {
  1089. console.log('当前contain', e)
  1090. }
  1091. },
  1092. methods: {
  1093. enginNodeStatusExecuted(item) {
  1094. try {
  1095. let flag
  1096. if (this.currentCheckingEnginList.filter(e => e.label == item.dictValue)[0].status == '1') return true
  1097. } catch (error) {
  1098. return false
  1099. }
  1100. },
  1101. checkingAllFormClosed() {
  1102. this.$refs.checkingFormAll.resetFields()
  1103. },
  1104. validateCHanged(e) {
  1105. this.reviewStatusList[e].label == '通过' ? this.checkingFormRules.reviewContent[0].required = true : this.checkingFormRules.reviewContent[0].required = false
  1106. },
  1107. checkingAllSubmit() {
  1108. this.$refs.checkingFormAll.validate(valid => {
  1109. if (valid) {
  1110. // this.checkingForm.createTime = formatDate(this.checkingForm.createTime)
  1111. engineeringCivilAllReview(this.checkingForm).then(res => {
  1112. if (res.code == 200) {
  1113. this.$message({
  1114. message: '批量审核请求以提交后台,5-10分钟后均可成功。',
  1115. type: 'success'
  1116. });
  1117. this.checkingsVisible = false
  1118. this.checkingForm = {
  1119. reviewStatus: '', // 审核状态
  1120. reviewContent: '', // 审核内容
  1121. enginType: null,
  1122. enginClassification: null,
  1123. reviewTime: '',
  1124. type: '',
  1125. }
  1126. this.$refs.checkingFormAll.resetFields()
  1127. }
  1128. })
  1129. } else {
  1130. this.$message.error('请填写必填项!')
  1131. }
  1132. })
  1133. },
  1134. // 批量审核
  1135. handleCheckings() {
  1136. this.checkingsVisible = true
  1137. },
  1138. // 节点单项审核
  1139. checkWorking(checkingInfo) {
  1140. let params = checkingInfo
  1141. params.createTime = this.createTime
  1142. CivilReview(params).then(res => {
  1143. if (res.code == 200) {
  1144. this.$message({
  1145. message: '审核成功',
  1146. type: 'success'
  1147. });
  1148. setTimeout(() => {
  1149. this.viewNodeSource()
  1150. }, 1000)
  1151. }
  1152. })
  1153. },
  1154. // 修改施工信息
  1155. updateNodeOption(zEngineeringInfoBoList) {
  1156. delete this.updateParams.zEngineeringNodeBoList
  1157. this.updateParams.zEngineeringNodeBo.zEngineeringInfoBoList = zEngineeringInfoBoList
  1158. putEngineeringCivil(this.updateParams).then(res => {
  1159. console.log(res)
  1160. if (res.code == 200) {
  1161. this.$message({
  1162. message: '修改成功',
  1163. type: 'success'
  1164. });
  1165. this.$refs.ConstructionDetails.dialogVisible = false
  1166. this.updateParams = {}
  1167. }
  1168. })
  1169. },
  1170. addNodeInfo(e) {
  1171. console.log('e', 11111)
  1172. this.nodeDetailType = '修改'
  1173. this.enginId = e.id
  1174. this.status = 'put'
  1175. let title = e.areaName + "-" + e.buildingName + "-" + e.unitName + "-" + e.houseName + " [" + (e.enginType == 'new_built' ? "新建" : '旧改') + "-" + e.enginClassificationName + "]"
  1176. let val = e.enginType + "_" + e.enginClassification
  1177. getDicts(val).then(res => {
  1178. let dict = []
  1179. for (let i = 0; i < res.data.length; i++) {
  1180. dict.push({
  1181. "label": res.data[i].dictLabel,
  1182. "value": res.data[i].dictValue,
  1183. })
  1184. }
  1185. this.$refs.ConstructionDetails.open(dict, null, null, null, title)
  1186. })
  1187. },
  1188. viewNodeSource(e = null) {
  1189. if (e) {
  1190. this.currentEnginName = e
  1191. }
  1192. console.log('viewNodeSource', this.currentEnginName)
  1193. viewEngineeringCivilSource({
  1194. id: this.enginId,
  1195. type: e || this.currentEnginName
  1196. }).then(res => {
  1197. console.log('______', res)
  1198. this.createTime = res.data.createTime
  1199. try {
  1200. this.updateParams = res.data
  1201. this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
  1202. this.$refs.ConstructionDetails.setEngineId(res.data.zEngineeringNodeBo.id || null)
  1203. } catch (error) {
  1204. this.currentCollapses = [];
  1205. }
  1206. console.log('折叠面板info', this.currentEnginName)
  1207. })
  1208. this.$forceUpdate()
  1209. },
  1210. // 查看历史
  1211. viewSource(e, type = null) {
  1212. console.log("viewSource(e, type = null)", e)
  1213. let title = e.areaName + "-" + e.buildingName + "-" + e.unitName + "-" + e.houseName + " [" + (e.enginType == 'new_built' ? "新建" : '旧改') + "-" + e.enginClassificationName + "]"
  1214. console.log("viewSource(e, type = null)", title)
  1215. this.enginId = e.id
  1216. let val = e.enginType + "_" + e.enginClassification
  1217. getDicts(val).then(res => {
  1218. let dict = []
  1219. for (let i = 0; i < res.data.length; i++) {
  1220. dict.push({
  1221. "label": res.data[i].dictLabel,
  1222. "value": res.data[i].dictValue,
  1223. })
  1224. }
  1225. this.zEngineeringNodeBo = e
  1226. this.$refs.ConstructionDetails.open(dict, _, type, null, title)
  1227. this.status = 'read-only'
  1228. })
  1229. },
  1230. // 新增顶管工程
  1231. addNewPipe(data) {
  1232. this.$refs.enginPipe.openDialog({
  1233. id: data.id,
  1234. type: '民用工程'
  1235. }, 'add', data)
  1236. },
  1237. // 新增物料
  1238. addMaterial(data) {
  1239. this.title = "添加用料";
  1240. this.enginNodeStatus = '添加用料'
  1241. this.loading = true;
  1242. this.reset();
  1243. const id = data.id || this.ids
  1244. getEngineeringCivil(id).then(res => {
  1245. this.loading = false;
  1246. this.currentCheckingEnginList = []
  1247. // 处理当前已审核通过的节点
  1248. try {
  1249. res.data.zEngineeringNodeBoList.forEach(e => {
  1250. let status
  1251. try {
  1252. status = e.zEngineeringInfoBoList[0].zEngineeringReviewBo.reviewStatus
  1253. } catch (error) {
  1254. status = '0'
  1255. }
  1256. this.currentCheckingEnginList.push({
  1257. label: e.type,
  1258. status
  1259. })
  1260. })
  1261. } catch (error) {
  1262. this.currentCheckingEnginList = []
  1263. }
  1264. console.log('as', this.currentCheckingEnginList)
  1265. let newData = res.data
  1266. // 手动调用行政区发生改变
  1267. this.districtHasChanged(newData.district)
  1268. this.communityHasChanged(newData.areaId)
  1269. this.buildingHasChanged(newData.buildingId, newData.areaId)
  1270. this.unitHasChanged(newData.unitId)
  1271. // 获取工程分类
  1272. this.enginTypeHasChanged(newData.enginType)
  1273. let val = newData.enginType + "_" + newData.enginClassification
  1274. this.currentCheckList = []
  1275. getDicts(val).then(res => {
  1276. this.checkList = res.data
  1277. console.log(this.checkList)
  1278. })
  1279. this.queryParams = newData
  1280. console.log(this.queryParams.areaId)
  1281. // console.log('选中节点集合',this.currentCheckList)
  1282. // this.enginClassification = zEngineeringNodeBo.type
  1283. // newData.zEngineeringNodeBo = zEngineeringNodeBo
  1284. this.currentType = 'addMaterial'
  1285. this.open = true
  1286. })
  1287. },
  1288. currentEnginTypeChanged() {
  1289. this.currentCheckList = []
  1290. if (this.queryParams.enginType == undefined || this.queryParams.enginType == ''
  1291. || this.queryParams.enginClassification == undefined || this.queryParams.enginClassification == ''
  1292. )
  1293. return
  1294. let val = this.queryParams.enginType + "_" + this.queryParams.enginClassification
  1295. getDicts(val).then(res => {
  1296. this.checkList = res.data
  1297. })
  1298. },
  1299. currentCheckingAllEnginTypeChanged() {
  1300. this.checkingAllList = []
  1301. if (this.checkingForm.enginType == undefined || this.checkingForm.enginType == ''
  1302. || this.checkingForm.enginClassification == undefined || this.checkingForm.enginClassification == ''
  1303. )
  1304. return
  1305. let val = this.checkingForm.enginType + "_" + this.checkingForm.enginClassification
  1306. getDicts(val).then(res => {
  1307. this.checkingAllList = res.data
  1308. })
  1309. },
  1310. // 当前所选行政区发生改变 查询当前小区集合
  1311. districtHasChanged(district) {
  1312. this.queryParams.areaId = null
  1313. this.queryParams.buildingId = null
  1314. this.queryParams.unitId = null
  1315. this.communityOptions = [];
  1316. this.buildingOptions = [];
  1317. this.unitOptions = [];
  1318. this.houseOptions = [];
  1319. getAreaList({district}).then(res => {
  1320. this.communityOptions = res.data
  1321. })
  1322. },
  1323. // 当前所选小区发生改变 查询当前楼栋集合
  1324. communityHasChanged(areaId) {
  1325. this.queryParams.buildingId = null
  1326. this.queryParams.unitId = null
  1327. this.buildingOptions = [];
  1328. this.unitOptions = [];
  1329. this.houseOptions = [];
  1330. getBuildingList({areaId}).then(res => {
  1331. this.buildingOptions = res.data
  1332. })
  1333. },
  1334. buildingHasChanged(buildingId, areaId) {
  1335. this.unitOptions = [];
  1336. this.houseOptions = [];
  1337. this.queryParams.unitId = null
  1338. getUnits(buildingId).then(res => {
  1339. this.unitOptions = res.data
  1340. })
  1341. },
  1342. unitHasChanged(unitId) {
  1343. this.houseOptions = [];
  1344. getHousesList({unitId}).then(res => {
  1345. console.log(res)
  1346. this.houseOptions = res.data
  1347. })
  1348. },
  1349. enginTypeHasChangeds(enginType = null) {
  1350. if (this.queryParams1.enginType == undefined || this.queryParams1.enginType == null || this.queryParams1.enginType == '')
  1351. return
  1352. this.currentCheckList = []
  1353. this.queryParams1.enginClassification = ''
  1354. this.currentEnginTypeChangeOptions1 = []
  1355. getDicts(enginType || this.queryParams1.enginType).then(res => {
  1356. this.currentEnginTypeChangeOptions1 = res.data
  1357. })
  1358. },
  1359. nodeTypeHasChangeds(enginType = null, enginClassification = null) {
  1360. if ((this.queryParams1.enginType == undefined || this.queryParams1.enginType == null || this.queryParams1.enginType == '') && (this.queryParams1.enginClassification == undefined || this.queryParams1.enginClassification == null || this.queryParams1.enginClassification == ''))
  1361. return
  1362. this.currentCheckList = []
  1363. this.queryParams1.type = ''
  1364. this.currentEnginTypeChangeOptions2 = []
  1365. getDicts(enginType && enginClassification || this.queryParams1.enginType + '_' + this.queryParams1.enginClassification).then(res => {
  1366. this.currentEnginTypeChangeOptions2 = res.data
  1367. })
  1368. },
  1369. enginTypeHasChanged(enginType = null) {
  1370. this.currentCheckList = []
  1371. this.queryParams.enginClassification = ''
  1372. this.currentEnginTypeChangeOptions = []
  1373. getDicts(enginType || this.queryParams.enginType).then(res => {
  1374. this.currentEnginTypeChangeOptions = res.data
  1375. })
  1376. },
  1377. onClose() {
  1378. console.log(this.currentCheckList)
  1379. this.currentCheckList = []
  1380. this.checkList = []
  1381. this.reset()
  1382. },
  1383. closeToSucceed() {
  1384. this.open = false;
  1385. },
  1386. getAreaList(district) {
  1387. if (district === undefined || district == null || district === '')
  1388. return
  1389. getAreaList({district: district}).then(res => this.areaList = res.data)
  1390. },
  1391. getBuildingList1(areaId) {
  1392. if (areaId === undefined || areaId == null || areaId === '')
  1393. return
  1394. getBuildingList({areaId: areaId}).then(res => this.buildingList = res.data)
  1395. },
  1396. getUnitList1(buildingId) {
  1397. if (buildingId === undefined || buildingId == null || buildingId === '')
  1398. return
  1399. getUnits(buildingId).then(res => this.unitList = res.data)
  1400. },
  1401. /** 查询民用工程列表 */
  1402. getList() {
  1403. this.loading = true;
  1404. listEngineeringCivil(this.queryParams1).then(response => {
  1405. this.engineeringCivilList = response.rows;
  1406. this.total = response.total;
  1407. this.loading = false;
  1408. });
  1409. },
  1410. // 取消按钮
  1411. cancel() {
  1412. this.open = false;
  1413. this.reset();
  1414. },
  1415. // 表单重置
  1416. reset() {
  1417. this.form = {
  1418. id: undefined,
  1419. district: undefined,
  1420. areaId: undefined,
  1421. buildingId: undefined,
  1422. unitId: undefined,
  1423. houseId: undefined,
  1424. enginType: undefined,
  1425. enginClassification: undefined,
  1426. enginCycle: 0,
  1427. completionStatus: undefined,
  1428. version: undefined,
  1429. imgUrl: undefined,
  1430. // remark: undefined,
  1431. delFlag: undefined,
  1432. createBy: undefined,
  1433. createTime: undefined,
  1434. updateBy: undefined,
  1435. updateTime: undefined
  1436. };
  1437. this.queryParams = {
  1438. district: undefined,
  1439. areaId: undefined,
  1440. buildingId: undefined,
  1441. unitId: undefined,
  1442. houseId: undefined,
  1443. enginType: undefined,
  1444. enginClassification: undefined,
  1445. enginCycle: 0,
  1446. completionStatus: undefined,
  1447. imgUrl: undefined,
  1448. // zEngineeringNodeBo: {
  1449. // type: undefined,
  1450. // zEngineeringInfoBo: {
  1451. // constructAddre: undefined, // 施工地址
  1452. // constructPhone: undefined, // 施工人电话
  1453. // constructUser: undefined, // 施工人
  1454. // headName: undefined, // 负责人
  1455. // headPhone: undefined, // 负责人电话
  1456. // constructAccordingDrawings: undefined, // 是否按图纸施工
  1457. // segmentedCompressionQualified: undefined, // 分段打压是否合格
  1458. // selfClosingValveType: undefined, // 自闭阀类型
  1459. // visitType: undefined, // 上门类型
  1460. // backfillTime: undefined, // 回填时间
  1461. // constructTime: undefined, // 施工时间
  1462. // zEngiineeringPhotoBoList: undefined, // 图片列表
  1463. // zEngineeringMaterialBo: undefined,// 用料对象, //节点信息
  1464. // }
  1465. // },
  1466. }
  1467. this.enginClassification = null
  1468. this.resetForm("form");
  1469. },
  1470. /** 搜索按钮操作 */
  1471. handleQuery() {
  1472. this.queryParams1.pageNum = 1;
  1473. this.getList();
  1474. },
  1475. /** 重置按钮操作 */
  1476. resetQuery() {
  1477. this.resetForm("queryForm");
  1478. this.areaList = []
  1479. this.buildingList = []
  1480. this.unitList = []
  1481. this.currentEnginTypeChangeOptions1 = []
  1482. this.handleQuery();
  1483. },
  1484. // 多选框选中数据
  1485. handleSelectionChange(selection) {
  1486. this.ids = selection.map(item => item.id)
  1487. this.single = selection.length !== 1
  1488. this.multiple = !selection.length
  1489. },
  1490. // 新增顶管工程
  1491. // addNewPipe(data){
  1492. // this.$refs.enginPipe.openDialog({
  1493. // id:data.id
  1494. // },'add')
  1495. // },
  1496. nodeCancel() {
  1497. this.nodeDetailVisible = false
  1498. },
  1499. toNodeDetail() {
  1500. this.$refs.form.validate(valid => {
  1501. if (valid) {
  1502. let nodeCollection = []
  1503. // 收集节点信息
  1504. this.currentCheckList.forEach((e, idx) => {
  1505. let nodeItem = this.$refs['EnginNodeInfo' + idx][0].infoCollection()
  1506. nodeCollection.push(nodeItem)
  1507. setTimeout(() => {
  1508. console.log('nodeCollection:', nodeItem)
  1509. console.log('nodeCollection:', this.$refs['EnginNodeInfo' + idx][0])
  1510. }, 2000)
  1511. })
  1512. this.queryParams.zEngineeringNodeBoList = nodeCollection
  1513. if (this.enginNodeStatus == '修改') {
  1514. putEngineeringCivil(this.queryParams).then(res => {
  1515. if (res.code == 200) {
  1516. this.$message({
  1517. message: '修改成功',
  1518. type: 'success'
  1519. });
  1520. this.open = false
  1521. console.log('选中节点集合', this.currentCheckList)
  1522. this.currentCheckList = []
  1523. this.getList()
  1524. // this.$emit('closeToSucceed')
  1525. }
  1526. })
  1527. } else if (this.enginNodeStatus == '添加用料') {
  1528. addEngineeringCivil(this.queryParams).then(res => {
  1529. if (res.code == 200) {
  1530. this.$message({
  1531. message: '添加成功',
  1532. type: 'success'
  1533. });
  1534. this.open = false
  1535. console.log('选中节点集合', this.currentCheckList)
  1536. this.currentCheckList = []
  1537. this.getList()
  1538. // this.$emit('closeToSucceed')
  1539. }
  1540. })
  1541. } else if (this.enginNodeStatus == '添加用料') {
  1542. addEngineeringCivil(this.queryParams).then(res => {
  1543. if (res.code == 200) {
  1544. this.$message({
  1545. message: '添加成功',
  1546. type: 'success'
  1547. });
  1548. this.open = false
  1549. console.log('选中节点集合', this.currentCheckList)
  1550. this.currentCheckList = []
  1551. this.getList();
  1552. // this.$emit('closeToSucceed')
  1553. }
  1554. })
  1555. } else {
  1556. addEngineeringCivil(this.queryParams).then(res => {
  1557. if (res.code == 200) {
  1558. this.$message({
  1559. message: '新增成功',
  1560. type: 'success'
  1561. });
  1562. this.open = false
  1563. console.log('选中节点集合', this.currentCheckList)
  1564. this.currentCheckList = []
  1565. this.getList();
  1566. // this.$emit('closeToSucceed')
  1567. }
  1568. })
  1569. }
  1570. } else {
  1571. // this.$message.error(`请完善信息!`);
  1572. }
  1573. })
  1574. return
  1575. getDictList({enginType: ['new_built', 'old_renovation']}).then(res => {
  1576. this.nodeList = res.data
  1577. console.log('跳到详情前的queryParams', this.queryParams)
  1578. console.log('跳到详情前的节点集合', this.nodeList)
  1579. if (this.currentType == 'put') {
  1580. this.$refs.childNode.open(this.queryParams, 16, this.nodeList)
  1581. this.currentType = null
  1582. return
  1583. }
  1584. // 加工 enginClassification 工程节点
  1585. // const parts = this.value[1].split('_');
  1586. // let result = parts.slice(2).join('_');
  1587. // console.log(result)
  1588. // this.queryParams.zEngineeringNodeBo.type = this.enginClassification
  1589. // this.queryParams.enginClassification = result
  1590. // console.log(this.queryParams)
  1591. console.log('新增queryparams传值', this.queryParams)
  1592. this.$refs.childNode.open(this.queryParams, 0, this.nodeList)
  1593. return
  1594. this.$refs['form'].validate(e => {
  1595. if (e) {
  1596. this.nodeDetailVisible = true
  1597. }
  1598. })
  1599. })
  1600. },
  1601. /** 新增按钮操作 */
  1602. handleAdd() {
  1603. this.currentCheckingEnginList = []
  1604. this.enginNodeStatus = '新增'
  1605. this.reset();
  1606. this.open = true;
  1607. this.title = "添加民用工程";
  1608. },
  1609. /** 修改按钮操作 */
  1610. handleUpdate(row) {
  1611. let that = this
  1612. this.enginNodeStatus = '修改'
  1613. this.loading = true;
  1614. this.reset();
  1615. const id = row.id || this.ids
  1616. getEngineeringCivil(id).then(res => {
  1617. that.loading = false;
  1618. // let newData = res.data
  1619. // // 手动调用行政区发生改变
  1620. let newData = res.data
  1621. that.districtHasChanged(newData.district)
  1622. that.communityHasChanged(newData.areaId)
  1623. that.buildingHasChanged(newData.buildingId, newData.areaId)
  1624. that.unitHasChanged(newData.unitId)
  1625. that.queryParams = res.data
  1626. let va = that.queryParams.enginClassification
  1627. that.enginTypeHasChanged(that.queryParams.enginType)
  1628. that.queryParams.enginClassification = va
  1629. that.open = true
  1630. that.title = "修改民用工程";
  1631. })
  1632. },
  1633. /** 提交按钮 */
  1634. submitForm() {
  1635. this.$refs["form"].validate(valid => {
  1636. if (valid) {
  1637. this.buttonLoading = true;
  1638. if (this.form.id != null) {
  1639. updateEngineeringCivil(this.form).then(response => {
  1640. this.$modal.msgSuccess("修改成功");
  1641. this.open = false;
  1642. debugger
  1643. this.getList();
  1644. }).finally(() => {
  1645. this.buttonLoading = false;
  1646. });
  1647. } else {
  1648. addEngineeringCivil(this.form).then(response => {
  1649. this.$modal.msgSuccess("新增成功");
  1650. this.open = false;
  1651. this.getList();
  1652. }).finally(() => {
  1653. this.buttonLoading = false;
  1654. });
  1655. }
  1656. }
  1657. });
  1658. },
  1659. /** 删除按钮操作 */
  1660. handleDelete(row) {
  1661. console.log(row)
  1662. const ids = row.id || this.ids;
  1663. this.$modal.confirm('是否确认删除所选数据项?').then(() => {
  1664. this.loading = true;
  1665. return delEngineeringCivil(ids);
  1666. }).then(() => {
  1667. this.loading = false;
  1668. this.getList();
  1669. this.$modal.msgSuccess("删除成功");
  1670. }).catch(() => {
  1671. }).finally(() => {
  1672. this.loading = false;
  1673. });
  1674. },
  1675. /** 导出按钮操作 */
  1676. handleExport() {
  1677. this.download('zdsz/engineeringCivil/export', {
  1678. ...this.queryParams1
  1679. }, `engineeringCivil_${new Date().getTime()}.xlsx`)
  1680. }
  1681. }
  1682. };
  1683. </script>
  1684. <style lang="scss" scoped>
  1685. ::v-deep .addDialog {
  1686. width: 60%;
  1687. // height: 85%;
  1688. max-height: 85%;
  1689. overflow: hidden;
  1690. overflow-y: scroll;
  1691. }
  1692. ::v-deep .appendElDialog {
  1693. overflow: hidden;
  1694. overflow-y: scroll;
  1695. width: 70%;
  1696. height: 80%;
  1697. .el-dialog__body {
  1698. height: 85%;
  1699. }
  1700. .el-form-item {
  1701. margin-bottom: 22px;
  1702. width: 44%;
  1703. display: inline-block;
  1704. }
  1705. .el-form-item:nth-child(2n+2) {
  1706. margin-left: 5%;
  1707. }
  1708. .el-form-item:not(:nth-child(1):nth-child(2)) {
  1709. margin-top: 0.5%;
  1710. }
  1711. .remark_input {
  1712. .el-textarea__inner {
  1713. width: 238%;
  1714. height: 190px;
  1715. }
  1716. }
  1717. }
  1718. ::v-deep .appendElNodeDialog {
  1719. // width: 70%;
  1720. height: 80%;
  1721. .el-dialog__body {
  1722. height: 85%;
  1723. }
  1724. .el-form-item {
  1725. margin-bottom: 22px;
  1726. width: 44%;
  1727. display: inline-block;
  1728. }
  1729. .el-form-item:nth-child(2n+2) {
  1730. margin-left: 5%;
  1731. }
  1732. .el-form-item:not(:nth-child(1):nth-child(2)) {
  1733. margin-top: 0.5%;
  1734. }
  1735. }
  1736. ::v-deep .checkingAll {
  1737. .el-dialog {
  1738. width: 40%;
  1739. height: 70%;
  1740. }
  1741. .el-dialog__body {
  1742. padding-left: 28%;
  1743. }
  1744. .el-form div:not(:nth-child(1)) {
  1745. margin-top: 1%;
  1746. }
  1747. .el-textarea__inner {
  1748. width: 360px;
  1749. height: 115px;
  1750. }
  1751. }
  1752. </style>