index.vue 76 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220
  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. 'specificConstruction'//具体施工位置
  1148. ],
  1149. 'constructTime',
  1150. 'boxBrand',
  1151. 'Lightning',
  1152. 'BottomLeg',
  1153. 'GroundHardening',
  1154. 'stonePowder', // 照片
  1155. ]
  1156. },
  1157. // {
  1158. // name: '管道施工记录',
  1159. // components: [
  1160. // [],
  1161. // 'constructTime',
  1162. // 'zEngiineeringPhotoBoList', // 照片
  1163. // ]
  1164. // }
  1165. ],
  1166. currentCheckList: [],
  1167. enginType: '',
  1168. enginClassificationinfo: '',
  1169. enginClassification: '',
  1170. enginClassificationOption: [],
  1171. enginTypeOption: [
  1172. {
  1173. value: 'old_renovation',
  1174. label: '旧改'
  1175. }, {
  1176. value: 'new_built',
  1177. label: '新建'
  1178. },
  1179. ],
  1180. currentEnginTypeChangeOptions: [],
  1181. currentEnginTypeChangeOptions1: [],
  1182. currentEnginTypeChangeOptions2: [],
  1183. StateOptions: [
  1184. {
  1185. value: '0',
  1186. label: '审核未通过'
  1187. }, {
  1188. value: '1',
  1189. label: '审核通过'
  1190. },
  1191. {
  1192. value: '2',
  1193. label: '未审核'
  1194. }
  1195. ],
  1196. // 按钮loading
  1197. buttonLoading: false,
  1198. // 遮罩层
  1199. loading: true,
  1200. // 选中数组
  1201. ids: [],
  1202. // 非单个禁用
  1203. single: true,
  1204. // 非多个禁用
  1205. multiple: true,
  1206. // 显示搜索条件
  1207. showSearch: true,
  1208. // 总条数
  1209. total: 0,
  1210. // 民用工程表格数据
  1211. engineeringCivilList: [],
  1212. // 弹出层标题
  1213. title: "",
  1214. // 是否显示弹出层
  1215. open: false,
  1216. // 查询参数
  1217. queryParams: {
  1218. district: undefined,
  1219. areaId: undefined,
  1220. buildingId: undefined,
  1221. unitId: undefined,
  1222. houseId: undefined,
  1223. enginType: undefined,
  1224. enginCycle: 0,
  1225. completionStatus: undefined,
  1226. enginClassification: undefined,
  1227. imgUrl: undefined,
  1228. zEngineeringNodeBoList: {
  1229. type: undefined,
  1230. zEngineeringInfoBo: {
  1231. constructAddre: undefined, // 施工地址
  1232. constructPhone: undefined, // 施工人电话
  1233. constructUser: undefined, // 施工人
  1234. headName: undefined, // 负责人
  1235. headPhone: undefined, // 负责人电话
  1236. constructAccordingDrawings: undefined, // 是否按图纸施工
  1237. segmentedCompressionQualified: undefined, // 分段打压是否合格
  1238. selfClosingValveType: undefined, // 自闭阀类型
  1239. visitType: undefined, // 上门类型
  1240. backfillTime: undefined, // 回填时间
  1241. constructTime: undefined, // 施工时间
  1242. zEngiineeringPhotoBoList: undefined, // 图片列表
  1243. zEngineeringMaterialBo: undefined,// 用料对象, //节点信息
  1244. }
  1245. }
  1246. },
  1247. queryParams1: {
  1248. pageNum: 1,
  1249. pageSize: 10,
  1250. district: undefined,
  1251. areaId: undefined,
  1252. buildingId: undefined,
  1253. unitId: undefined,
  1254. houseId: undefined,
  1255. enginType: undefined,
  1256. enginClassification: undefined,
  1257. enginCycle: 0,
  1258. completionStatus: undefined,
  1259. imgUrl: undefined,
  1260. type: undefined,
  1261. beginTime: [],
  1262. createBy: ''
  1263. },
  1264. zEngineeringInfoBo: {
  1265. constructAddre: '', // 施工地址
  1266. constructPhone: '', // 施工人电话
  1267. constructUser: '', // 施工人
  1268. headName: '', // 负责人
  1269. headPhone: '', // 负责人电话
  1270. constructAccordingDrawings: '', // 是否按图纸施工
  1271. segmentedCompressionQualified: '', // 分段打压是否合格
  1272. selfClosingValveType: '', // 自闭阀类型
  1273. visitType: '', // 上门类型
  1274. backfillTime: '', // 回填时间
  1275. constructTime: '', // 施工时间
  1276. zEngiineeringPhotoBoList: [], // 图片列表
  1277. zEngineeringMaterialBo: [],// 用料对象
  1278. },
  1279. nodeList: [],
  1280. // 表单参数
  1281. form: {},
  1282. value: [],
  1283. // 表单校验
  1284. rules: {
  1285. id: [
  1286. {required: true, message: "主键不能为空", trigger: "blur"}
  1287. ],
  1288. district: [
  1289. {required: true, message: "行政区不能为空", trigger: "change"}
  1290. ],
  1291. areaId: [
  1292. {required: true, message: "小区不能为空", trigger: "change"}
  1293. ],
  1294. buildingId: [
  1295. {required: true, message: "楼宇不能为空", trigger: "change"}
  1296. ],
  1297. unitId: [
  1298. {required: true, message: "单元不能为空", trigger: "change"}
  1299. ],
  1300. houseId: [
  1301. {required: true, message: "房间不能为空", trigger: "change"}
  1302. ],
  1303. enginType: [
  1304. {required: true, message: "工程类型不能为空", trigger: "change"}
  1305. ],
  1306. enginClassification: [
  1307. {required: true, message: "工程分类不能为空", trigger: "change"}
  1308. ],
  1309. // enginCycle: [
  1310. // {required: true, message: "工程周期不能为空", trigger: "change"}
  1311. // ],
  1312. completionStatus: [
  1313. {required: true, message: "完工状态不能为空", trigger: "change"}
  1314. ],
  1315. imgUrl: [
  1316. {required: true, message: "默认图片地址不能为空", trigger: "blur"}
  1317. ],
  1318. remark: [
  1319. {required: true, message: "备注不能为空", trigger: "blur"}
  1320. ],
  1321. },
  1322. areaList: [],
  1323. buildingList: [],
  1324. unitList: [],
  1325. houseList: [],
  1326. currentDistrict: null, // 当前行政区
  1327. currentCommunity: null, // 当前小区
  1328. currentBuilding: null, // 当前楼宇
  1329. currentUnit: null, // 当前单元
  1330. communityOptions: [],
  1331. buildingOptions: [], // 楼栋集合
  1332. unitOptions: [], // 单元集合
  1333. houseOptions: [], // 房间集合
  1334. enginClassification_list: [], // 室内节点,
  1335. checkList: [],// 节点集合
  1336. enginNodeStatus: null,
  1337. updateParams: {},
  1338. status: null,
  1339. createTime: '', // 工程创建时间
  1340. checkingForm: {
  1341. reviewStatus: '', // 审核状态
  1342. reviewContent: '', // 审核内容
  1343. enginType: null,
  1344. enginClassification: null,
  1345. reviewTime: '',
  1346. type: '',
  1347. },
  1348. batchForm: {
  1349. completionStatus: '', // 审核状态
  1350. reviewContent: '', // 审核内容
  1351. enginType: null,
  1352. enginClassification: null,
  1353. reviewTime: '',
  1354. type: '',
  1355. district: '',
  1356. buildingId: '',
  1357. unitId: '',
  1358. areaId: '',
  1359. enginCycle: 0
  1360. },
  1361. checkingAllList: [],
  1362. reviewStatusList: [
  1363. {
  1364. value: '1',
  1365. label: '通过'
  1366. },
  1367. {
  1368. value: '0',
  1369. label: '不通过'
  1370. }
  1371. ],
  1372. swithList: [
  1373. {
  1374. value: '2',
  1375. label: '关闭'
  1376. },
  1377. {
  1378. value: '0',
  1379. label: '开启'
  1380. }
  1381. ],
  1382. zEngineeringNodeBo: {},
  1383. currentEnginName: null,
  1384. currentCheckingEnginList: [],
  1385. userList: []
  1386. };
  1387. },
  1388. created() {
  1389. this.getList();
  1390. },
  1391. mounted() {
  1392. this.listAll()
  1393. },
  1394. computed: {
  1395. currentContain(e) {
  1396. console.log('当前contain', e)
  1397. }
  1398. },
  1399. methods: {
  1400. querySearch(queryString, cb) {
  1401. var restaurants = this.userList;
  1402. var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
  1403. // 调用 callback 返回建议列表的数据
  1404. cb(results);
  1405. },
  1406. handleSelect(item) {
  1407. console.log(item);
  1408. },
  1409. createFilter(queryString) {
  1410. return (restaurant) => {
  1411. return (restaurant.userName.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
  1412. };
  1413. },
  1414. enginNodeStatusExecuted(item) {
  1415. try {
  1416. let flag
  1417. if (this.currentCheckingEnginList.filter(e => e.label == item.dictValue)[0].status == '1') return true
  1418. } catch (error) {
  1419. return false
  1420. }
  1421. },
  1422. checkingAllFormClosed() {
  1423. this.$refs.checkingFormAll.resetFields()
  1424. },
  1425. validateCHanged(e) {
  1426. this.reviewStatusList[e].label == '通过' ? this.checkingFormRules.reviewContent[0].required = true : this.checkingFormRules.reviewContent[0].required = false
  1427. },
  1428. batchAllSubmit() {
  1429. this.$refs.batchFormAll.validate(valid => {
  1430. if (valid) {
  1431. batchNode(this.batchForm).then(res => {
  1432. if (res.code == 200) {
  1433. this.batchVisible = false
  1434. this.batchForm = {
  1435. completionStatus: '', // 审核状态
  1436. reviewContent: '', // 审核内容
  1437. enginType: null,
  1438. enginClassification: null,
  1439. reviewTime: '',
  1440. type: '',
  1441. district: '',
  1442. buildingId: '',
  1443. unitId: '',
  1444. areaId: '',
  1445. enginCycle: 0
  1446. }
  1447. setTimeout(() => this.getList(), 1000)
  1448. this.$refs.batchFormAll.resetFields()
  1449. }
  1450. })
  1451. } else {
  1452. this.$message.error('请填写必填项!')
  1453. }
  1454. })
  1455. },
  1456. listAll() {
  1457. listAll({status: 0}).then(res => {
  1458. this.userList = res.data
  1459. })
  1460. },
  1461. checkingAllSubmit() {
  1462. this.$refs.checkingFormAll.validate(valid => {
  1463. if (valid) {
  1464. // this.checkingForm.createTime = formatDate(this.checkingForm.createTime)
  1465. engineeringCivilAllReview(this.checkingForm).then(res => {
  1466. if (res.code == 200) {
  1467. this.$message({
  1468. message: '批量审核请求以提交后台,5-10分钟后均可成功。',
  1469. type: 'success'
  1470. });
  1471. this.checkingsVisible = false
  1472. this.checkingForm = {
  1473. reviewStatus: '', // 审核状态
  1474. reviewContent: '', // 审核内容
  1475. enginType: null,
  1476. enginClassification: null,
  1477. reviewTime: '',
  1478. type: '',
  1479. }
  1480. this.$refs.checkingFormAll.resetFields()
  1481. }
  1482. })
  1483. } else {
  1484. this.$message.error('请填写必填项!')
  1485. }
  1486. })
  1487. },
  1488. // 批量审核
  1489. handleCheckings() {
  1490. this.checkingsVisible = true
  1491. },
  1492. batchCheckings() {
  1493. this.batchVisible = true
  1494. },
  1495. // 节点单项审核
  1496. checkWorking(checkingInfo) {
  1497. let params = checkingInfo
  1498. params.createTime = this.createTime
  1499. CivilReview(params).then(res => {
  1500. if (res.code == 200) {
  1501. this.$message({
  1502. message: '审核成功',
  1503. type: 'success'
  1504. });
  1505. this.getList()
  1506. setTimeout(() => {
  1507. this.viewNodeSource()
  1508. }, 1000)
  1509. }
  1510. })
  1511. },
  1512. // 修改施工信息
  1513. updateNodeOption(zEngineeringInfoBoList) {
  1514. delete this.updateParams.zEngineeringNodeBoList
  1515. this.updateParams.zEngineeringNodeBo.zEngineeringInfoBoList = zEngineeringInfoBoList
  1516. putEngineeringCivil(this.updateParams).then(res => {
  1517. console.log(res)
  1518. if (res.code == 200) {
  1519. this.$message({
  1520. message: '修改成功',
  1521. type: 'success'
  1522. });
  1523. this.$refs.ConstructionDetails.dialogVisible = false
  1524. this.updateParams = {}
  1525. }
  1526. })
  1527. },
  1528. addNodeInfo(e) {
  1529. console.log('e', 11111)
  1530. this.nodeDetailType = '修改'
  1531. this.enginId = e.id
  1532. this.status = 'put'
  1533. let title = e.areaName + "-" + e.buildingName + "-" + e.unitName + "-" + e.houseName + " [" + (e.enginType == 'new_built' ? "新建" : '旧改') + "-" + e.enginClassificationName + "]"
  1534. let val = e.enginType + "_" + e.enginClassification
  1535. getDicts(val).then(res => {
  1536. let dict = []
  1537. for (let i = 0; i < res.data.length; i++) {
  1538. dict.push({
  1539. "label": res.data[i].dictLabel,
  1540. "value": res.data[i].dictValue,
  1541. })
  1542. }
  1543. this.zEngineeringNodeBo = e
  1544. this.$refs.ConstructionDetails.open(dict, null, null, '民用', title, this.zEngineeringNodeBo.enginClassification, this.zEngineeringNodeBo.enginType, "民用工程")
  1545. })
  1546. },
  1547. viewNodeSource(e = null) {
  1548. if (e) {
  1549. this.currentEnginName = e
  1550. }
  1551. console.log('viewNodeSource', this.currentEnginName)
  1552. viewEngineeringCivilSource({
  1553. id: this.enginId,
  1554. type: e || this.currentEnginName
  1555. }).then(res => {
  1556. console.log('______', res)
  1557. this.createTime = res.data.createTime
  1558. try {
  1559. this.updateParams = res.data
  1560. this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
  1561. this.$refs.ConstructionDetails.setEngineId(res.data.zEngineeringNodeBo.id || null)
  1562. } catch (error) {
  1563. this.currentCollapses = [];
  1564. }
  1565. console.log('折叠面板info', this.currentEnginName)
  1566. })
  1567. this.$forceUpdate()
  1568. },
  1569. // 查看历史
  1570. viewSource(e, type = null) {
  1571. console.log("viewSource(e, type = null)", e)
  1572. let title = e.areaName + "-" + e.buildingName + "-" + e.unitName + "-" + e.houseName + " [" + (e.enginType == 'new_built' ? "新建" : '旧改') + "-" + e.enginClassificationName + "]"
  1573. console.log("viewSource(e, type = null)", title)
  1574. this.enginId = e.id
  1575. let val = e.enginType + "_" + e.enginClassification
  1576. getDicts(val).then(res => {
  1577. let dict = []
  1578. for (let i = 0; i < res.data.length; i++) {
  1579. dict.push({
  1580. "label": res.data[i].dictLabel,
  1581. "value": res.data[i].dictValue,
  1582. })
  1583. }
  1584. this.zEngineeringNodeBo = e
  1585. console.log(this.zEngineeringNodeBo)
  1586. this.$refs.ConstructionDetails.open(dict, _, type, '民用', title, this.zEngineeringNodeBo.enginClassification, this.enginType)
  1587. this.status = 'read-only'
  1588. })
  1589. },
  1590. // 新增顶管工程
  1591. addNewPipe(data) {
  1592. this.$refs.enginPipe.openDialog({
  1593. id: data.id,
  1594. type: '民用工程'
  1595. }, 'add', data)
  1596. },
  1597. // 新增物料
  1598. addMaterial(data) {
  1599. this.title = "添加用料";
  1600. this.enginNodeStatus = '添加用料'
  1601. this.loading = true;
  1602. this.reset();
  1603. const id = data.id || this.ids
  1604. getEngineeringCivil(id).then(res => {
  1605. this.loading = false;
  1606. this.currentCheckingEnginList = []
  1607. // 处理当前已审核通过的节点
  1608. try {
  1609. res.data.zEngineeringNodeBoList.forEach(e => {
  1610. let status
  1611. try {
  1612. status = e.zEngineeringInfoBoList[0].zEngineeringReviewBo.reviewStatus
  1613. } catch (error) {
  1614. status = '0'
  1615. }
  1616. this.currentCheckingEnginList.push({
  1617. label: e.type,
  1618. status
  1619. })
  1620. })
  1621. } catch (error) {
  1622. this.currentCheckingEnginList = []
  1623. }
  1624. console.log('as', this.currentCheckingEnginList)
  1625. let newData = res.data
  1626. // 手动调用行政区发生改变
  1627. this.districtHasChanged(newData.district)
  1628. this.communityHasChanged(newData.areaId)
  1629. this.buildingHasChanged(newData.buildingId, newData.areaId)
  1630. this.unitHasChanged(newData.unitId)
  1631. // 获取工程分类
  1632. this.enginTypeHasChanged(newData.enginType)
  1633. let val = newData.enginType + "_" + newData.enginClassification
  1634. this.currentCheckList = []
  1635. getDicts(val).then(res => {
  1636. this.checkList = res.data
  1637. console.log(this.checkList)
  1638. })
  1639. this.queryParams = newData
  1640. console.log(this.queryParams.areaId)
  1641. // console.log('选中节点集合',this.currentCheckList)
  1642. // this.enginClassification = zEngineeringNodeBo.type
  1643. // newData.zEngineeringNodeBo = zEngineeringNodeBo
  1644. this.currentType = 'addMaterial'
  1645. this.open = true
  1646. })
  1647. },
  1648. currentEnginTypeChanged() {
  1649. this.currentCheckList = []
  1650. if (this.queryParams.enginType == undefined || this.queryParams.enginType == ''
  1651. || this.queryParams.enginClassification == undefined || this.queryParams.enginClassification == ''
  1652. )
  1653. return
  1654. let val = this.queryParams.enginType + "_" + this.queryParams.enginClassification
  1655. getDicts(val).then(res => {
  1656. this.checkList = res.data
  1657. })
  1658. },
  1659. currentCheckingAllEnginTypeChanged() {
  1660. this.checkingAllList = []
  1661. if (this.checkingForm.enginType == undefined || this.checkingForm.enginType == ''
  1662. || this.checkingForm.enginClassification == undefined || this.checkingForm.enginClassification == ''
  1663. )
  1664. return
  1665. let val = this.checkingForm.enginType + "_" + this.checkingForm.enginClassification
  1666. getDicts(val).then(res => {
  1667. this.checkingAllList = res.data
  1668. })
  1669. },
  1670. currentCheckingAll() {
  1671. this.checkingAllList = []
  1672. if (this.batchForm.enginType == undefined || this.batchForm.enginType == ''
  1673. || this.batchForm.enginClassification == undefined || this.batchForm.enginClassification == ''
  1674. )
  1675. return
  1676. let val = this.batchForm.enginType + "_" + this.batchForm.enginClassification
  1677. getDicts(val).then(res => {
  1678. this.checkingAllList = res.data
  1679. })
  1680. },
  1681. // 当前所选行政区发生改变 查询当前小区集合
  1682. districtHasChanged(district) {
  1683. this.queryParams.areaId = null
  1684. this.queryParams.buildingId = null
  1685. this.queryParams.unitId = null
  1686. this.communityOptions = [];
  1687. this.buildingOptions = [];
  1688. this.unitOptions = [];
  1689. this.houseOptions = [];
  1690. getAreaList({district}).then(res => {
  1691. this.communityOptions = res.data
  1692. })
  1693. },
  1694. // 当前所选小区发生改变 查询当前楼栋集合
  1695. communityHasChanged(areaId) {
  1696. this.queryParams.buildingId = null
  1697. this.queryParams.unitId = null
  1698. this.buildingOptions = [];
  1699. this.unitOptions = [];
  1700. this.houseOptions = [];
  1701. getBuildingList({areaId}).then(res => {
  1702. this.buildingOptions = res.data
  1703. })
  1704. },
  1705. buildingHasChanged(buildingId, areaId) {
  1706. this.unitOptions = [];
  1707. this.houseOptions = [];
  1708. this.queryParams.unitId = null
  1709. getUnits(buildingId).then(res => {
  1710. this.unitOptions = res.data
  1711. })
  1712. },
  1713. unitHasChanged(unitId) {
  1714. this.houseOptions = [];
  1715. getHousesList({unitId}).then(res => {
  1716. console.log(res)
  1717. this.houseOptions = res.data
  1718. })
  1719. },
  1720. enginTypeHasChangeds(enginType = null) {
  1721. if (this.queryParams1.enginType == undefined || this.queryParams1.enginType == null || this.queryParams1.enginType == '')
  1722. return
  1723. this.currentCheckList = []
  1724. this.queryParams1.enginClassification = ''
  1725. this.currentEnginTypeChangeOptions1 = []
  1726. getDicts(enginType || this.queryParams1.enginType).then(res => {
  1727. this.currentEnginTypeChangeOptions1 = res.data
  1728. })
  1729. },
  1730. nodeTypeHasChangeds(enginType = null, enginClassification = null) {
  1731. if ((this.queryParams1.enginType == undefined || this.queryParams1.enginType == null || this.queryParams1.enginType == '') && (this.queryParams1.enginClassification == undefined || this.queryParams1.enginClassification == null || this.queryParams1.enginClassification == ''))
  1732. return
  1733. this.currentCheckList = []
  1734. this.queryParams1.type = ''
  1735. this.currentEnginTypeChangeOptions2 = []
  1736. getDicts(enginType && enginClassification || this.queryParams1.enginType + '_' + this.queryParams1.enginClassification).then(res => {
  1737. this.currentEnginTypeChangeOptions2 = res.data
  1738. })
  1739. },
  1740. enginTypeHasChanged(enginType = null) {
  1741. this.currentCheckList = []
  1742. this.queryParams.enginClassification = ''
  1743. this.currentEnginTypeChangeOptions = []
  1744. getDicts(enginType || this.queryParams.enginType).then(res => {
  1745. this.currentEnginTypeChangeOptions = res.data
  1746. })
  1747. },
  1748. onClose() {
  1749. console.log(this.currentCheckList)
  1750. this.currentCheckList = []
  1751. this.checkList = []
  1752. this.reset()
  1753. },
  1754. closeToSucceed() {
  1755. this.open = false;
  1756. },
  1757. getAreaList(district) {
  1758. if (district === undefined || district == null || district === '')
  1759. return
  1760. getAreaList({district: district}).then(res => this.areaList = res.data)
  1761. },
  1762. getBuildingList1(areaId) {
  1763. if (areaId === undefined || areaId == null || areaId === '')
  1764. return
  1765. getBuildingList({areaId: areaId}).then(res => this.buildingList = res.data)
  1766. },
  1767. getUnitList1(buildingId) {
  1768. if (buildingId === undefined || buildingId == null || buildingId === '')
  1769. return
  1770. getUnits(buildingId).then(res => this.unitList = res.data)
  1771. },
  1772. getHouseList1(unitId) {
  1773. if (unitId === undefined || unitId == null || unitId === '')
  1774. return
  1775. getHouses(unitId).then(res => this.houseList = res.data)
  1776. },
  1777. /** 查询民用工程列表 */
  1778. getList() {
  1779. this.loading = true;
  1780. listEngineeringCivil(this.queryParams1).then(response => {
  1781. this.engineeringCivilList = response.rows;
  1782. this.total = response.total;
  1783. this.loading = false;
  1784. });
  1785. },
  1786. // 取消按钮
  1787. cancel() {
  1788. this.open = false;
  1789. this.reset();
  1790. },
  1791. // 表单重置
  1792. reset() {
  1793. this.form = {
  1794. id: undefined,
  1795. district: undefined,
  1796. areaId: undefined,
  1797. buildingId: undefined,
  1798. unitId: undefined,
  1799. houseId: undefined,
  1800. enginType: undefined,
  1801. enginClassification: undefined,
  1802. enginCycle: 0,
  1803. completionStatus: undefined,
  1804. version: undefined,
  1805. imgUrl: undefined,
  1806. // remark: undefined,
  1807. delFlag: undefined,
  1808. createBy: undefined,
  1809. createTime: undefined,
  1810. updateBy: undefined,
  1811. updateTime: undefined
  1812. };
  1813. this.queryParams = {
  1814. district: undefined,
  1815. areaId: undefined,
  1816. buildingId: undefined,
  1817. unitId: undefined,
  1818. houseId: undefined,
  1819. enginType: undefined,
  1820. enginClassification: undefined,
  1821. enginCycle: 0,
  1822. completionStatus: undefined,
  1823. imgUrl: undefined,
  1824. // zEngineeringNodeBo: {
  1825. // type: undefined,
  1826. // zEngineeringInfoBo: {
  1827. // constructAddre: undefined, // 施工地址
  1828. // constructPhone: undefined, // 施工人电话
  1829. // constructUser: undefined, // 施工人
  1830. // headName: undefined, // 负责人
  1831. // headPhone: undefined, // 负责人电话
  1832. // constructAccordingDrawings: undefined, // 是否按图纸施工
  1833. // segmentedCompressionQualified: undefined, // 分段打压是否合格
  1834. // selfClosingValveType: undefined, // 自闭阀类型
  1835. // visitType: undefined, // 上门类型
  1836. // backfillTime: undefined, // 回填时间
  1837. // constructTime: undefined, // 施工时间
  1838. // zEngiineeringPhotoBoList: undefined, // 图片列表
  1839. // zEngineeringMaterialBo: undefined,// 用料对象, //节点信息
  1840. // }
  1841. // },
  1842. }
  1843. this.enginClassification = null
  1844. this.resetForm("form");
  1845. },
  1846. /** 搜索按钮操作 */
  1847. handleQuery() {
  1848. this.queryParams1.pageNum = 1;
  1849. this.getList();
  1850. },
  1851. /** 重置按钮操作 */
  1852. resetQuery() {
  1853. this.resetForm("queryForm");
  1854. this.queryParams1 = {
  1855. pageNum: 1,
  1856. pageSize: 10,
  1857. district: undefined,
  1858. areaId: undefined,
  1859. buildingId: undefined,
  1860. unitId: undefined,
  1861. houseId: undefined,
  1862. enginType: undefined,
  1863. enginClassification: undefined,
  1864. enginCycle: 0,
  1865. completionStatus: undefined,
  1866. imgUrl: undefined,
  1867. type: undefined,
  1868. beginTime: [],
  1869. createBy: ''
  1870. }
  1871. this.areaList = []
  1872. this.buildingList = []
  1873. this.unitList = []
  1874. this.currentEnginTypeChangeOptions1 = []
  1875. this.handleQuery();
  1876. },
  1877. // 多选框选中数据
  1878. handleSelectionChange(selection) {
  1879. this.ids = selection.map(item => item.id)
  1880. this.single = selection.length !== 1
  1881. this.multiple = !selection.length
  1882. },
  1883. // 新增顶管工程
  1884. // addNewPipe(data){
  1885. // this.$refs.enginPipe.openDialog({
  1886. // id:data.id
  1887. // },'add')
  1888. // },
  1889. nodeCancel() {
  1890. this.nodeDetailVisible = false
  1891. },
  1892. toNodeDetail() {
  1893. this.$refs.form.validate(valid => {
  1894. if (valid) {
  1895. let nodeCollection = []
  1896. // 收集节点信息
  1897. this.currentCheckList.forEach((e, idx) => {
  1898. let nodeItem = this.$refs['EnginNodeInfo' + idx][0].infoCollection()
  1899. nodeCollection.push(nodeItem)
  1900. setTimeout(() => {
  1901. console.log('nodeCollection:', nodeItem)
  1902. console.log('nodeCollection:', this.$refs['EnginNodeInfo' + idx][0])
  1903. }, 2000)
  1904. })
  1905. this.queryParams.zEngineeringNodeBoList = nodeCollection
  1906. if (this.enginNodeStatus == '修改') {
  1907. putEngineeringCivil(this.queryParams).then(res => {
  1908. if (res.code == 200) {
  1909. this.$message({
  1910. message: '修改成功',
  1911. type: 'success'
  1912. });
  1913. this.open = false
  1914. console.log('选中节点集合', this.currentCheckList)
  1915. this.currentCheckList = []
  1916. this.getList()
  1917. // this.$emit('closeToSucceed')
  1918. }
  1919. })
  1920. } else if (this.enginNodeStatus == '添加用料') {
  1921. addEngineeringCivil(this.queryParams).then(res => {
  1922. if (res.code == 200) {
  1923. this.$message({
  1924. message: '添加成功',
  1925. type: 'success'
  1926. });
  1927. this.open = false
  1928. console.log('选中节点集合', this.currentCheckList)
  1929. this.currentCheckList = []
  1930. this.getList()
  1931. // this.$emit('closeToSucceed')
  1932. }
  1933. })
  1934. } else if (this.enginNodeStatus == '添加用料') {
  1935. addEngineeringCivil(this.queryParams).then(res => {
  1936. if (res.code == 200) {
  1937. this.$message({
  1938. message: '添加成功',
  1939. type: 'success'
  1940. });
  1941. this.open = false
  1942. console.log('选中节点集合', this.currentCheckList)
  1943. this.currentCheckList = []
  1944. this.getList();
  1945. // this.$emit('closeToSucceed')
  1946. }
  1947. })
  1948. } else {
  1949. addEngineeringCivil(this.queryParams).then(res => {
  1950. if (res.code == 200) {
  1951. this.$message({
  1952. message: '新增成功',
  1953. type: 'success'
  1954. });
  1955. this.open = false
  1956. console.log('选中节点集合', this.currentCheckList)
  1957. this.currentCheckList = []
  1958. this.getList();
  1959. // this.$emit('closeToSucceed')
  1960. }
  1961. })
  1962. }
  1963. } else {
  1964. // this.$message.error(`请完善信息!`);
  1965. }
  1966. })
  1967. return
  1968. getDictList({enginType: ['new_built', 'old_renovation']}).then(res => {
  1969. this.nodeList = res.data
  1970. console.log('跳到详情前的queryParams', this.queryParams)
  1971. console.log('跳到详情前的节点集合', this.nodeList)
  1972. if (this.currentType == 'put') {
  1973. this.$refs.childNode.open(this.queryParams, 16, this.nodeList)
  1974. this.currentType = null
  1975. return
  1976. }
  1977. // 加工 enginClassification 工程节点
  1978. // const parts = this.value[1].split('_');
  1979. // let result = parts.slice(2).join('_');
  1980. // console.log(result)
  1981. // this.queryParams.zEngineeringNodeBo.type = this.enginClassification
  1982. // this.queryParams.enginClassification = result
  1983. // console.log(this.queryParams)
  1984. console.log('新增queryparams传值', this.queryParams)
  1985. this.$refs.childNode.open(this.queryParams, 0, this.nodeList)
  1986. return
  1987. this.$refs['form'].validate(e => {
  1988. if (e) {
  1989. this.nodeDetailVisible = true
  1990. }
  1991. })
  1992. })
  1993. },
  1994. /** 新增按钮操作 */
  1995. handleAdd() {
  1996. this.currentCheckingEnginList = []
  1997. this.enginNodeStatus = '新增'
  1998. this.reset();
  1999. this.open = true;
  2000. this.title = "添加民用工程";
  2001. },
  2002. /** 修改按钮操作 */
  2003. handleUpdate(row) {
  2004. let that = this
  2005. this.enginNodeStatus = '修改'
  2006. this.loading = true;
  2007. this.reset();
  2008. const id = row.id || this.ids
  2009. getEngineeringCivil(id).then(res => {
  2010. that.loading = false;
  2011. // let newData = res.data
  2012. // // 手动调用行政区发生改变
  2013. let newData = res.data
  2014. that.districtHasChanged(newData.district)
  2015. that.communityHasChanged(newData.areaId)
  2016. that.buildingHasChanged(newData.buildingId, newData.areaId)
  2017. that.unitHasChanged(newData.unitId)
  2018. that.queryParams = res.data
  2019. let va = that.queryParams.enginClassification
  2020. that.enginTypeHasChanged(that.queryParams.enginType)
  2021. that.queryParams.enginClassification = va
  2022. that.open = true
  2023. that.title = "修改民用工程";
  2024. })
  2025. },
  2026. /** 提交按钮 */
  2027. submitForm() {
  2028. this.$refs["form"].validate(valid => {
  2029. if (valid) {
  2030. this.buttonLoading = true;
  2031. if (this.form.id != null) {
  2032. updateEngineeringCivil(this.form).then(response => {
  2033. this.$modal.msgSuccess("修改成功");
  2034. this.open = false;
  2035. debugger
  2036. this.getList();
  2037. }).finally(() => {
  2038. this.buttonLoading = false;
  2039. });
  2040. } else {
  2041. addEngineeringCivil(this.form).then(response => {
  2042. this.$modal.msgSuccess("新增成功");
  2043. this.open = false;
  2044. this.getList();
  2045. }).finally(() => {
  2046. this.buttonLoading = false;
  2047. });
  2048. }
  2049. }
  2050. });
  2051. },
  2052. /** 删除按钮操作 */
  2053. handleDelete(row) {
  2054. console.log(row)
  2055. const ids = row.id || this.ids;
  2056. this.$modal.confirm('是否确认删除所选数据项?').then(() => {
  2057. this.loading = true;
  2058. return delEngineeringCivil(ids);
  2059. }).then(() => {
  2060. this.loading = false;
  2061. this.getList();
  2062. this.$modal.msgSuccess("删除成功");
  2063. }).catch(() => {
  2064. }).finally(() => {
  2065. this.loading = false;
  2066. });
  2067. },
  2068. /** 导出按钮操作 */
  2069. handleExport() {
  2070. debugger
  2071. if (this.queryParams1.district == undefined || this.queryParams1.district == null || this.queryParams1.district == '') {
  2072. this.$message.warning("请选择行政区")
  2073. return
  2074. }
  2075. if (this.queryParams1.enginType == undefined || this.queryParams1.enginType == null || this.queryParams1.enginType == '') {
  2076. this.$message.warning("请选择工程类型")
  2077. return
  2078. }
  2079. if (this.queryParams1.enginClassification == undefined || this.queryParams1.enginClassification == null || this.queryParams1.enginClassification == '') {
  2080. this.$message.warning("请选择工程分类")
  2081. return
  2082. }
  2083. this.download('zdsz/engineeringCivil/export', {
  2084. ...this.queryParams1
  2085. }, `民用工程-${new Date().getTime()}.xlsx`)
  2086. }
  2087. }
  2088. }
  2089. ;
  2090. </script>
  2091. <style lang="scss" scoped>
  2092. ::v-deep .addDialog {
  2093. width: 60%;
  2094. // height: 85%;
  2095. max-height: 85%;
  2096. overflow: hidden;
  2097. overflow-y: scroll;
  2098. }
  2099. ::v-deep .appendElDialog {
  2100. overflow: hidden;
  2101. overflow-y: scroll;
  2102. width: 70%;
  2103. height: 80%;
  2104. .el-dialog__body {
  2105. height: 85%;
  2106. }
  2107. .el-form-item {
  2108. margin-bottom: 22px;
  2109. width: 44%;
  2110. display: inline-block;
  2111. }
  2112. .el-form-item:nth-child(2n+2) {
  2113. margin-left: 5%;
  2114. }
  2115. .el-form-item:not(:nth-child(1):nth-child(2)) {
  2116. margin-top: 0.5%;
  2117. }
  2118. .remark_input {
  2119. .el-textarea__inner {
  2120. width: 238%;
  2121. height: 190px;
  2122. }
  2123. }
  2124. }
  2125. ::v-deep .appendElNodeDialog {
  2126. // width: 70%;
  2127. height: 80%;
  2128. .el-dialog__body {
  2129. height: 85%;
  2130. }
  2131. .el-form-item {
  2132. margin-bottom: 22px;
  2133. width: 44%;
  2134. display: inline-block;
  2135. }
  2136. .el-form-item:nth-child(2n+2) {
  2137. margin-left: 5%;
  2138. }
  2139. .el-form-item:not(:nth-child(1):nth-child(2)) {
  2140. margin-top: 0.5%;
  2141. }
  2142. }
  2143. ::v-deep .checkingAll {
  2144. .el-dialog {
  2145. width: 40%;
  2146. height: 70%;
  2147. }
  2148. .el-dialog__body {
  2149. padding-left: 28%;
  2150. }
  2151. .el-form div:not(:nth-child(1)) {
  2152. margin-top: 1%;
  2153. }
  2154. .el-textarea__inner {
  2155. width: 360px;
  2156. height: 115px;
  2157. }
  2158. }
  2159. .my-autocomplete {
  2160. li {
  2161. line-height: normal;
  2162. padding: 7px;
  2163. .name {
  2164. text-overflow: ellipsis;
  2165. overflow: hidden;
  2166. }
  2167. .addr {
  2168. font-size: 12px;
  2169. color: #b4b4b4;
  2170. }
  2171. .highlighted .addr {
  2172. color: #ddd;
  2173. }
  2174. }
  2175. }
  2176. </style>