index.vue 86 KB

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