index.vue 71 KB

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