index.vue 82 KB

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