PipelineGasUser.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198
  1. <template>
  2. <view>
  3. <image src="https://cczdsz.cn/app/images/background.png" class="background"></image>
  4. <view class="project-content">
  5. <u-form :model="form" ref="form">
  6. <u-form-item label="用户名称" borderBottom ref="item1" labelWidth="140">
  7. <u-input v-model="form.userName" placeholder="请输入用户名称" ></u-input>
  8. </u-form-item>
  9. <u-form-item label="用户编号" borderBottom ref="item1" labelWidth="140">
  10. <u-input v-model="form.userNumber" placeholder="请输入用户编号" ></u-input>
  11. </u-form-item>
  12. <u-form-item label="用户类型" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  13. <u-radio-group v-model="form.userType" >
  14. <u-radio @change="userType" v-for="(item, index) in typelist.users_type" :key="index"
  15. :name="item.dictValue">
  16. {{item.dictLabel}}
  17. </u-radio>
  18. </u-radio-group>
  19. </u-form-item>
  20. <u-form-item label="安检时间" labelWidth="150" borderBottom ref="item1">
  21. <u-input v-model="form.securityCheckTime" borderBottom disabled
  22. @click="showtime2=true "></u-input>
  23. <u-picker v-model="showtime2" mode="time" :params="params" @confirm="time2()"></u-picker>
  24. </u-form-item>
  25. <view class="small-title">阀门井检查</view>
  26. <u-row gutter="12">
  27. <u-col>
  28. <u-form-item label="阀门外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  29. <u-radio-group v-model="form.valveAppearance" >
  30. <u-radio @change="valveAppearance" v-for="(item, index) in typelist.exterior" :key="index"
  31. :name="item.dictValue">
  32. {{item.dictLabel}}
  33. </u-radio>
  34. </u-radio-group>
  35. </u-form-item>
  36. </u-col>
  37. <u-col>
  38. <u-col>
  39. <u-form-item label="开关是否灵敏有效" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  40. <u-radio-group v-model="form.sensitives" >
  41. <u-radio @change="sensitives" v-for="(item, index) in typelist.sensitive" :key="index"
  42. :name="item.dictValue">
  43. {{item.dictLabel}}
  44. </u-radio>
  45. </u-radio-group>
  46. </u-form-item>
  47. </u-col>
  48. </u-col>
  49. <view class="small-title">调压箱检查</view>
  50. <u-col>
  51. <u-form-item label="类型" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  52. <u-radio-group v-model="form.type" >
  53. <u-radio @change="type" v-for="(item, index) in typelist.box_type" :key="index"
  54. :name="item.dictValue">
  55. {{item.dictLabel}}
  56. </u-radio>
  57. </u-radio-group>
  58. </u-form-item>
  59. </u-col>
  60. <u-col>
  61. <u-form-item label="箱体外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  62. <u-radio-group v-model="form.cabinetAppearance" >
  63. <u-radio @change="cabinetAppearance" v-for="(item, index) in typelist.exterior" :key="index"
  64. :name="item.dictValue">
  65. {{item.dictLabel}}
  66. </u-radio>
  67. </u-radio-group>
  68. </u-form-item>
  69. </u-col>
  70. <view class="small-title">用气设施检查-锅炉及直燃机设备</view>
  71. <u-col>
  72. <u-form-item label="运行情况" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  73. <u-radio-group v-model="form.boilerExterior" >
  74. <u-radio @change="boilerExterior" v-for="(item, index) in typelist.catering_status"
  75. :key="index" :name="item.dictValue">
  76. {{item.dictLabel}}
  77. </u-radio>
  78. </u-radio-group>
  79. </u-form-item>
  80. </u-col>
  81. <u-col>
  82. <u-form-item label="外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  83. <u-radio-group v-model="form.boilerAppearance" >
  84. <u-radio @change="boilerAppearance" v-for="(item, index) in typelist.exterior" :key="index"
  85. :name="item.dictValue">
  86. {{item.dictLabel}}
  87. </u-radio>
  88. </u-radio-group>
  89. </u-form-item>
  90. </u-col>
  91. <!-- <view class="small-title">用气设施检查-餐饮设施检查</view>
  92. <u-col>
  93. <u-form-item label="运行情况" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  94. <u-radio-group v-model="form.cateringStatus" >
  95. <u-radio @change="cateringStatus" v-for="(item, index) in typelist.catering_status" :key="index"
  96. :name="item.dictValue">
  97. {{item.dictLabel}}
  98. </u-radio>
  99. </u-radio-group>
  100. </u-form-item>
  101. </u-col>
  102. <u-col>
  103. <u-form-item label="外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  104. <u-radio-group v-model="form.cateringExterior" >
  105. <u-radio @change="cateringExterior" v-for="(item, index) in typelist.exterior"
  106. :key="index" :name="item.dictValue">
  107. {{item.dictLabel}}
  108. </u-radio>
  109. </u-radio-group>
  110. </u-form-item>
  111. </u-col> -->
  112. <view class="small-title">用气设施检查-餐饮设施检查</view>
  113. <u-col>
  114. <u-form-item label="运行情况" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  115. <u-radio-group v-model="form.cateringStatus" >
  116. <u-radio @change="cateringStatus" v-for="(item, index) in typelist.catering_status" :key="index"
  117. :name="item.dictValue">
  118. {{item.dictLabel}}
  119. </u-radio>
  120. </u-radio-group>
  121. </u-form-item>
  122. </u-col>
  123. <u-col>
  124. <u-form-item label="外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  125. <u-radio-group v-model="form.cateringExterior" >
  126. <u-radio @change="cateringExterior" v-for="(item, index) in typelist.exterior"
  127. :key="index" :name="item.dictValue">
  128. {{item.dictLabel}}
  129. </u-radio>
  130. </u-radio-group>
  131. </u-form-item>
  132. </u-col>
  133. <view class="small-title" style="font-size: 32rpx" >燃气管道及设施检查-管道(含公共管道)</view>
  134. <u-row>
  135. <u-col>
  136. <u-form-item label="管道(含公共管道)" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  137. <u-radio-group v-model="form.pipeline" >
  138. <u-radio @change="pipeline" v-for="(item, index) in typelist.pipeline_type"
  139. :key="index" :name="item.dictValue">
  140. {{item.dictLabel}}
  141. </u-radio>
  142. </u-radio-group>
  143. </u-form-item>
  144. </u-col>
  145. <u-col>
  146. <u-form-item label="详情" borderBottom ref="item1" placeholder="请输入编号" labelWidth="120">
  147. <u-input v-model="form.pipelineLabel" length='20px' placeholder=" "
  148. type="digit" :clearable="false" @input="checkinletPressure"></u-input>
  149. </u-form-item>
  150. </u-col>
  151. </u-row>
  152. </u-row>
  153. <view class="small-title">燃气管道及设施检查-计量表具</view>
  154. <u-row>
  155. <u-col>
  156. <u-form-item label="计量表具" borderBottom ref="item1" placeholder="" labelWidth="200">
  157. <u-radio-group v-model="form.measuringInstruments" >
  158. <u-radio @change="measuringInstruments"
  159. v-for="(item, index) in typelist.measuring_instruments" :key="index"
  160. :name="item.dictValue">
  161. {{item.dictLabel}}
  162. </u-radio>
  163. </u-radio-group>
  164. </u-form-item>
  165. </u-col>
  166. <view class="small-title">燃气管道及设施检查-连接管</view>
  167. <u-col>
  168. <u-form-item label="金属软管" borderBottom ref="item1" placeholder="" labelWidth="120" >
  169. <u-radio-group v-model="form.connectingPipe" >
  170. <u-radio @change="connectingPipe"
  171. v-for="(item, index) in typelist.connecting_pipe_metal_hose" :key="index"
  172. :name="item.dictValue">
  173. {{item.dictLabel}}
  174. </u-radio>
  175. </u-radio-group>
  176. </u-form-item>
  177. </u-col>
  178. <u-col>
  179. <u-form-item label="胶管,点火棒" borderBottom ref="item1" placeholder="" labelWidth="120" >
  180. <u-radio-group v-model="form.connectingPipeB" >
  181. <u-radio @change="connectingPipeB"
  182. v-for="(item, index) in typelist.connecting_pipe_metal_hose" :key="index"
  183. :name="item.dictValue">
  184. {{item.dictLabel}}
  185. </u-radio>
  186. </u-radio-group>
  187. </u-form-item>
  188. </u-col>
  189. </u-row>
  190. <view class="small-title">燃气管道及设施检查-凝水杠</view>
  191. <u-row gutter="12">
  192. <u-col span="12">
  193. <u-form-item label="外观" borderBottom ref="item1" placeholder="请输入编号"
  194. >
  195. <u-radio-group v-model="form.condensateBar" >
  196. <u-radio @change="condensateBar"
  197. v-for="(item, index) in typelist.condensate_rod_appearance"
  198. :key="index" :name="item.dictValue">
  199. {{item.dictLabel}}
  200. </u-radio>
  201. </u-radio-group>
  202. </u-form-item>
  203. </u-col>
  204. </u-row>
  205. <view class="small-title">燃气管道及设施检查-有无私接私改</view>
  206. <u-row>
  207. <u-col>
  208. <u-form-item label="有无私接私改" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
  209. <u-radio-group v-model="form.receptionModification" >
  210. <u-radio @change="receptionModification"
  211. v-for="(item, index) in typelist.there_is_selflessness_and_private_reform"
  212. :key="index" :name="item.dictValue">
  213. {{item.dictLabel}}
  214. </u-radio>
  215. </u-radio-group>
  216. </u-form-item>
  217. </u-col>
  218. <view class="small-title">安全设施检查-压力表</view>
  219. <u-col>
  220. <u-form-item label="运行情况" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
  221. <u-radio-group v-model="form.pressureStatus" >
  222. <u-radio @change="pressureStatus"
  223. v-for="(item, index) in typelist.pressure_gauge_operation" :key="index"
  224. :name="item.dictValue">
  225. {{item.dictLabel}}
  226. </u-radio>
  227. </u-radio-group>
  228. </u-form-item>
  229. </u-col>
  230. <view class="small-title">安全设施检查-紧急切断阀</view>
  231. <u-col>
  232. <u-form-item label="外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
  233. <u-radio-group v-model="form.emergencyShut" >
  234. <u-radio @change="emergencyShut"
  235. v-for="(item, index) in typelist.emergency_shutoff_valve_appearance" :key="index"
  236. :name="item.dictValue">
  237. {{item.dictLabel}}
  238. </u-radio>
  239. </u-radio-group>
  240. </u-form-item>
  241. </u-col>
  242. <u-col>
  243. <u-form-item label="运行情况" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
  244. <u-radio-group v-model="form.emergencyShutB" >
  245. <u-radio @change="emergencyShutB"
  246. v-for="(item, index) in typelist.emergency_shutdown_valve_operation" :key="index"
  247. :name="item.dictValue">
  248. {{item.dictLabel}}
  249. </u-radio>
  250. </u-radio-group>
  251. </u-form-item>
  252. </u-col>
  253. </u-row>
  254. <view class="small-title">安全设施检查-安全阀</view>
  255. <u-row> </u-row>
  256. <u-col>
  257. <u-form-item label="外观" borderBottom ref="item1" placeholder="请输入编号" labelWidth="200">
  258. <u-radio-group v-model="form.safetyValve" >
  259. <u-radio @change="safetyValve"
  260. v-for="(item, index) in typelist.safety_valve_appearance" :key="index"
  261. :name="item.dictValue">
  262. {{item.dictLabel}}
  263. </u-radio>
  264. </u-radio-group>
  265. </u-form-item>
  266. </u-col>
  267. <view class="small-title">安全用气环境检查</view>
  268. <u-row gutter="12">
  269. <u-col span="8">
  270. <u-form-item label="流向标识" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  271. <u-radio-group v-model="form.flowDirection" >
  272. <u-radio @change="flowDirection"
  273. v-for="(item, index) in typelist.yes_and_no" :key="index"
  274. :name="item.dictValue">
  275. {{item.dictLabel}}
  276. </u-radio>
  277. </u-radio-group>
  278. </u-form-item>
  279. </u-col>
  280. <u-col span="4">
  281. <u-form-item label=" " borderBottom ref="item1" placeholder="请输入编号" labelWidth="0">
  282. <u-input v-model="form.flowDirectionLabel" length='15px' placeholder="请输入"
  283. ></u-input>
  284. </u-form-item>
  285. </u-col>
  286. </u-row>
  287. <u-row gutter="12">
  288. <u-col span="8">
  289. <u-form-item label="有无易燃物" borderBottom ref="item1" placeholder="" labelWidth="160">
  290. <u-radio-group v-model="form.flammableMaterials" >
  291. <u-radio @change="flammableMaterials"
  292. v-for="(item, index) in typelist.yes_and_no" :key="index"
  293. :name="item.dictValue">
  294. {{item.dictLabel}}
  295. </u-radio>
  296. </u-radio-group>
  297. </u-form-item>
  298. </u-col>
  299. <u-col span="4">
  300. <u-form-item label=" " borderBottom ref="item1" placeholder="" labelWidth="0">
  301. <u-input v-model="form.flammableMaterialsLabel" length='15px' placeholder="请输入"
  302. ></u-input>
  303. </u-form-item>
  304. </u-col>
  305. </u-row>
  306. <u-row gutter="12">
  307. <u-col span="8">
  308. <u-form-item label="有无占压" borderBottom ref="item1" placeholder="" labelWidth="140">
  309. <u-radio-group v-model="form.pressure" >
  310. <u-radio @change="pressure"
  311. v-for="(item, index) in typelist.yes_and_no" :key="index"
  312. :name="item.dictValue">
  313. {{item.dictLabel}}
  314. </u-radio>
  315. </u-radio-group>
  316. </u-form-item>
  317. </u-col>
  318. <u-col span="4">
  319. <u-form-item label=" " borderBottom ref="item1" placeholder="" labelWidth="0">
  320. <u-input v-model="form.pressureLabel" length='15px' placeholder="请输入"
  321. ></u-input>
  322. </u-form-item>
  323. </u-col>
  324. </u-row>
  325. <u-row gutter="12">
  326. <u-col span="8">
  327. <u-form-item label="两气混用" borderBottom ref="item1" placeholder="" labelWidth="140">
  328. <u-radio-group v-model="form.mixingGases" >
  329. <u-radio @change="mixingGases"
  330. v-for="(item, index) in typelist.yes_and_no" :key="index"
  331. :name="item.dictValue">
  332. {{item.dictLabel}}
  333. </u-radio>
  334. </u-radio-group>
  335. </u-form-item>
  336. </u-col>
  337. <u-col span="4">
  338. <u-form-item label=" " borderBottom ref="item1" placeholder="" labelWidth="0">
  339. <u-input v-model="form.mixingGasesLabel" length='15px' placeholder="请输入"
  340. ></u-input>
  341. </u-form-item>
  342. </u-col>
  343. </u-row>
  344. <u-row gutter="12">
  345. <u-col span="8">
  346. <u-form-item label="重物搭挂" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  347. <u-radio-group v-model="form.heavyHanging" >
  348. <u-radio @change="heavyHanging"
  349. v-for="(item, index) in typelist.yes_and_no" :key="index"
  350. :name="item.dictValue">
  351. {{item.dictLabel}}
  352. </u-radio>
  353. </u-radio-group>
  354. </u-form-item>
  355. </u-col>
  356. <u-col span="4">
  357. <u-form-item label=" " borderBottom ref="item1" placeholder="" labelWidth="0">
  358. <u-input v-model="form.heavyHangingLabel" length='15px' placeholder="请输入"
  359. ></u-input>
  360. </u-form-item>
  361. </u-col>
  362. </u-row>
  363. <u-row gutter="12">
  364. <u-col span="8">
  365. <u-form-item label="电线缠绕" borderBottom ref="item1" placeholder="请输入编号" labelWidth="140">
  366. <u-radio-group v-model="form.wireTangle" >
  367. <u-radio @change="wireTangle"
  368. v-for="(item, index) in typelist.yes_and_no" :key="index"
  369. :name="item.dictValue">
  370. {{item.dictLabel}}
  371. </u-radio>
  372. </u-radio-group>
  373. </u-form-item>
  374. </u-col>
  375. <u-col span="4">
  376. <u-form-item label=" " borderBottom ref="item1" placeholder="" labelWidth="0">
  377. <u-input v-model="form.wireTangleLabel" length='15px' placeholder="请输入"
  378. ></u-input>
  379. </u-form-item>
  380. </u-col>
  381. </u-row>
  382. <view class="small-title">其他</view>
  383. <u-row>
  384. <u-col>
  385. <u-form-item label=" " labelWidth="0" borderBottom ref="item1">
  386. <u-input v-model="form.other" type="textarea" borderBottom placeholder="请填写备注信息内容" maxlength="500"
  387. ></u-input>
  388. </u-form-item>
  389. </u-col>
  390. <u-col>
  391. <u-form-item label=" " labelWidth="0" borderBottom ref="item1">
  392. <u-input v-model="form.WarningColumnInformation" disabled placeholder="请上传照片"></u-input>
  393. <view class="" style="display: flex; flex-wrap: wrap; margin: 0 55rpx;">
  394. <image src="https://cczdsz.cn/app/images/chooseimg.png" mode=""
  395. style="width: 190rpx; height: 190rpx; margin: 0 12rpx; " @click="choose()"
  396. ></image>
  397. <view v-for="(item,index) in imgymxs" :key="index" style="position: relative;">
  398. <view v-if="item.type == 'image'">
  399. <image :src="item.url" mode=""
  400. style="width: 190rpx; height: 190rpx; margin: 0 20rpx;"
  401. @click="showPhoto(index)">
  402. </image>
  403. </view>
  404. <view v-else>
  405. <video :src="item"
  406. style="width: 190rpx; height: 190rpx; margin: 0 20rpx;"></video>
  407. </view>
  408. <view @click="remove(index)"
  409. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%; background-color: #FF0000;">
  410. <u-icon name="close" color="#FFFFFF" size="35" ></u-icon>
  411. </view>
  412. </view>
  413. </view>
  414. </u-form-item>
  415. </u-col>
  416. </u-row>
  417. </u-form>
  418. <u-button class="from-but" style="margin: 40rpx 0;" @click="save() " v-if="type!=1"
  419. type='primary'>确认上传</u-button>
  420. <!-- <u-button class="from-but" style="margin: 40rpx 0;" @click="update()" -->
  421. <!-- type='primary' v-else>确认修改</u-button>-->
  422. </view>
  423. </u-form>
  424. </view>
  425. </view>
  426. </template>
  427. <script>
  428. import service from '@/api/index.js'
  429. export default {
  430. data() {
  431. return {
  432. params: {
  433. year: true,
  434. month: true,
  435. day: true,
  436. hour: true,
  437. minute: true,
  438. second: false
  439. },
  440. showtime2:false,
  441. action: this.$HTTP.webUrl + `/obs`,
  442. headers: {
  443. MAuthorization: "wxBearer " + uni.getStorageSync('token')
  444. },
  445. url: [],
  446. showadministrativeOffice:false,
  447. uploading: false,
  448. imgArr: [],
  449. PhotoList: [],
  450. community: '',
  451. building: '',
  452. unit: '',
  453. imgymxs: [],
  454. progress: 0, //图片或视频上传百分比
  455. showxtv: false,
  456. showvalveWellCondition: false,
  457. form: {
  458. userType: 1,
  459. valveAppearance: 0,
  460. sensitives: 0,
  461. type: 0,
  462. cabinetAppearance: 0,
  463. boilerAppearance: 0,
  464. boilerExterior: 0,
  465. pipeline: 0,
  466. measuringInstruments: 0,
  467. cateringStatus: 0,
  468. cateringExterior: 0,
  469. connectingPipe: 1,
  470. connectingPipeB: 1,
  471. condensateBar: 1,
  472. receptionModification: 1,
  473. pressureStatus: 1,
  474. combustibleGas: 1,
  475. emergencyShut: 1,
  476. emergencyShutB: 1,
  477. safetyValve: 1,
  478. flowDirectionLabel: '',
  479. flowDirection: 0,
  480. flammableMaterials: 0,
  481. pressure: 0,
  482. mixingGases: 0,
  483. heavyHanging: 0,
  484. wireTangle: 0,
  485. securityCheckOne: 0,
  486. securityCheckTwo: 0,
  487. representative: 0,
  488. phone: '',
  489. flammableMaterialsLabel: '',
  490. pressureLabel: '',
  491. mixingGasesLabel: '',
  492. heavyHangingLabel: '',
  493. wireTangleLabel: ''
  494. },
  495. xtvLabel: null,
  496. valveWellConditioLabel: null,
  497. // 表单校验
  498. communityName: '',
  499. communityId:'',
  500. time: '',
  501. showrepairType: false,
  502. showrepairType: null,
  503. checked: true,
  504. typelist: {},
  505. dictlist: ['yes_and_no','exterior','sensitive','box_type','pipeline_type','measuring_instruments',
  506. 'catering_status','other_operating_conditions','other_appearance','pressure_gauge_operation','alarm_operation_a','alarm_operation_b',
  507. 'emergency_shutoff_valve_appearance','emergency_shutdown_valve_operation','safety_valve_appearance','users_type','pressure_regulator_check_type'
  508. ,'pipelines_include_public_pipelines','measuring_instrument','connecting_pipe_metal_hose','connect_the_tube_the_glue_tube_ignition_rod','condensate_rod_appearance'
  509. ,'there_is_selflessness_and_private_reform'
  510. ],
  511. type: 2,
  512. id: null,
  513. AdministrativeOfficeList:[],
  514. AdministrativeOfficeLabel:null,
  515. userId:null,createBy:null,
  516. administrativeOffice:null,
  517. code:null,
  518. name:null,
  519. showBoxDetails:false,
  520. managementOfficeId:null,
  521. boxform:{},
  522. pressureRegulatingBoxDetailsBo:{},
  523. team:null
  524. }
  525. },
  526. // onReady() {
  527. // uni.setNavigationBarTitle({
  528. // title: '调压箱表单'
  529. // });
  530. // },
  531. showPhoto(index) {
  532. uni.previewImage({
  533. current: index,
  534. urls: this.imgArr,
  535. })
  536. },
  537. showPhotos(index) {
  538. uni.previewImage({
  539. current: index,
  540. urls: this.photo,
  541. })
  542. },
  543. onLoad(e) {
  544. uni.setNavigationBarTitle({
  545. title: '非居民用户'
  546. });
  547. uni.setNavigationBarColor({
  548. frontColor: '#ffffff',
  549. backgroundColor: '#2d95f4',
  550. })
  551. let time1 = new Date()
  552. console.log(time1.toLocaleString())
  553. var year = time1.getFullYear(); //得到年份
  554. var month = time1.getMonth() + 1; //得到月份
  555. var date = time1.getDate(); //得到日期
  556. var hours = time1.getHours(); //获取系统时
  557. var Min = time1.getMinutes(); //分
  558. this.type = e.type
  559. this.id = e.id
  560. this.managementOfficeId=e.managementOfficeId
  561. this.time = year + "/" + month + "/" + date + "-" + hours + ":" + Min
  562. this.getdictsysinfo()
  563. this.getUserName()
  564. //this.getAdministrativeOffice(this.userId)
  565. },
  566. methods: {
  567. time2(e) {
  568. console.log(`${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`)
  569. this.form.securityCheckTime = `${e.year}-${e.month}-${e.day} ${e.hour}:${e.minute}`
  570. },
  571. checkinletPressure(e) {
  572. console.log(e)
  573. //正则表达试
  574. e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  575. //重新赋值给input
  576. this.$nextTick(() => {
  577. this.form.inletPressure= e
  578. })
  579. },
  580. checkexportPressureMain(e) {
  581. console.log(e)
  582. //正则表达试
  583. e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  584. //重新赋值给input
  585. this.$nextTick(() => {
  586. this.form.exportPressureMain= e
  587. })
  588. },
  589. checkclosingPressureAccessory(e) {
  590. console.log(e)
  591. //正则表达试
  592. e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  593. //重新赋值给input
  594. this.$nextTick(() => {
  595. this.form.closingPressureAccessory= e
  596. })
  597. },
  598. checkexportPressureAccessory(e) {
  599. console.log(e)
  600. //正则表达试
  601. e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  602. //重新赋值给input
  603. this.$nextTick(() => {
  604. this.form.exportPressureAccessory= e
  605. })
  606. },
  607. checkclosingPressureMain(e) {
  608. console.log(e)
  609. //正则表达试
  610. e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  611. //重新赋值给input
  612. this.$nextTick(() => {
  613. this.form.closingPressureMain= e
  614. })
  615. },
  616. checkcutOffPressureMain(e) {
  617. console.log(e)
  618. //正则表达试
  619. e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  620. //重新赋值给input
  621. this.$nextTick(() => {
  622. this.form.cutOffPressureMain= e
  623. })
  624. },
  625. checkcutOffPressureAccessory(e) {
  626. console.log(e)
  627. //正则表达试
  628. e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  629. //重新赋值给input
  630. this.$nextTick(() => {
  631. this.form.cutOffPressureAccessory= e
  632. })
  633. },
  634. checkreleasePressure(e) {
  635. console.log(e)
  636. //正则表达试
  637. e = (e.match(/^\d*(\.?\d{0,2})/g)[0]) || null
  638. //重新赋值给input
  639. this.$nextTick(() => {
  640. this.form.releasePressure= e
  641. })
  642. },
  643. getUserName(){
  644. service.getUserName().then(res=>{
  645. this.userId=res.id
  646. this.createBy=res.name
  647. this.team=res.ranks
  648. //this.getAdministrativeOffice(res.id)
  649. console.log(this.communityName)
  650. })
  651. },
  652. getdictsysinfo() {
  653. let _this = this
  654. service.getDictInfoList({
  655. type: this.dictlist
  656. }).then(res => {
  657. _this.typelist = res
  658. if (this.type == 1) {
  659. service.getpipelineGasUser(this.id).then(res => {
  660. // this.communityName = res.name
  661. // this.time = res.createTime
  662. if (null != res.photoList) {
  663. res.photoList.forEach(item => {
  664. let url = {}
  665. url.url = item
  666. url.type = 'image'
  667. this.imgymxs.push(url)
  668. this.imgArr.push(item)
  669. })
  670. }
  671. // let list = []
  672. // list = _this.typelist.xtv
  673. // list.forEach((item) => {
  674. // if (item.dictValue == res.xtv) {
  675. // _this.xtvLabel = item.dictLabel
  676. // }
  677. // })
  678. // let list2 = []
  679. // list2 = _this.typelist.valve_well_condition
  680. // list2.forEach((item) => {
  681. // if (item.dictValue == res.valveWellCondition) {
  682. // _this.valveWellConditioLabel = item.dictLabel
  683. // }
  684. // })
  685. // let list3 = []
  686. // list3 = _this.typelist.administrative_office
  687. // list3.forEach((item) => {
  688. // if (item.dictValue == res.administrativeOffice) {
  689. // _this.AdministrativeOfficeLabel = item.dictLabel
  690. // }
  691. // })
  692. this.form = res
  693. // this.managementOfficeId=this.form.parentId
  694. })
  695. console.log(res)
  696. }
  697. })
  698. },
  699. //外观
  700. userType(e) {
  701. this.$refs.form.userType = e
  702. console.log(e)
  703. },
  704. valveAppearance(e)
  705. {
  706. this.$refs.form.valveAppearance = e
  707. console.log(e)
  708. },
  709. sensitives(e)
  710. {
  711. this.$refs.form.sensitives = e
  712. console.log(e)
  713. },
  714. type(e)
  715. {
  716. this.$refs.form.type = e
  717. console.log(e)
  718. },
  719. //方砖
  720. boilerExterior(e) {
  721. this.$refs.form.boilerExterior = e
  722. console.log(e)
  723. },
  724. //护栏
  725. boilerAppearance(e) {
  726. this.$refs.form.boilerAppearance = e
  727. console.log(e)
  728. },
  729. //基础
  730. cateringStatus(e) {
  731. this.$refs.form.cateringStatus = e
  732. console.log(e)
  733. },
  734. //压力表
  735. cateringExterior(e) {
  736. this.$refs.form.cateringExterior = e
  737. console.log(e)
  738. },
  739. //阀门
  740. pipeline(e) {
  741. this.$refs.form.pipeline = e
  742. console.log(e)
  743. },
  744. //调压器
  745. measuringInstruments(e) {
  746. this.$refs.form.measuringInstruments = e
  747. console.log(e)
  748. },
  749. connectingPipe(e)
  750. {
  751. this.$refs.form.connectingPipe = e
  752. console.log(e)
  753. },
  754. //切断器(放散阀)测试情况
  755. connectingPipeB(e) {
  756. this.$refs.form.connectingPipeB = e
  757. console.log(e)
  758. },
  759. condensateBar(e)
  760. {
  761. this.$refs.form.condensateBar = e
  762. console.log(e)
  763. },
  764. //过滤器
  765. receptionModification(e) {
  766. this.$refs.form.receptionModification = e
  767. console.log(e)
  768. },
  769. pressureStatus(e)
  770. {
  771. this.$refs.form.pressureStatus = e
  772. console.log(e)
  773. },
  774. emergencyShut(e) {
  775. this.$refs.form.emergencyShut = e
  776. console.log(e)
  777. },
  778. emergencyShutB(e) {
  779. this.$refs.form.emergencyShutB = e
  780. console.log(e)
  781. },
  782. safetyValve(e) {
  783. this.$refs.form.safetyValve = e
  784. console.log(e)
  785. },
  786. flowDirection(e) {
  787. this.$refs.form.flowDirection = e
  788. // this.form.xtv = e[0].value
  789. // this.xtvLabel = e[0].label
  790. // console.log(this.xtvLabel)
  791. },
  792. flammableMaterials(e)
  793. {
  794. this.$refs.form.flammableMaterials = e
  795. console.log('11111',e)
  796. },
  797. pressure(e)
  798. {
  799. this.$refs.form.pressure = e
  800. console.log('11111',e)
  801. },
  802. mixingGases(e)
  803. {
  804. this.$refs.form.mixingGases = e
  805. console.log('11111',e)
  806. },
  807. heavyHanging(e)
  808. {
  809. this.$refs.form.heavyHanging = e
  810. console.log('11111',e)
  811. },
  812. wireTangle(e)
  813. {
  814. this.$refs.form.wireTangle = e
  815. console.log('11111',e)
  816. },
  817. update()
  818. {
  819. let _this = this
  820. this.form.processStatus = -1
  821. // if(this.imgArr.length==0)
  822. // {
  823. // this.$UTILS.showPrompt('请上传照片或视频!')
  824. // return
  825. // }
  826. this.form.photoList = this.imgArr
  827. this.form.team=this.team
  828. // this.form.unitId = this.unit
  829. // this.form.areaId = this.id
  830. // this.form.userId=this.userId
  831. // this.form.createBy=this.userId
  832. // this.form.name=this.name
  833. // this.form.administrativeOffice=this.administrativeOffice
  834. // this.form.code=this.code
  835. // this.form.name=this.name
  836. // this.form.number=this.code
  837. service.updatepipelineGasUser(this.form).then(res => {
  838. console.log(res)
  839. _this.$UTILS.showPrompt('修改成功!')
  840. // setTimeout(() => {
  841. // console.log('跳')
  842. // uni.switchTab({
  843. // url: '/pages/index/index'
  844. // })
  845. // }, 2000)
  846. // this.form={businessService:0,
  847. // administrativeOffice:0,
  848. // businessService:0,
  849. // isNotXtv:0,
  850. // appearance:0,
  851. // squareBrick:0,
  852. // foundation:0,
  853. // pressureGage:0,
  854. // valve:0,
  855. // isThereALeak:0,
  856. // voltageRegulator:0,
  857. // xtv:0,
  858. // thermostat:0,
  859. // explosionProofSwitch:0,
  860. // cutterTested:0,
  861. // manOfAccessoryAlternating:0,
  862. // filter:0,
  863. // specialCaseOfPressureRegulatingFacilities:0,
  864. // overdueInspectionDays:3,
  865. // valveWellTesting:true,
  866. // guardrail:0}
  867. // this.AdministrativeOfficeLabel=this.AdministrativeOfficeList.filter(item=>item.value==this.administrativeOffice)[0].name
  868. // this.valveWellConditioLabel=''
  869. // this.xtvLabel=''
  870. // this.valveWellConditioLabel=''
  871. // //this.AdministrativeOfficeLabel=''
  872. // this.form.administrativeOffice=this.administrativeOffice
  873. // this.form.number=this.code
  874. // this.imgArr=[]
  875. // this.imgymxs=[]
  876. })
  877. },
  878. save() {
  879. let _this = this
  880. // if(this.imgArr.length==0)
  881. // {
  882. // this.$UTILS.showPrompt('请上传照片或视频!')
  883. // return
  884. // }
  885. this.form.photoList = this.imgArr
  886. // this.form.unitId = this.unit
  887. // this.form.areaId = this.id
  888. this.form.userId=this.userId
  889. this.form.createBy=this.userId
  890. this.form.team=this.team
  891. // this.form.parentId=this.managementOfficeId
  892. // this.form.name=this.name
  893. // this.form.administrativeOffice=this.administrativeOffice
  894. // this.form.code=this.code
  895. // this.form.name=this.name
  896. // this.form.number=this.code
  897. service.setpipelineGasUser(this.form).then(res => {
  898. console.log(res)
  899. _this.$UTILS.showPrompt('上报成功!')
  900. // setTimeout(() => {
  901. // console.log('跳')
  902. // uni.switchTab({
  903. // url: '/pages/index/index'
  904. // })
  905. // }, 2000)
  906. this.form={
  907. userType: 1,
  908. valveAppearance: 0,
  909. sensitives: 0,
  910. type: 0,
  911. cabinetAppearance: 0,
  912. boilerAppearance: 0,
  913. boilerExterior: 0,
  914. pipeline: 0,
  915. measuringInstruments: 0,
  916. cateringStatus: 0,
  917. cateringExterior: 0,
  918. connectingPipe: 1,
  919. connectingPipeB: 1,
  920. condensateBar: 1,
  921. receptionModification: 1,
  922. pressureStatus: 1,
  923. combustibleGas: 1,
  924. emergencyShut: 1,
  925. emergencyShutB: 1,
  926. safetyValve: 1,
  927. flowDirectionLabel: '',
  928. flowDirection: 0,
  929. flammableMaterials: 0,
  930. pressure: 0,
  931. mixingGases: 0,
  932. heavyHanging: 0,
  933. wireTangle: 0,
  934. securityCheckOne: 0,
  935. securityCheckTwo: 0,
  936. representative: 0,
  937. phone: '',
  938. flammableMaterialsLabel: '',
  939. pressureLabel: '',
  940. mixingGasesLabel: '',
  941. heavyHangingLabel: '',
  942. wireTangleLabel: ''}
  943. // this.AdministrativeOfficeLabel=this.AdministrativeOfficeList.filter(item=>item.value==this.administrativeOffice)[0].name
  944. // this.valveWellConditioLabel=''
  945. // this.xtvLabel=''
  946. // this.valveWellConditioLabel=''
  947. // //this.AdministrativeOfficeLabel=''
  948. // this.form.administrativeOffice=this.administrativeOffice
  949. // this.form.parentId=this.managementOfficeId
  950. // this.form.number=this.code
  951. // this.imgArr=[]
  952. // this.imgymxs=[]
  953. })
  954. },
  955. choose() {
  956. let _this = this;
  957. uni.showActionSheet({
  958. title: '上传',
  959. itemList: ['图片', '视频'],
  960. success: (res) => {
  961. // console.log(res)
  962. if (res.tapIndex == 0) {
  963. this.chooseimage()
  964. } else {
  965. this.choosevideo()
  966. }
  967. }
  968. })
  969. },
  970. showPhoto(index) {
  971. uni.previewImage({
  972. current: index,
  973. urls: this.imgArr,
  974. })
  975. },
  976. showPhotos(index) {
  977. uni.previewImage({
  978. current: index,
  979. urls: this.photo,
  980. })
  981. },
  982. chooseimage() {
  983. console.log('图片')
  984. let _this = this;
  985. uni.chooseImage({
  986. sourceType: ['camera'],
  987. success(resp) {
  988. console.log('res--uni.chooseMedia', resp);
  989. resp.tempFiles.forEach((item, index) => {
  990. const task = uni.uploadFile({
  991. url: _this.$HTTP.webUrl + `/obs`,
  992. filePath: item.path,
  993. name: 'file',
  994. formData: {},
  995. header: _this.headers,
  996. success: res => {
  997. // 判断是否json字符串,将其转为json格式
  998. let data = _this.$u.test.jsonString(res.data) ? JSON.parse(
  999. res.data) : res.data;
  1000. if (![200, 201, 204].includes(res.statusCode)) {
  1001. // this.uploadError(index, data);
  1002. _this.$UTILS.showPrompt('选取失败!')
  1003. } else {
  1004. // 上传成功
  1005. // this.lists[index].response = data;
  1006. // this.lists[index].progress = 100;
  1007. // this.lists[index].error = false;
  1008. // this.$emit('on-success', data, index, this.lists, this
  1009. // .index);
  1010. if (_this.progress === 100) {
  1011. // console.log('_this.progress', _this.progress)
  1012. // console.log('data----', data)
  1013. // console.log('res--', res)
  1014. _this.imgymxs.push({
  1015. url: data.data.url,
  1016. type: 'image'
  1017. })
  1018. _this.imgArr.push(data.data.url)
  1019. // console.log('imgArr', _this.imgArr)
  1020. _this.$UTILS.showPrompt('选取成功!')
  1021. }
  1022. }
  1023. },
  1024. fail: e => {
  1025. _this.$UTILS.showPrompt('选取失败!')
  1026. this.uploadError(index, e);
  1027. },
  1028. complete: res => {
  1029. _this.uploading = false;
  1030. // _this.uploadFile(index + 1);
  1031. // this.$emit('on-change', res, index, this.lists, this
  1032. // .index);
  1033. }
  1034. });
  1035. task.onProgressUpdate(res => {
  1036. // if (res.progress > 0) {
  1037. // this.lists[index].progress = res.progress;
  1038. // this.$emit('on-progress', res, index, this.lists, this.index);
  1039. // }
  1040. _this.progress = res.progress;
  1041. console.log('onProgressUpdate', res)
  1042. uni.showLoading({
  1043. title: '选取中'
  1044. })
  1045. });
  1046. })
  1047. },
  1048. })
  1049. },
  1050. choosevideo() {
  1051. let _this = this;
  1052. console.log('视频')
  1053. uni.chooseVideo({
  1054. sourceType: ['camera'],
  1055. maxDuration: 30,
  1056. success(resp) {
  1057. const task = uni.uploadFile({
  1058. url: _this.$HTTP.webUrl + `/obs`,
  1059. filePath: resp.tempFilePath,
  1060. name: 'file',
  1061. formData: {},
  1062. header: _this.headers,
  1063. success: res => {
  1064. // 判断是否json字符串,将其转为json格式
  1065. let data = _this.$u.test.jsonString(res.data) ? JSON.parse(res.data) :
  1066. res.data;
  1067. if (![200, 201, 204].includes(res.statusCode)) {
  1068. this.uploadError(index, data);
  1069. } else {
  1070. // 上传成功
  1071. // this.lists[index].response = data;
  1072. // this.lists[index].progress = 100;
  1073. // this.lists[index].error = false;
  1074. // this.$emit('on-success', data, index, this.lists, this
  1075. // .index);
  1076. if (_this.progress === 100) {
  1077. console.log('_this.progress', _this.progress)
  1078. console.log('data----', data)
  1079. console.log('res--', res)
  1080. // _this.imgArr.push(data.data.url)
  1081. _this.imgymxs.push({
  1082. url: data.data.url,
  1083. type: 'video'
  1084. })
  1085. _this.imgArr.push(data.data.url)
  1086. console.log('imgArr', _this.imgArr)
  1087. _this.$UTILS.showPrompt('选取成功!')
  1088. }
  1089. }
  1090. },
  1091. fail: e => {
  1092. _this.$UTILS.showPrompt('选取失败!')
  1093. this.uploadError(index, e);
  1094. },
  1095. complete: res => {
  1096. uni.hideLoading();
  1097. _this.uploading = false;
  1098. // _this.uploadFile(index + 1);
  1099. // this.$emit('on-change', res, index, this.lists, this
  1100. // .index);
  1101. }
  1102. });
  1103. task.onProgressUpdate(res => {
  1104. // if (res.progress > 0) {
  1105. // this.lists[index].progress = res.progress;
  1106. // this.$emit('on-progress', res, index, this.lists, this.index);
  1107. // }
  1108. _this.progress = res.progress;
  1109. console.log('onProgressUpdate', res)
  1110. uni.showLoading({
  1111. title: '选取中'
  1112. })
  1113. });
  1114. },
  1115. })
  1116. },
  1117. remove(index) {
  1118. uni.showModal({
  1119. title: '提示',
  1120. content: '是否删除该图片或视频?',
  1121. success: (res) => {
  1122. if (res.confirm) {
  1123. this.imgArr.splice(index, 1);
  1124. this.imgymxs.splice(index, 1);
  1125. console.log('this.imgArr', this.imgArr)
  1126. }
  1127. }
  1128. })
  1129. },
  1130. }
  1131. }
  1132. </script>
  1133. <style>
  1134. .project-content {
  1135. padding: 0rpx 20rpx;
  1136. border-radius: 20rpx;
  1137. width: 90%;
  1138. margin: 0 auto;
  1139. background: #fff;
  1140. }
  1141. .background {
  1142. z-index: -1;
  1143. position: fixed;
  1144. width: 100%;
  1145. height: 100%;
  1146. background-size: 100% 100%;
  1147. }
  1148. .top-left {
  1149. display: flex;
  1150. align-items: center;
  1151. }
  1152. .small-title {
  1153. font-size: 38rpx;
  1154. color: #2d95f4;
  1155. margin: 20rpx 0;
  1156. }
  1157. .form-item {
  1158. display: flex;
  1159. align-items: center;
  1160. font-size: 32rpx;
  1161. border: none;
  1162. }
  1163. .danwei {
  1164. text-align: center;
  1165. line-height: 110rpx;
  1166. }
  1167. .un-row {
  1168. text-align: left;
  1169. }
  1170. .top {
  1171. display: flex;
  1172. align-items: center;
  1173. justify-content: space-between;
  1174. }
  1175. .top-icon {
  1176. font-size: 40rpx;
  1177. color: #2d95f4;
  1178. }
  1179. </style>