index.vue 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469
  1. <!--
  2. *@description: 工业工程
  3. *@author: yh Fu
  4. *@date: 2024-01-02 15:51:03
  5. *@version: V1.0.5
  6. -->
  7. <template>
  8. <div class="app-container">
  9. <el-form :model="searchParams" ref="searchParams" size="small" :inline="true" v-show="showSearch"
  10. label-width="110px">
  11. <el-form-item label="行政区" prop="district">
  12. <el-select v-model="searchParams.district" placeholder="请选择行政区" clearable
  13. @change="searchParams.areaId = undefined;areaList=[];
  14. searchParams.buildingId = undefined;buildingList=[];
  15. searchParams.unitId = undefined;unitList=[];
  16. searchParams.houseId = undefined;houseList=[];
  17. getAreaList(searchParams.district)">
  18. <el-option
  19. v-for="dict in dict.type.district"
  20. :key="dict.value"
  21. :label="dict.label"
  22. :value="dict.value"
  23. />
  24. </el-select>
  25. </el-form-item>
  26. <el-form-item label="小区名称" prop="areaId">
  27. <el-select v-model="searchParams.areaId" filterable clearable placeholder="请选择小区"
  28. @change="searchParams.buildingId = undefined;buildingList=[];
  29. searchParams.unitId = undefined;unitList=[];
  30. searchParams.houseId = undefined;houseList=[];
  31. getBuildingList1(searchParams.areaId)">
  32. <el-option
  33. v-for="item in areaList"
  34. :key="item.id"
  35. :label="item.name"
  36. :value="item.id">
  37. </el-option>
  38. </el-select>
  39. </el-form-item>
  40. <el-form-item label="楼宇名称" prop="buildingId">
  41. <el-select v-model="searchParams.buildingId" filterable clearable placeholder="请选择楼宇"
  42. @change="searchParams.unitId = undefined;unitList=[];
  43. searchParams.houseId = undefined;houseList=[];
  44. getUnitList1(searchParams.buildingId)">
  45. <el-option
  46. v-for="item in buildingList"
  47. :key="item.id"
  48. :label="item.name"
  49. :value="item.id">
  50. </el-option>
  51. </el-select>
  52. </el-form-item>
  53. <el-form-item label="单元" prop="unitId">
  54. <el-select v-model="searchParams.unitId" placeholder="请选择单元" filterable clearable
  55. @change="searchParams.houseId = undefined;houseList=[];getHouseList1(searchParams.unitId)"
  56. >
  57. <el-option
  58. v-for="obj in unitList"
  59. :key="obj.id"
  60. :label="obj.name"
  61. :value="obj.id"
  62. ></el-option>
  63. </el-select>
  64. </el-form-item>
  65. <el-form-item label="房间" prop="houseId">
  66. <el-select v-model="searchParams.houseId" placeholder="请选择房间" filterable clearable>
  67. <el-option
  68. v-for="obj in houseList"
  69. :key="obj.id"
  70. :label="obj.name"
  71. :value="obj.id"
  72. ></el-option>
  73. </el-select>
  74. </el-form-item>
  75. <el-form-item>
  76. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  77. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
  78. </el-form-item>
  79. </el-form>
  80. <el-row :gutter="10" class="mb8">
  81. <el-col :span="1.5">
  82. <el-button
  83. type="primary"
  84. plain
  85. icon="el-icon-plus"
  86. size="mini"
  87. @click="handleAdd"
  88. v-hasPermi="['zdsz:engineeringGasOpening:add']"
  89. >新增
  90. </el-button>
  91. </el-col>
  92. <el-col :span="1.5">
  93. <el-button
  94. type="success"
  95. plain
  96. icon="el-icon-edit"
  97. size="mini"
  98. :disabled="single"
  99. @click="handleUpdate"
  100. v-hasPermi="['zdsz:engineeringGasOpening:edit']"
  101. >修改
  102. </el-button>
  103. </el-col>
  104. <el-col :span="1.5">
  105. <el-button
  106. type="danger"
  107. plain
  108. icon="el-icon-delete"
  109. size="mini"
  110. :disabled="multiple"
  111. @click="handleDelete"
  112. v-hasPermi="['zdsz:engineeringGasOpening:remove']"
  113. >删除
  114. </el-button>
  115. </el-col>
  116. <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
  117. </el-row>
  118. <el-table v-loading="loading" :data="comprehensiveList" @selection-change="handleSelectionChange">
  119. <el-table-column type="selection" width="55" align="center"/>
  120. <!-- <el-table-column label="工程名称" align="center" prop="enginName"/>-->
  121. <el-table-column label="行政区" align="center" prop="district">
  122. <template slot-scope="scope">
  123. <dict-tag :options="dict.type.district" :value="scope.row.district"/>
  124. </template>
  125. </el-table-column>
  126. <el-table-column label="小区名称" align="center" prop="areaName"/>
  127. <el-table-column label="楼宇名称" align="center" prop="buildingName"/>
  128. <el-table-column label="单元名称" align="center" prop="unitName"/>
  129. <el-table-column label="房间名称" align="center" prop="houseName"/>
  130. <!-- <el-table-column label="燃气表号" align="center" prop="gasMeterNumber"/>-->
  131. <el-table-column label="审核是否合格" align="center" prop="isQualified" >
  132. <template slot-scope="scope">
  133. <el-tag slot="reference" v-for="item in stateArray" v-if="item.value==scope.row.state">{{item.label}}</el-tag>
  134. </template>
  135. </el-table-column>
  136. <!--<el-table-column label="工程分类" align="center" prop="enginClassification"/>-->
  137. <!--<el-table-column label="现场负责人" align="center" prop="sceneHead"/>-->
  138. <!--<el-table-column label="设计负责人" align="center" prop="designHead"/>-->
  139. <!--<el-table-column label="监理负责人" align="center" prop="supervisionHead"/>-->
  140. <!--<el-table-column label="监理单位" align="center" prop="supervisionUnit"/>-->
  141. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  142. <template v-slot="scope">
  143. <el-button
  144. size="mini"
  145. type="text"
  146. icon="el-icon-view"
  147. @click="handleview(scope.row)"
  148. v-hasPermi="['zdsz:engineeringGasOpening:query']"
  149. >查看
  150. </el-button>
  151. <el-button
  152. size="mini"
  153. type="text"
  154. icon="el-icon-view"
  155. @click="handleUpdate(scope.row)"
  156. v-if="scope.row.state != '1'"
  157. v-hasPermi="['zdsz:engineeringGasOpening:update']"
  158. >审核
  159. </el-button>
  160. <el-button
  161. size="mini"
  162. type="text"
  163. icon="el-icon-delete"
  164. @click="handleDelete(scope.row)"
  165. v-hasPermi="['zdsz:engineeringGasOpening:remove']"
  166. >删除
  167. </el-button>
  168. </template>
  169. </el-table-column>
  170. </el-table>
  171. <pagination
  172. v-show="total>0"
  173. :total="total"
  174. :page.sync="searchParams.pageNum"
  175. :limit.sync="searchParams.pageSize"
  176. @pagination="getList"
  177. />
  178. <!-- 添加或修改开栓工程对话框 -->
  179. <el-dialog :title="title" :visible.sync="open" append-to-body customClass="appendElDialog">
  180. <el-form ref="form" :model="form" :rules="rules" label-width="110px" style="height: 100%;overflow: hidden;overflow-y: auto;">
  181. <el-row>
  182. <el-col :span="12">
  183. <h1>基础信息</h1>
  184. </el-col>
  185. <el-col :span="12" v-if="buttonShow">
  186. <el-form-item label-width="180px" label="审核是否合格" >
  187. <el-radio-group v-model="form.state" style="width: 220px">
  188. <el-radio
  189. v-for="dict in stateArray"
  190. :key="dict.value"
  191. :label="dict.value"
  192. v-if="dict.value != '2'"
  193. >{{dict.label}}</el-radio>
  194. </el-radio-group>
  195. </el-form-item>
  196. </el-col>
  197. </el-row>
  198. <el-row>
  199. <el-col :span="4">
  200. <el-form-item label="行政区" prop="district">
  201. <el-select
  202. :disabled="title != '新增开栓施工' "
  203. v-model="form.district"
  204. placeholder="请选择行政区"
  205. filterable
  206. @change="districtHasChanged"
  207. style="width: 150px"
  208. >
  209. <el-option
  210. v-for="e in dict.type.district"
  211. :key="e.value"
  212. :label="e.label"
  213. :value="e.value"
  214. ></el-option>
  215. </el-select>
  216. </el-form-item>
  217. </el-col>
  218. <el-col :span="4">
  219. <el-form-item label="小区" prop="areaId">
  220. <el-select
  221. :disabled="title != '新增开栓施工' "
  222. v-model="form.areaId"
  223. filterable
  224. placeholder="请选择小区"
  225. @change="communityHasChanged"
  226. style="width: 150px"
  227. >
  228. <el-option
  229. v-for="e in communityOptions"
  230. :key="e.id"
  231. :label="e.name"
  232. :value="e.id"
  233. ></el-option>
  234. </el-select>
  235. </el-form-item>
  236. </el-col>
  237. <el-col :span="4">
  238. <el-form-item label="楼栋" prop="buildingId">
  239. <el-select
  240. :disabled="title != '新增开栓施工' "
  241. filterable
  242. v-model="form.buildingId"
  243. placeholder="请选择楼栋"
  244. @change="buildingHasChanged"
  245. style="width: 150px"
  246. >
  247. <el-option
  248. v-for="e in buildingOptions"
  249. :key="e.id"
  250. :label="e.name"
  251. :value="e.id"
  252. ></el-option>
  253. </el-select>
  254. </el-form-item>
  255. </el-col>
  256. <el-col :span="4">
  257. <el-form-item label="单元" prop="unitId">
  258. <el-select
  259. :disabled="title != '新增开栓施工' "
  260. v-model="form.unitId"
  261. filterable
  262. placeholder="请选择单元"
  263. @change="unitHasChanged"
  264. style="width: 150px"
  265. >
  266. <el-option
  267. v-for="e in unitOptions"
  268. :key="e.id"
  269. :label="e.name"
  270. :value="e.id"
  271. ></el-option>
  272. </el-select>
  273. </el-form-item>
  274. </el-col>
  275. <el-col :span="4">
  276. <el-form-item label="房间" prop="houseId">
  277. <el-select
  278. :disabled="title != '新增开栓施工' "
  279. v-model="form.houseId"
  280. filterable
  281. placeholder="请选择房间"
  282. style="width: 150px"
  283. >
  284. <el-option
  285. v-for="e in houseOptions"
  286. :key="e.id"
  287. :label="e.name"
  288. :value="e.id"
  289. ></el-option>
  290. </el-select>
  291. </el-form-item>
  292. </el-col>
  293. </el-row>
  294. <el-row>
  295. <el-col :span="12">
  296. <h1>燃气立杠</h1>
  297. </el-col>
  298. </el-row>
  299. <el-row>
  300. <el-col :span="24">
  301. <el-form-item label-width="180px" label="立杠是否刷涂防腐漆" prop="isAntiCorrosionPaint">
  302. <el-radio-group v-model="form.isAntiCorrosionPaint">
  303. <el-radio
  304. v-for="dict in dict.type.sys_yes_no"
  305. :key="dict.value"
  306. :label="dict.value"
  307. >{{dict.label}}</el-radio>
  308. </el-radio-group>
  309. </el-form-item>
  310. </el-col>
  311. </el-row>
  312. <el-row>
  313. <el-col :span="24">
  314. <el-form-item label-width="180px" label="是否有立杠卡子" prop="isVerticalBarClamp" style="width: 100%">
  315. <el-radio-group v-model="form.isVerticalBarClamp">
  316. <el-radio
  317. v-for="dict in dict.type.sys_yes_no"
  318. :key="dict.value"
  319. :label="dict.value"
  320. >{{dict.label}}</el-radio>
  321. </el-radio-group>
  322. </el-form-item>
  323. </el-col>
  324. </el-row>
  325. <el-row :gutter="20">
  326. <el-col :span="24">
  327. <el-form-item label-width="180px" label="照片" style="width: 100%">
  328. <ObsImageUpload
  329. :class=" status == 'read-only' ? 'obsImageUploads' : '' "
  330. ref="obsImageUpload"
  331. :limit="11"
  332. :fileType="['png', 'jpg', 'jpeg']"
  333. @input="getgasCylinderPic(arguments)"
  334. :value="form.gasCylinderPic"
  335. :disabled="status == 'read-only' "
  336. ></ObsImageUpload>
  337. </el-form-item>
  338. <!--<el-form-item label-width="180px" label="照片" style="width: 100%">-->
  339. <!--<ObsFileUpload ref="obsFileUpload" :file-size="100"-->
  340. <!--:file-type="['png', 'jpg', 'jpeg','mp4']"-->
  341. <!--:limit="9999"-->
  342. <!--:value="form.gasCylinderPic"-->
  343. <!--@input="filesUpload"-->
  344. <!--&gt;</ObsFileUpload>-->
  345. <!--</el-form-item>-->
  346. </el-col>
  347. </el-row>
  348. <el-row>
  349. <el-col :span="12">
  350. <h1>气密测试</h1>
  351. </el-col>
  352. </el-row>
  353. <el-form-item label="气密测试" prop="verticalBarTest">
  354. <el-checkbox-group v-model="form.verticalBarTest">
  355. <el-checkbox
  356. v-for="dict in dict.type.vertical_bar"
  357. :key="dict.value"
  358. :label="dict.label"
  359. ></el-checkbox>
  360. </el-checkbox-group>
  361. </el-form-item>
  362. <el-row :gutter="20">
  363. <el-col :span="24">
  364. <el-form-item label="照片" style="width: 100%">
  365. <ObsImageUpload
  366. :class=" status == 'read-only' ? 'obsImageUploads' : '' "
  367. ref="obsImageUpload"
  368. :limit="11"
  369. :fileType="['png', 'jpg', 'jpeg']"
  370. @input="getpressureTestPic(arguments)"
  371. :value="form.pressureTestPic"
  372. :disabled="status == 'read-only' "
  373. ></ObsImageUpload>
  374. </el-form-item>
  375. </el-col>
  376. </el-row>
  377. <el-row>
  378. <el-col :span="12">
  379. <h1>燃气表</h1>
  380. </el-col>
  381. </el-row>
  382. <el-form-item label="表号" prop="gasMeterNumber">
  383. <el-input v-model="form.gasMeterNumber" placeholder="请填写表号" maxlength="60"></el-input>
  384. </el-form-item>
  385. <el-form-item label="表字" prop="gasMeterCount">
  386. <el-input v-model="form.gasMeterCount" placeholder="请填写表字" maxlength="60"></el-input>
  387. </el-form-item>
  388. <el-form-item label="品牌" prop="gasMeterBrand">
  389. <el-radio-group v-model="form.gasMeterBrand">
  390. <el-radio
  391. v-for="dict in dict.type.gas_meter_brand"
  392. :key="dict.value"
  393. :label="dict.value"
  394. >{{dict.label}}</el-radio>
  395. </el-radio-group>
  396. </el-form-item>
  397. <el-form-item label="型号" prop="gasMeterType">
  398. <el-radio-group v-model="form.gasMeterType">
  399. <el-radio
  400. v-for="dict in dict.type.gas_meter_type"
  401. :key="dict.value"
  402. :label="dict.value"
  403. >{{dict.label}}</el-radio>
  404. </el-radio-group>
  405. </el-form-item>
  406. <el-form-item label="进气方向" prop="gasMeterDirection">
  407. <el-radio-group v-model="form.gasMeterDirection">
  408. <el-radio
  409. v-for="dict in dict.type.gas_meter_direction"
  410. :key="dict.value"
  411. :label="dict.value"
  412. >{{dict.label}}</el-radio>
  413. </el-radio-group>
  414. </el-form-item>
  415. <el-row :gutter="20">
  416. <el-col :span="24">
  417. <el-form-item label="照片" style="width: 100%">
  418. <ObsImageUpload
  419. :class=" status == 'read-only' ? 'obsImageUploads' : '' "
  420. ref="obsImageUpload"
  421. :limit="11"
  422. :fileType="['png', 'jpg', 'jpeg']"
  423. @input="getgasMeterPic(arguments)"
  424. :value="form.gasMeterPic"
  425. :disabled="status == 'read-only' "
  426. ></ObsImageUpload>
  427. </el-form-item>
  428. </el-col>
  429. </el-row>
  430. <el-row>
  431. <el-col :span="12">
  432. <h1>表后管</h1>
  433. </el-col>
  434. </el-row>
  435. <el-form-item label="管表后管卡子" prop="isRearPipeClamp">
  436. <el-radio-group v-model="form.isRearPipeClamp">
  437. <el-radio
  438. v-for="dict in dict.type.sys_yes_no"
  439. :key="dict.value"
  440. :label="dict.value"
  441. >{{dict.label}}</el-radio>
  442. </el-radio-group>
  443. </el-form-item>
  444. <el-row :gutter="20">
  445. <el-col :span="24">
  446. <el-form-item label="照片" style="width: 100%">
  447. <ObsImageUpload
  448. :class=" status == 'read-only' ? 'obsImageUploads' : '' "
  449. ref="obsImageUpload"
  450. :limit="11"
  451. :fileType="['png', 'jpg', 'jpeg']"
  452. @input="getrearPipePic(arguments)"
  453. :value="form.rearPipePic"
  454. :disabled="status == 'read-only' "
  455. ></ObsImageUpload>
  456. </el-form-item>
  457. </el-col>
  458. </el-row>
  459. <el-row>
  460. <el-col :span="12">
  461. <h1>灶前阀门</h1>
  462. </el-col>
  463. </el-row>
  464. <el-row>
  465. <el-col :span="24">
  466. <el-form-item label="是否阀管改造" prop="gasChangeType">
  467. <el-radio-group v-model="form.isGasChangeType">
  468. <el-radio
  469. v-for="dict in dict.type.sys_yes_no"
  470. :key="dict.value"
  471. :label="dict.value"
  472. >{{dict.label}}</el-radio>
  473. </el-radio-group>
  474. </el-form-item>
  475. </el-col>
  476. </el-row>
  477. <el-row v-if="form.isGasChangeType == 'Y'">
  478. <el-col :span="24">
  479. <el-form-item label="阀管改造类型" prop="gasChangeType">
  480. <el-radio-group v-model="form.gasChangeType">
  481. <el-radio
  482. v-for="dict in dict.type.gas_change_type"
  483. :key="dict.value"
  484. :label="dict.value"
  485. >{{dict.label}}</el-radio>
  486. </el-radio-group>
  487. </el-form-item>
  488. </el-col>
  489. </el-row>
  490. <el-row :gutter="20">
  491. <el-col :span="24">
  492. <el-form-item label="照片" style="width: 100%">
  493. <ObsImageUpload
  494. :class=" status == 'read-only' ? 'obsImageUploads' : '' "
  495. ref="obsImageUpload"
  496. :limit="11"
  497. :fileType="['png', 'jpg', 'jpeg']"
  498. @input="getgasChangePic(arguments)"
  499. :value="form.gasChangePic"
  500. :disabled="status == 'read-only' "
  501. ></ObsImageUpload>
  502. </el-form-item>
  503. </el-col>
  504. </el-row>
  505. <el-row>
  506. <el-col :span="12">
  507. <h1>软管</h1>
  508. </el-col>
  509. </el-row>
  510. <el-row :gutter="20">
  511. <el-col :span="24">
  512. <el-form-item label="照片" style="width: 100%">
  513. <ObsImageUpload
  514. :class=" status == 'read-only' ? 'obsImageUploads' : '' "
  515. ref="obsImageUpload"
  516. :limit="11"
  517. :fileType="['png', 'jpg', 'jpeg']"
  518. @input="getsoftPipePic(arguments)"
  519. :value="form.softPipePic"
  520. :disabled="status == 'read-only' "
  521. ></ObsImageUpload>
  522. </el-form-item>
  523. </el-col>
  524. </el-row>
  525. <el-row>
  526. <el-col :span="12">
  527. <h1>灶具</h1>
  528. </el-col>
  529. </el-row>
  530. <el-form-item label="是否使用防风圈" prop="isWindproofCircle">
  531. <el-radio-group v-model="form.isWindproofCircle">
  532. <el-radio
  533. v-for="dict in dict.type.sys_yes_no"
  534. :key="dict.value"
  535. :label="dict.value"
  536. >{{dict.label}}</el-radio>
  537. </el-radio-group>
  538. </el-form-item>
  539. <el-row :gutter="20">
  540. <el-col :span="24">
  541. <el-form-item label="照片" style="width: 100%">
  542. <ObsImageUpload
  543. :class=" status == 'read-only' ? 'obsImageUploads' : '' "
  544. ref="obsImageUpload"
  545. :limit="11"
  546. :fileType="['png', 'jpg', 'jpeg']"
  547. @input="getwindproofCirclePic(arguments)"
  548. :value="form.windproofCirclePic"
  549. :disabled="status == 'read-only' "
  550. ></ObsImageUpload>
  551. </el-form-item>
  552. </el-col>
  553. </el-row>
  554. <el-row>
  555. <el-col :span="12">
  556. <h1>用气环境 </h1>
  557. </el-col>
  558. </el-row>
  559. <el-row :gutter="20">
  560. <el-col :span="24">
  561. <el-form-item label="照片" style="width: 100%">
  562. <ObsImageUpload
  563. :class=" status == 'read-only' ? 'obsImageUploads' : '' "
  564. ref="obsImageUpload"
  565. :limit="11"
  566. :fileType="['png', 'jpg', 'jpeg']"
  567. @input="getgasEnvironmentPic(arguments)"
  568. :value="form.gasEnvironmentPic"
  569. :disabled="status == 'read-only' "
  570. ></ObsImageUpload>
  571. </el-form-item>
  572. </el-col>
  573. </el-row>
  574. <el-row>
  575. <el-col :span="12">
  576. <h1>回执单</h1>
  577. </el-col>
  578. </el-row>
  579. <el-row :gutter="20">
  580. <el-col :span="24">
  581. <el-form-item label="照片" style="width: 100%">
  582. <ObsImageUpload
  583. :class=" status == 'read-only' ? 'obsImageUploads' : '' "
  584. ref="obsImageUpload"
  585. :limit="11"
  586. :fileType="['png', 'jpg', 'jpeg']"
  587. @input="getreceiptFormPic(arguments)"
  588. :value="form.receiptFormPic"
  589. :disabled="status == 'read-only' "
  590. ></ObsImageUpload>
  591. </el-form-item>
  592. </el-col>
  593. </el-row>
  594. </el-form>
  595. <div style="width: 25%; float: right;margin-top:2%" >
  596. <el-button :loading="buttonLoading" type="primary" @click="submitForm" v-if="!buttonLoading">提交</el-button>
  597. <el-button @click="cancel">取 消</el-button>
  598. </div>
  599. </el-dialog>
  600. </div>
  601. </template>
  602. <script>
  603. import {
  604. getEngineeGasOpeningList,
  605. addEngineeEngineeGasOpening,
  606. UpdateEngineeGasOpening,
  607. DelEngineeGasOpening,
  608. EditEngineeGasOpening,
  609. putEngineeGasOpening,
  610. QueryEngineeGasOpening,
  611. } from '@/api/zdsz/engineeringGasOpening'
  612. import {
  613. addEnginee, // 新增工程
  614. getHousesList, // 获取当前房间集合
  615. putEngineeringCivil, // 民用工程修改
  616. viewEngineeringCivil, // 民用工程查看详情
  617. deleteEngineeringCivil, // 删除民用工程
  618. getDictList,
  619. viewEngineeringInfrastructureSource,
  620. viewEngineeringCivilSource,
  621. engineeringCivilAllReview,
  622. CivilReview, batchNode
  623. } from "@/api/zdsz/enginee"
  624. import {getAreaList} from "@/api/zdsz/area";
  625. import {getBuildingList} from "@/api/zdsz/building";
  626. import {getUnits} from "@/api/zdsz/unit";
  627. import {getHouses} from "@/api/zdsz/house";
  628. import {getDicts} from "@/api/system/dict/data";
  629. import {validPhoneMobile} from '@/api/rules'
  630. import {getEnginMaterialQualityList} from '@/api/zdsz/enginee'
  631. import {getEnginSpecificationsList} from '@/api/zdsz/enginSpecifications'
  632. export default {
  633. name: "openrepair",
  634. dicts: ['sys_yes_no', 'is_repair', 'industry_engin_type', 'self_closing_valve_type', 'visit_type', 'engin_classification',
  635. 'engineering_infrastructure', 'air_wall_node', 'gas_meter_direction', 'gas_change_type', 'district','vertical_bar',
  636. 'gas_meter_brand','gas_meter_type'],
  637. data() {
  638. // 自定义校验
  639. const validatePicPass = (rule, value, callback) => {
  640. return new Promise((resolve, reject) => {
  641. // 至少有一个图片、一个创建时间
  642. if (this.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList.length !== 0
  643. && (this.zEngineeringNodeBo.zEngineeringInfoBo.constructTime !== null || undefined)) {
  644. resolve(true)
  645. } else {
  646. reject(new Error('no pass'))
  647. }
  648. })
  649. }
  650. return {
  651. stateArray:[
  652. {label:'未审核',value:'2'},
  653. {label:'审核通过',value:'1'},
  654. {label:'审核不通过',value:'0'},
  655. ],
  656. communityOptions: [], // 小区集合
  657. buildingOptions: [], // 楼栋集合
  658. unitOptions: [], // 单元集合
  659. houseOptions: [], // 房间集合
  660. // 按钮loading
  661. buttonLoading: false,
  662. buttonShow: false,
  663. // 遮罩层
  664. loading: true,
  665. // 选中数组
  666. ids: [],
  667. status: null,
  668. // 非单个禁用
  669. single: true,
  670. // 非多个禁用
  671. multiple: true,
  672. // 显示搜索条件
  673. showSearch: true,
  674. // 工程类型
  675. enginType: true,
  676. // 工程分类显示
  677. engineeType: true,
  678. // 总条数
  679. total: 0,
  680. currentNode: [],
  681. currentCollapses: [],
  682. // 开栓施工表格数据
  683. comprehensiveList: [],
  684. // 弹出层标题
  685. title: "",
  686. gc: true,
  687. nodeList: [],
  688. // 是否显示弹出层
  689. open: false,
  690. // 查询参数
  691. queryParams: {
  692. enginType: null,
  693. enginName: '', // 工程名称
  694. enginClassification: '', // 工程分类
  695. },
  696. nodeDetailVisible: false, // 施工信息dialog
  697. MaterVisible: false, // 用料信息dialog
  698. // 表单参数
  699. form: {
  700. verticalBarTest:[],
  701. isQualified:'',
  702. gasCylinderPic: [], // 燃气立杠图片
  703. pressureTestPic: [], // 气密测试图片
  704. gasMeterPic: [], // 燃气表图片
  705. rearPipePic: [], // 表后管图片
  706. gasChangePic: [], // 灶前阀门图片
  707. softPipePic: [], // 软管图片
  708. windproofCirclePic: [], // 灶具阀门图片
  709. gasEnvironmentPic: [], // 用气环境图片
  710. receiptFormPic: [], // 回执单图片
  711. files: [], // 附件
  712. pics: [], // 附件返回
  713. type: '', // 用来区分工业工程、市政工程
  714. enginName: '', // 工程名称
  715. enginType: '', // 工程类型
  716. constructUnit: '', // 建筑单位
  717. projectHead: '', // 项目负责人
  718. sceneHead: '', // 现场负责人
  719. designUnit: '', // 设计单位
  720. designHead: '', // 设计负责人
  721. designPhone: '', // 设计联系电话
  722. supervisionUnit: '', // 监理单位
  723. supervisionHead: '', // 监理负责人
  724. supervisionPhone: '', // 监理联系电话
  725. enginClassification: [], // 工程分类
  726. zEngineeringNodeBo: { // 工程节点
  727. type: '', // 节点类型
  728. zEngineeringInfoBo: { // 施工信息
  729. constructUser: '', // 施工人
  730. constructTime: '', // 施工时间
  731. zEngiineeringPhotoBoList: [], // 图片列表
  732. zEngineeringMaterialBo: [ // 用料对象
  733. {
  734. materialQuality: '', // 用料材质
  735. specifications: '', // 用料规格
  736. number: '' // 用料数量
  737. },
  738. ],
  739. },
  740. },
  741. },
  742. zEngineeringMaterialBo: [ // 用料对象
  743. {
  744. materialQuality: '', // 用料材质
  745. specifications: '', // 用料规格
  746. number: '' // 用料数量
  747. },
  748. ],
  749. zEngineeringNodeBo: { // 工程节点
  750. type: '', // 节点类型
  751. zEngineeringInfoBo: { // 施工信息
  752. constructUser: '', // 施工人
  753. constructTime: '', // 施工时间
  754. zEngiineeringPhotoBoList: [], // 图片列表
  755. }
  756. },
  757. EngineepipeType: [], // 工程类型
  758. materialQualityList: [], // 用料材质List
  759. specificationsList: [], // 用料规格List
  760. // 表单校验
  761. rules: {
  762. enginName: [
  763. {required: true, message: "工程名称不能为空", trigger: 'blur'}
  764. ],
  765. isAntiCorrosionPaint: [
  766. {required: true, message: "立杠是否刷涂防腐漆不能为空", trigger: 'blur'}
  767. ],
  768. isVerticalBarClamp: [
  769. {required: true, message: "是否有立杠卡子不能为空", trigger: 'blur'}
  770. ],
  771. gasCylinderPic: [
  772. {required: true, message: "请上传燃气立杠照片", trigger: "blur"}
  773. ],
  774. // pressureTestPic: [
  775. // {required: true, message: "请上传气密测试照片", trigger: "blur"}
  776. // ],
  777. // gasMeterPic: [
  778. // {required: true, message: "请上传燃气表照片", trigger: "blur"}
  779. // ],
  780. // rearPipePic: [
  781. // {required: true, message: "请上传表后管照片", trigger: "blur"}
  782. // ],
  783. // gasChangePic: [
  784. // {required: true, message: "请上传灶前阀门照片", trigger: "blur"}
  785. // ],
  786. // softPipePic: [
  787. // {required: true, message: "请上传软管照片", trigger: "blur"}
  788. // ],
  789. // windproofCirclePic: [
  790. // {required: true, message: "请上传灶具阀门照片", trigger: "blur"}
  791. // ],
  792. // gasEnvironmentPic: [
  793. // {required: true, message: "请上传用气环境照片", trigger: "blur"}
  794. // ],
  795. // receiptFormPic: [
  796. // {required: true, message: "请上传回执单照片", trigger: "blur"}
  797. // ],
  798. },
  799. // 节点规则校验
  800. nodeRules: {
  801. constructTime: [
  802. {required: true, message: "施工时间不能为空", trigger: ['change', 'blur']}
  803. ],
  804. zEngiineeringPhotoBoList: [
  805. {required: true, message: "图片不能为空", trigger: ['change', 'blur'], validator: validatePicPass}
  806. ],
  807. },
  808. searchParams: {
  809. pageSize: 10,
  810. pageNum: 1,
  811. district: undefined,
  812. areaId: undefined,
  813. buildingId: undefined,
  814. unitId: undefined,
  815. houseId: undefined,
  816. },
  817. areaList: [],
  818. buildingList: [],
  819. unitList: [],
  820. houseList: [],
  821. currentType: null, // 附件组件类型 put修改 add新增
  822. };
  823. },
  824. created() {
  825. // 根据url获取type节点类型
  826. this.getType();
  827. if (this.form.type === '2') {
  828. this.engineeType = false
  829. }
  830. this.getList();
  831. },
  832. mounted() {
  833. // 获取材质
  834. // getEnginMaterialQualityList({enginType: this.$route.query.type == '1' ? '工业工程' : '市政工程'}).then(res => {
  835. getEnginMaterialQualityList({enginType: '开栓施工'}).then(res => {
  836. this.materialQualityList = res.data
  837. });
  838. },
  839. methods: {
  840. // 当前所选行政区发生改变 查询当前小区集合
  841. districtHasChanged(district) {
  842. this.form.areaId = null
  843. this.form.buildingId = null
  844. this.form.unitId = null
  845. this.communityOptions = [];
  846. this.buildingOptions = [];
  847. this.unitOptions = [];
  848. this.houseOptions = [];
  849. getAreaList({district}).then(res => {
  850. this.communityOptions = res.data
  851. })
  852. },
  853. // 当前所选小区发生改变 查询当前楼栋集合
  854. communityHasChanged(areaId) {
  855. this.form.buildingId = null
  856. this.form.unitId = null
  857. this.buildingOptions = [];
  858. this.unitOptions = [];
  859. this.houseOptions = [];
  860. getBuildingList({areaId}).then(res => {
  861. this.buildingOptions = res.data
  862. })
  863. },
  864. buildingHasChanged(buildingId, areaId) {
  865. this.unitOptions = [];
  866. this.houseOptions = [];
  867. this.form.unitId = null
  868. getUnits(buildingId).then(res => {
  869. this.unitOptions = res.data
  870. })
  871. },
  872. unitHasChanged(unitId) {
  873. this.houseOptions = [];
  874. getHousesList({unitId}).then(res => {
  875. console.log(res)
  876. this.houseOptions = res.data
  877. })
  878. },
  879. getAreaList(district) {
  880. if (district === undefined || district == null || district === '')
  881. return
  882. getAreaList({district: district}).then(res => this.areaList = res.data)
  883. },
  884. getBuildingList1(areaId) {
  885. if (areaId === undefined || areaId == null || areaId === '')
  886. return
  887. getBuildingList({areaId: areaId}).then(res => this.buildingList = res.data)
  888. },
  889. getUnitList1(buildingId) {
  890. if (buildingId === undefined || buildingId == null || buildingId === '')
  891. return
  892. getUnits(buildingId).then(res => this.unitList = res.data)
  893. },
  894. getHouseList1(unitId) {
  895. if (unitId === undefined || unitId == null || unitId === '')
  896. return
  897. getHouses(unitId).then(res => this.houseList = res.data)
  898. },
  899. formatFormPic(picList){
  900. let list = []
  901. for (let i = 0; i < picList.length; i++) {
  902. list.push({
  903. picUrl:picList[i].url,
  904. fileName:picList[i].name
  905. })
  906. }
  907. return list
  908. // [{
  909. // picUrl:url,
  910. // fileName:name
  911. // }]
  912. },
  913. getgasCylinderPic(_,idx){
  914. // console.log('____===',_)
  915. this.form.gasCylinderPic = [...arguments][0][0].map(e=>e.url) || [];
  916. // this.form.gasCylinderPic = this.formatFormPic(_)
  917. },
  918. getpressureTestPic(_,idx){
  919. this.form.pressureTestPic = [...arguments][0][0].map(e=>e.url) || [];
  920. // this.form.pressureTestPic = this.formatFormPic(_)
  921. },
  922. getgasMeterPic(_,idx){
  923. this.form.gasMeterPic = [...arguments][0][0].map(e=>e.url) || [];
  924. },
  925. getrearPipePic(_,idx){
  926. this.form.rearPipePic = [...arguments][0][0].map(e=>e.url) || [];
  927. },
  928. getgasChangePic(_,idx){
  929. this.form.gasChangePic = [...arguments][0][0].map(e=>e.url) || [];
  930. },
  931. getsoftPipePic(_,idx){
  932. this.form.softPipePic = [...arguments][0][0].map(e=>e.url) || [];
  933. },
  934. getwindproofCirclePic(_,idx){
  935. this.form.windproofCirclePic = [...arguments][0][0].map(e=>e.url) || [];
  936. },
  937. getgasEnvironmentPic(_,idx){
  938. this.form.gasEnvironmentPic = [...arguments][0][0].map(e=>e.url) || [];
  939. },
  940. getreceiptFormPic(_,idx){
  941. this.form.receiptFormPic = [...arguments][0][0].map(e=>e.url) || [];
  942. },
  943. parseDict(dictValue, dictionary) {
  944. const dict = this.dict.type[dictionary]
  945. for(let i = 0; i < dict.length; i++){
  946. if(dict[i].value == dictValue){
  947. return dict[i].label
  948. }
  949. }
  950. },
  951. filesUpload(url){
  952. console.log('upload successfully')
  953. this.form.files = url
  954. this.$refs.form.validate()
  955. },
  956. validateState(rule, value, callback) {
  957. console.log(rule)
  958. console.log(value)
  959. return new Promise((resolve, reject) => {
  960. if (value !== null && value !== undefined && value !== '' && value !== 0) {
  961. resolve(true)
  962. } else {
  963. return callback(new Error('材质不能为空'))
  964. }
  965. })
  966. },
  967. validateSize(rule, value, callback) {
  968. console.log(value)
  969. return new Promise((resolve, reject) => {
  970. const value = this.zEngineeringMaterialBo[rule.index].specifications
  971. console.log(value)
  972. if (value !== null && value !== undefined && value !== '' && value !== 0) {
  973. resolve(true)
  974. } else {
  975. return callback(new Error('规格不能为空'))
  976. }
  977. })
  978. },
  979. validateNumber(rule, value, callback) {
  980. console.log(value)
  981. return new Promise((resolve, reject) => {
  982. const value = this.zEngineeringMaterialBo[rule.index].number
  983. // 至少有一个图片、一个用料信息、一个创建时间
  984. if (value) {
  985. resolve(true)
  986. } else {
  987. return reject(new Error('数量不能为空'))
  988. }
  989. })
  990. },
  991. updateNodeOption(value) {
  992. console.log(this.form);
  993. console.log('updateNodeOption=',value)
  994. console.log('this.form=',this.form)
  995. this.form.files = this.form.pics
  996. if(this.form.zEngineeringNodeBo && !this.form.zEngineeringNodeBo.zEngineeringInfoBo){
  997. this.form.zEngineeringNodeBo.zEngineeringInfoBo = {}
  998. }
  999. this.form.zEngineeringNodeBo.zEngineeringInfoBo.ironPipelineThickness = value[0].ironPipelineThickness
  1000. UpdateEngineeGasOpening(this.form).then(res => {
  1001. this.$modal.msgSuccess("修改成功");
  1002. this.$refs.ConstructionDetails.dialogVisible = false
  1003. })
  1004. this.getList();
  1005. },
  1006. // 根据所选材质获取对应规格
  1007. getEnginSpecificationsList(item, index) {
  1008. this.zEngineeringMaterialBo[index].specifications = null
  1009. // 根据材质ID获取材质规格
  1010. getEnginSpecificationsList(item.materialQuality).then(res => {
  1011. this.zEngineeringMaterialBo.specifications = res.data
  1012. })
  1013. },
  1014. //添加用料信息
  1015. async addzEngineeringMaterBo(row) {
  1016. this.zEngineeringNodeBo = { // 工程节点
  1017. type: '', // 节点类型
  1018. zEngineeringInfoBo: { // 施工信息
  1019. constructUser: '', // 施工人
  1020. constructTime: '', // 施工时间
  1021. zEngiineeringPhotoBoList: [], // 图片列表
  1022. zEngineeringMaterialBo: []
  1023. },
  1024. }
  1025. this.zEngineeringMaterialBo = [ // 用料对象
  1026. {
  1027. materialQuality: '', // 用料材质
  1028. specifications: '', // 用料规格
  1029. number: '' // 用料数量
  1030. },
  1031. ]
  1032. const id = row.id
  1033. putEngineeGasOpening(id).then(response => {
  1034. this.loading = false;
  1035. this.form = response.data
  1036. this.form.zEngineeringNodeBo = []
  1037. this.nodeDetailVisible = true;
  1038. });
  1039. },
  1040. updateMaterBo() {
  1041. this.form.zEngineeringNodeBo = []
  1042. if (this.zEngineeringMaterialBo.length > 0) {
  1043. let valid = true;
  1044. if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['materialQuality'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['materialQuality'] == null) {
  1045. valid = false;
  1046. }
  1047. if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['specifications'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['specifications'] == null) {
  1048. valid = false;
  1049. }
  1050. if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == null) {
  1051. valid = false;
  1052. }
  1053. // if (this.form.enginClassification != [] && this.form.enginClassification.length>0) {
  1054. // this.form.enginClassification = this.form.enginClassification.join(',');
  1055. // }
  1056. if (valid) {
  1057. this.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
  1058. this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
  1059. this.zEngineeringNodeBo.type = this.$route.query.type
  1060. this.$refs.nodeForm.validate(valid => {
  1061. if (valid) {
  1062. EditEngineeGasOpening(this.form).then(res => {
  1063. this.nodeDetailVisible = false
  1064. this.$modal.msgSuccess("新增成功");
  1065. })
  1066. }
  1067. });
  1068. } else {
  1069. this.$message.warning('完善信息!')
  1070. }
  1071. }
  1072. },
  1073. //添加用料
  1074. addzEngineeringMaterialBo() {
  1075. if (this.zEngineeringMaterialBo.length > 0) {
  1076. let valid = true;
  1077. if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['materialQuality'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['materialQuality'] == null) {
  1078. valid = false;
  1079. }
  1080. if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['specifications'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['specifications'] == null) {
  1081. valid = false;
  1082. }
  1083. if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == null) {
  1084. valid = false;
  1085. }
  1086. if (valid) {
  1087. this.zEngineeringMaterialBo.push({
  1088. materialQuality: '', // 用料材质
  1089. specifications: '', // 用料规格
  1090. number: '' // 用料数量
  1091. })
  1092. } else {
  1093. this.$message.warning('完善信息!')
  1094. }
  1095. }
  1096. },
  1097. // 删除用料信息
  1098. removezEngineeringMaterialBo(index) {
  1099. this.zEngineeringMaterialBo.splice(index, 1)
  1100. },
  1101. // 根据url获取type节点类型
  1102. getType() {
  1103. const queryString = window.location.search;
  1104. const params = new URLSearchParams(queryString);
  1105. const type = params.get('type');
  1106. if (type) {
  1107. this.form.type = type;
  1108. this.form.zEngineeringNodeBo.type = (type === '1' ? "工业工程" : "市政工程")
  1109. this.EngineepipeType = (type === '1' ? [{value: '小微商服', label: '小微商服'}, {
  1110. value: '新建工业',
  1111. label: '新建工业'
  1112. }, {value: '改造工业', label: '改造工业'}]
  1113. : [{value: '气源', label: '气源'}, {value: '排迁', label: '排迁'}])
  1114. }
  1115. },
  1116. // 新增顶管工程
  1117. addNewPipe(data) {
  1118. // console.log(this.form)
  1119. this.$refs.enginPipe.openDialog({
  1120. id: data.id,
  1121. type: this.form.type
  1122. }, 'add', data)
  1123. },
  1124. // 历史查询
  1125. viewSource(e) {
  1126. console.log('历史查询', e)
  1127. console.log('历史查询e.enginType', e.enginType)
  1128. this.currentId = e.id
  1129. let val = e.enginType + "_" + e.enginClassification
  1130. val = 'air_wall_node'
  1131. // alert(val)
  1132. getDicts(val).then(res => {
  1133. let dict = []
  1134. for (let i = 0; i < res.data.length; i++) {
  1135. dict.push({
  1136. "label": res.data[i].dictLabel,
  1137. "value": res.data[i].dictValue,
  1138. })
  1139. }
  1140. this.enginType = e.enginType
  1141. // 此处有注释
  1142. this.$refs.ConstructionDetails.open([{
  1143. value: "历史数据",
  1144. label: "历史数据"
  1145. }], e.enginType,null,null,null,null,null,e.enginType)
  1146. // this.$refs.ConstructionDetails.open(dict, this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
  1147. this.status = 'read-only'
  1148. })
  1149. },
  1150. // 修改施工信息
  1151. updateviewSource(e) {
  1152. let dicts = []
  1153. let enginType = e.enginType
  1154. const dict = this.dict.type.air_wall_node
  1155. for(let i = 0; i < dict.length; i++){
  1156. if(dict[i].value == enginType){
  1157. dicts.push({
  1158. value: dict[i].value,
  1159. label: dict[i].label
  1160. })
  1161. }
  1162. }
  1163. // this.enginType = enginType
  1164. this.currentId = e.id
  1165. console.log("修改施工信息",e)
  1166. console.log("修改施工信息 dict",dict)
  1167. // this.$refs.ConstructionDetails.open(_, this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
  1168. // let dicts = [{
  1169. // value: "历史数据",
  1170. // label: "历史数据"
  1171. // }]
  1172. this.$refs.ConstructionDetails.open(dicts, this.form.type,null,null,null,null,null,enginType)
  1173. this.status = 'put'
  1174. },
  1175. viewNodeSource(e) {
  1176. // alert('type='+e)
  1177. if(!e)return
  1178. console.log('todo: 获取数据', e)
  1179. // todo: 获取数据
  1180. QueryEngineeGasOpening({
  1181. id: this.currentId,
  1182. type: e
  1183. }).then(res => {
  1184. console.log("{id, type}",res)
  1185. this.form = res.data
  1186. try {
  1187. this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
  1188. } catch (error) {
  1189. this.currentCollapses = [];
  1190. }
  1191. })
  1192. },
  1193. nodeCancel() {
  1194. this.nodeDetailVisible = false
  1195. this.reset()
  1196. },
  1197. // 修改施工信息
  1198. toNodeDetail() {
  1199. // 根据材质id查询对应规格回显
  1200. this.$refs["form"].validate(valid => {
  1201. if (valid) {
  1202. this.nodeDetailVisible = true
  1203. }
  1204. })
  1205. },
  1206. getUrl(url) {
  1207. this.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList = this.$refs.obsImageUpload.fileList ? this.$refs.obsImageUpload.fileList.map(e => e.url) : [];
  1208. },
  1209. /** 查询开栓施工列表 */
  1210. getList() {
  1211. this.loading = true;
  1212. getEngineeGasOpeningList(this.searchParams).then(res => {
  1213. this.comprehensiveList = res.rows;
  1214. this.total = res.total;
  1215. this.loading = false;
  1216. });
  1217. },
  1218. // 取消按钮
  1219. cancel() {
  1220. this.open = false;
  1221. this.reset();
  1222. },
  1223. // 表单重置
  1224. reset() {
  1225. for (let formKey in this.form) {
  1226. this.form[formKey] = null
  1227. }
  1228. this.isQualified='';
  1229. this.form.verticalBarTest = []
  1230. this.form.gasCylinderPic = [] // 燃气立杠图片
  1231. this.form.pressureTestPic = [] // 气密测试图片
  1232. this.form.gasMeterPic = [] // 燃气表图片
  1233. this.form.rearPipePic = [] // 表后管图片
  1234. this.form.gasChangePic = [] // 灶前阀门图片
  1235. this.form.softPipePic = [] // 软管图片
  1236. this.form.windproofCirclePic = [] // 灶具阀门图片
  1237. this.form.gasEnvironmentPic = [] // 用气环境图片
  1238. this.form.receiptFormPic = [] // 回执单图片
  1239. this.form.zEngineeringNodeBo = {}
  1240. this.form.zEngineeringNodeBo.zEngineeringInfoBo = {}
  1241. this.zEngineeringMaterialBo = []
  1242. this.zEngineeringMaterialBo.push({
  1243. materialQuality: '', // 用料材质
  1244. specifications: '', // 用料规格
  1245. number: '' // 用料数量
  1246. })
  1247. this.getType()
  1248. },
  1249. /** 搜索按钮操作 */
  1250. handleQuery() {
  1251. this.searchParams.pageNum = 1;
  1252. this.getList();
  1253. },
  1254. /** 重置按钮操作 */
  1255. resetQuery() {
  1256. this.resetForm("searchParams");
  1257. this.handleQuery();
  1258. },
  1259. // 多选框选中数据
  1260. handleSelectionChange(selection) {
  1261. this.ids = selection.map(item => item.id)
  1262. this.single = selection.length !== 1
  1263. this.multiple = !selection.length
  1264. },
  1265. /** 新增按钮操作 */
  1266. handleAdd() {
  1267. this.reset();
  1268. this.gc = true
  1269. this.title = "新增开栓施工";
  1270. this.currentType = 'add'
  1271. this.open = true;
  1272. this.buttonLoading=false;
  1273. this.buttonShow=false;
  1274. },
  1275. removeFile(val) {
  1276. console.log(val)
  1277. console.log("我是文件")
  1278. this.form.files = val
  1279. },
  1280. /** 修改按钮操作 */
  1281. handleUpdate(row) {
  1282. this.buttonLoading=false;
  1283. this.buttonShow=true;
  1284. this.gc = false
  1285. this.loading = true;
  1286. this.reset();
  1287. const id = row.id || this.ids
  1288. putEngineeGasOpening(id).then(response => {
  1289. this.loading = false;
  1290. let newData = response.data
  1291. this.districtHasChanged(newData.district)
  1292. this.communityHasChanged(newData.areaId)
  1293. this.buildingHasChanged(newData.buildingId, newData.areaId)
  1294. this.unitHasChanged(newData.unitId)
  1295. this.form = response.data;
  1296. this.form.verticalBarTest = this.form.verticalBarTest != null ? this.form.verticalBarTest.split(","):[];
  1297. this.title = "审核";
  1298. this.currentType = 'put'
  1299. this.open = true;
  1300. });
  1301. },
  1302. /** 修改按钮操作 */
  1303. handleview(row) {
  1304. this.buttonLoading=true;
  1305. this.buttonShow=false;
  1306. this.gc = false
  1307. this.loading = true;
  1308. this.reset();
  1309. const id = row.id || this.ids
  1310. putEngineeGasOpening(id).then(response => {
  1311. this.loading = false;
  1312. let newData = response.data
  1313. this.districtHasChanged(newData.district)
  1314. this.communityHasChanged(newData.areaId)
  1315. this.buildingHasChanged(newData.buildingId, newData.areaId)
  1316. this.unitHasChanged(newData.unitId)
  1317. this.form = response.data;
  1318. this.form.verticalBarTest = this.form.verticalBarTest != null ? this.form.verticalBarTest.split(","):[];
  1319. this.title = "查看开栓施工";
  1320. this.open = true;
  1321. });
  1322. },
  1323. /** 提交按钮 */
  1324. submitForm() {
  1325. this.form.zEngineeringNodeBo = null
  1326. if (this.zEngineeringNodeBo.type !== '') {
  1327. this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
  1328. this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
  1329. }
  1330. // if (this.form.enginClassification != [] && this.form.enginClassification.length>0) {
  1331. // this.form.enginClassification = this.form.enginClassification.join(',');
  1332. // }
  1333. this.$refs["form"].validate(valid => {
  1334. if (valid) {
  1335. // this.form.files = this.$refs.obsFileUpload.fileList;
  1336. // if (this.form.files.length === 0) {
  1337. // this.$message.warning('必须上传附件!')
  1338. // return
  1339. // }
  1340. // alert(this.form.gasCylinderPic)
  1341. console.log('this.form.gasCylinderPic=',this.form)
  1342. if (this.form.gasCylinderPic.length === 0) {
  1343. this.$message.warning('必须上传燃气立杠照片!')
  1344. return
  1345. }
  1346. if (this.form.pressureTestPic.length === 0) {
  1347. this.$message.warning('必须上传气密测试照片!')
  1348. return
  1349. }
  1350. this.form.verticalBarTest = this.form.verticalBarTest.join(",");
  1351. if (this.form.id == null) {
  1352. addEngineeEngineeGasOpening(this.form).then(res => {
  1353. this.$modal.msgSuccess("新增成功");
  1354. this.open = false;
  1355. this.nodeDetailVisible = false
  1356. this.getList();
  1357. })
  1358. } else {
  1359. EditEngineeGasOpening(this.form).then(res => {
  1360. this.$modal.msgSuccess("修改成功");
  1361. this.open = false;
  1362. this.nodeDetailVisible = false
  1363. this.getList();
  1364. })
  1365. }
  1366. }
  1367. });
  1368. },
  1369. /** 删除按钮操作 */
  1370. handleDelete(row) {
  1371. const ids = row.id || this.ids;
  1372. this.$modal.confirm('是否确认删除所选择的数据项?').then(() => {
  1373. this.loading = true;
  1374. return DelEngineeGasOpening(ids);
  1375. }).then(() => {
  1376. this.loading = false;
  1377. this.getList();
  1378. this.$modal.msgSuccess("删除成功");
  1379. }).catch(() => {
  1380. }).finally(() => {
  1381. this.loading = false;
  1382. });
  1383. },
  1384. /** 导出按钮操作 */
  1385. handleExport() {
  1386. this.download('zdsz/engineeringIndustry/export', {
  1387. ...this.queryParams
  1388. }, `comprehensive_${new Date().getTime()}.xlsx`)
  1389. }
  1390. }
  1391. };
  1392. </script>
  1393. <style lang="scss" scoped>
  1394. ::v-deep .appendElDialog {
  1395. width: 70%;
  1396. height: 820px;
  1397. .el-dialog__body {
  1398. height: 85%;
  1399. }
  1400. .el-form-item {
  1401. margin-bottom: 22px;
  1402. width: 44%;
  1403. display: inline-block;
  1404. }
  1405. .el-form-item:nth-child(2n+2) {
  1406. margin-left: 5%;
  1407. }
  1408. .el-form-item:not(:nth-child(1):nth-child(2)) {
  1409. margin-top: 0.5%;
  1410. }
  1411. .remark_input {
  1412. .el-textarea__inner {
  1413. width: 238%;
  1414. height: 190px;
  1415. }
  1416. }
  1417. }
  1418. ::v-deep .appendElNodeDialog {
  1419. // width: 70%;
  1420. height: 80%;
  1421. .el-select {
  1422. width: 70%
  1423. }
  1424. .el-dialog__body {
  1425. height: 85%;
  1426. }
  1427. .el-form-item {
  1428. margin-bottom: 22px;
  1429. width: 100%;
  1430. display: inline-block;
  1431. }
  1432. .el-form-item:not(:nth-child(1):nth-child(2)) {
  1433. margin-top: 0.5%;
  1434. }
  1435. }
  1436. </style>