index.vue 51 KB

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