index.vue 75 KB

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