index.vue 76 KB

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