open_bolt.vue 55 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549
  1. <template>
  2. <scroll-view>
  3. <view class="background">
  4. <view class="uni-list">
  5. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  6. <view>
  7. 行政区
  8. </view>
  9. <view v-if="this.isEmpty(this.XZQValue.dictValue)" style="margin-top: 10;" @click="pickerShow('xzq')">
  10. <span style="color: darkgray;">请选择行政区</span>
  11. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  12. </view>
  13. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xzq')">
  14. <span style="color: black;">{{XZQValue.dictLabel}}</span>
  15. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  16. </view>
  17. </view>
  18. </view>
  19. <view class="uni-list">
  20. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  21. <view>
  22. 小区
  23. </view>
  24. <view v-if="this.isEmpty(this.XQValue.id)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
  25. <span style="color: darkgray;">请选择小区</span>
  26. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  27. </view>
  28. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('xq')">
  29. <span style="color: black;">{{XQValue.name}}</span>
  30. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="uni-list">
  35. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  36. <view class="uni-list-cell-left">
  37. 楼栋
  38. </view>
  39. <view v-if="this.isEmpty(this.LDValue.id)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
  40. <span style="color: darkgray;">请选择楼栋</span>
  41. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  42. </view>
  43. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('ld')">
  44. <span style="color: black;">{{LDValue.name}}</span>
  45. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  46. </view>
  47. </view>
  48. </view>
  49. <view class="uni-list" style="margin-top: 10;">
  50. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  51. <view class="uni-list-cell-left">
  52. 单元
  53. </view>
  54. <view v-if="this.isEmpty(this.DYValue.id)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
  55. <span style="color: darkgray;">请选择单元</span>
  56. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  57. </view>
  58. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('dy')">
  59. <span style="color: black;">{{DYValue.name}}</span>
  60. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  61. </view>
  62. </view>
  63. </view>
  64. <view class="uni-list">
  65. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  66. <view class="uni-list-cell-left">
  67. 房间
  68. </view>
  69. <view v-if="this.isEmpty(this.FJValue.id)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
  70. <span style="color: darkgray;">请选择房间</span>
  71. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  72. </view>
  73. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fj')">
  74. <span style="color: black;">{{FJValue.name}}</span>
  75. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  81. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  82. 项目名称
  83. </view>
  84. <radio-group @change="RadioChange">
  85. <label v-for="(item, index) in RadioArr" :key="index" style="margin-left: 10px;">
  86. <radio :value="index + ''" color="#0055ff" style="transform:scale(0.8); margin-left: 5rpx;" :checked="index==radioIndex" />{{item.value}}
  87. </label>
  88. </radio-group>
  89. </view>
  90. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  91. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  92. 灶前阀门
  93. </view>
  94. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  95. <view class="uni-list-cell-left">
  96. 是否阀管改造
  97. </view>
  98. <view v-if="this.isEmpty(this.isPipeChangeId)" class="uni-list-cell-db" style="margin-top: 10;" @click="showActionsheet('isPipeChangeId')">
  99. <span style="color: darkgray;">请选择是否阀管改造</span>
  100. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  101. </view>
  102. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="showActionsheet('isPipeChangeId')">
  103. <span style="color: black;">{{isPipeChangeValue}}</span>
  104. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  105. </view>
  106. </view>
  107. <view class="container" style="border-bottom: 1px solid #f8f8f8;" v-if="isPipeChangeValue=='是'">
  108. <view class="uni-list-cell-left">
  109. 阀管改造类型
  110. </view>
  111. <view v-if="this.isEmpty(this.PipeType.dictValue)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fglx')">
  112. <span style="color: darkgray;">请选择阀管改造类型</span>
  113. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  114. </view>
  115. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fglx')">
  116. <span style="color: black;">{{PipeType.dictLabel}}</span>
  117. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  118. </view>
  119. </view>
  120. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  121. <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  122. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('5')" v-show="reviewStatus!='1'"></image>
  123. <view v-for="(item,index) in imgArr5" :key="index" style="position: relative;">
  124. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  125. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'5')">
  126. </image>
  127. </view>
  128. <view v-else>
  129. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  130. </view>
  131. <view @click="remove(index,'5')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  132. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  133. </image>
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  139. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  140. 气密测试
  141. </view>
  142. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  143. <view class="uni-common-mt" style="width: 100%;">
  144. <view style="width: 100%;box-sizing: border-box;">
  145. <checkbox-group @change="checkboxChange">
  146. <checkbox style="margin-right: 30rpx;" v-for="(item, index) in checkItems" :key="index" :value="item.dictValue" :checked="item.checked">{{ item.dictLabel }}</checkbox>
  147. </checkbox-group>
  148. </view>
  149. </view>
  150. </view>
  151. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  152. <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  153. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('2')" v-show="reviewStatus!='1'"></image>
  154. <view v-for="(item,index) in imgArr2" :key="index" style="position: relative;">
  155. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  156. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'2')">
  157. </image>
  158. </view>
  159. <view v-else>
  160. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  161. </view>
  162. <view @click="remove(index,'2')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  163. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  164. </image>
  165. </view>
  166. </view>
  167. </view>
  168. </view>
  169. <view v-if="radioIndex==0">
  170. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  171. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  172. 燃气立杠
  173. </view>
  174. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  175. <view class="uni-list-cell-left">
  176. 立杠是否刷涂防腐漆
  177. </view>
  178. <view v-if="this.isEmpty(this.openBoltKey)" class="uni-list-cell-db" style="margin-top: 10;" @click="showActionsheet('openBoltKey')">
  179. <span style="color: darkgray;">请选择立杠是否刷涂防腐漆</span>
  180. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  181. </view>
  182. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="showActionsheet('openBoltKey')">
  183. <span style="color: black;">{{openBoltValue}}</span>
  184. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  185. </view>
  186. </view>
  187. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  188. <view class="uni-list-cell-left">
  189. 是否有立杠卡子
  190. </view>
  191. <view v-if="this.isEmpty(this.barClamptKey)" class="uni-list-cell-db" style="margin-top: 10;" @click="showActionsheet('barClamptKey')">
  192. <span style="color: darkgray;">请选择是否有立杠卡子</span>
  193. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  194. </view>
  195. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="showActionsheet('barClamptKey')">
  196. <span style="color: black;">{{barClamptValue}}</span>
  197. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  198. </view>
  199. </view>
  200. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  201. <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  202. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('1')" v-show="reviewStatus!='1'"></image>
  203. <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
  204. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  205. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'1')">
  206. </image>
  207. </view>
  208. <view v-else>
  209. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  210. </view>
  211. <view @click="remove(index,'1')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  212. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  213. </image>
  214. </view>
  215. </view>
  216. </view>
  217. </view>
  218. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  219. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  220. 燃气表
  221. </view>
  222. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  223. <view class="uni-list-cell-left">
  224. 表号
  225. </view>
  226. <view class="uni-list-cell-db" style="margin-top: 10;">
  227. <input class="uni-input" type="text" v-model="tableNumber" maxlength="50" placeholder="请输入表号" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  228. </view>
  229. </view>
  230. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  231. <view class="uni-list-cell-left">
  232. 表字
  233. </view>
  234. <view class="uni-list-cell-db" style="margin-top: 10;">
  235. <input class="uni-input" type="text" v-model="tableCharacters" maxlength="50" placeholder="请输入表字" style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  236. </view>
  237. </view>
  238. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  239. <view class="uni-list-cell-left">
  240. 品牌
  241. </view>
  242. <view v-if="this.isEmpty(this.brankValue.dictValue)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('brank')">
  243. <span style="color: darkgray;">请选择品牌</span>
  244. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  245. </view>
  246. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('brank')">
  247. <span style="color: black;">{{brankValue.dictLabel}}</span>
  248. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  249. </view>
  250. </view>
  251. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  252. <view class="uni-list-cell-left">
  253. 型号
  254. </view>
  255. <view v-if="this.isEmpty(this.tableModel.dictValue)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('Model')">
  256. <span style="color: darkgray;">请选择型号</span>
  257. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  258. </view>
  259. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('Model')">
  260. <span style="color: black;">{{tableModel.dictLabel}}</span>
  261. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  262. </view>
  263. </view>
  264. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  265. <view class="uni-list-cell-left">
  266. 进气方向
  267. </view>
  268. <view v-if="this.isEmpty(this.direction.dictValue)" class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('jqfx')">
  269. <span style="color: darkgray;">请选择进气方向</span>
  270. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  271. </view>
  272. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('jqfx')">
  273. <span style="color: black;">{{direction.dictLabel}}</span>
  274. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  275. </view>
  276. </view>
  277. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  278. <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  279. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('3')" v-show="reviewStatus!='1'"></image>
  280. <view v-for="(item,index) in imgArr3" :key="index" style="position: relative;">
  281. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  282. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'3')">
  283. </image>
  284. </view>
  285. <view v-else>
  286. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  287. </view>
  288. <view @click="remove(index,'3')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  289. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  290. </image>
  291. </view>
  292. </view>
  293. </view>
  294. </view>
  295. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  296. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  297. 表后管
  298. </view>
  299. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  300. <view class="uni-list-cell-left">
  301. 是否有卡子固定
  302. </view>
  303. <view v-if="this.isEmpty(this.isFixationId)" class="uni-list-cell-db" style="margin-top: 10;" @click="showActionsheet('isFixationId')">
  304. <span style="color: darkgray;">请选择是否有卡子固定</span>
  305. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  306. </view>
  307. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="showActionsheet('isFixationId')">
  308. <span style="color: black;">{{isFixationValue}}</span>
  309. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  310. </view>
  311. </view>
  312. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  313. <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  314. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('4')" v-show="reviewStatus!='1'"></image>
  315. <view v-for="(item,index) in imgArr4" :key="index" style="position: relative;">
  316. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  317. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'4')">
  318. </image>
  319. </view>
  320. <view v-else>
  321. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  322. </view>
  323. <view @click="remove(index,'4')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  324. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  325. </image>
  326. </view>
  327. </view>
  328. </view>
  329. </view>
  330. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  331. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  332. 软管
  333. </view>
  334. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  335. <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  336. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('6')" v-show="reviewStatus!='1'"></image>
  337. <view v-for="(item,index) in imgArr6" :key="index" style="position: relative;">
  338. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  339. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'6')">
  340. </image>
  341. </view>
  342. <view v-else>
  343. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  344. </view>
  345. <view @click="remove(index,'6')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  346. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  347. </image>
  348. </view>
  349. </view>
  350. </view>
  351. </view>
  352. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  353. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  354. 灶具
  355. </view>
  356. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  357. <view class="uni-list-cell-left">
  358. 是否使用防风圈
  359. </view>
  360. <view v-if="this.isEmpty(this.isUseWindproofId)" class="uni-list-cell-db" style="margin-top: 10;" @click="showActionsheet('isUseWindproofId')">
  361. <span style="color: darkgray;">请选择是否使用防风圈</span>
  362. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  363. </view>
  364. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="showActionsheet('isUseWindproofId')">
  365. <span style="color: black;">{{isUseWindproofValue}}</span>
  366. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  367. </view>
  368. </view>
  369. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  370. <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  371. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('7')" v-show="reviewStatus!='1'"></image>
  372. <view v-for="(item,index) in imgArr7" :key="index" style="position: relative;">
  373. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  374. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'7')">
  375. </image>
  376. </view>
  377. <view v-else>
  378. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  379. </view>
  380. <view @click="remove(index,'7')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  381. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  382. </image>
  383. </view>
  384. </view>
  385. </view>
  386. </view>
  387. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  388. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  389. 用气环境
  390. </view>
  391. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  392. <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  393. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('8')" v-show="reviewStatus!='1'"></image>
  394. <view v-for="(item,index) in imgArr8" :key="index" style="position: relative;">
  395. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  396. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'8')">
  397. </image>
  398. </view>
  399. <view v-else>
  400. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  401. </view>
  402. <view @click="remove(index,'8')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  403. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  404. </image>
  405. </view>
  406. </view>
  407. </view>
  408. </view>
  409. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  410. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  411. 回执单
  412. </view>
  413. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  414. <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  415. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('9')" v-show="reviewStatus!='1'"></image>
  416. <view v-for="(item,index) in imgArr9" :key="index" style="position: relative;">
  417. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  418. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'9')">
  419. </image>
  420. </view>
  421. <view v-else>
  422. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  423. </view>
  424. <view @click="remove(index,'9')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  425. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  426. </image>
  427. </view>
  428. </view>
  429. </view>
  430. </view>
  431. </view>
  432. <view v-else>
  433. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  434. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  435. 表前阀前口检测
  436. </view>
  437. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  438. <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  439. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('10')" v-show="reviewStatus!='1'"></image>
  440. <view v-for="(item,index) in imgArr10" :key="index" style="position: relative;">
  441. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  442. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'10')">
  443. </image>
  444. </view>
  445. <view v-else>
  446. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  447. </view>
  448. <view @click="remove(index,'10')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  449. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  450. </image>
  451. </view>
  452. </view>
  453. </view>
  454. </view>
  455. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  456. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  457. 切断阀上口检测
  458. </view>
  459. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  460. <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  461. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('11')" v-show="reviewStatus!='1'"></image>
  462. <view v-for="(item,index) in imgArr11" :key="index" style="position: relative;">
  463. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  464. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'11')">
  465. </image>
  466. </view>
  467. <view v-else>
  468. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  469. </view>
  470. <view @click="remove(index,'11')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  471. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  472. </image>
  473. </view>
  474. </view>
  475. </view>
  476. </view>
  477. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  478. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  479. 切断阀下口检测
  480. </view>
  481. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  482. <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  483. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('12')" v-show="reviewStatus!='1'"></image>
  484. <view v-for="(item,index) in imgArr12" :key="index" style="position: relative;">
  485. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  486. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'12')">
  487. </image>
  488. </view>
  489. <view v-else>
  490. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  491. </view>
  492. <view @click="remove(index,'12')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  493. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  494. </image>
  495. </view>
  496. </view>
  497. </view>
  498. </view>
  499. <view class="background" style="margin-top: 10px;margin-bottom: 10px;">
  500. <view style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  501. 报警器安装位置
  502. </view>
  503. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  504. <view style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  505. <image :src="loadImgSrc('updateimg.png')" mode="" style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose('13')" v-show="reviewStatus!='1'"></image>
  506. <view v-for="(item,index) in imgArr13" :key="index" style="position: relative;">
  507. <view v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  508. <image :src="item" mode="" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;" @click="showPhoto(index,'13')">
  509. </image>
  510. </view>
  511. <view v-else>
  512. <video :src="item" style="width: 200rpx; height: 200rpx; margin: 0 12rpx;"></video>
  513. </view>
  514. <view @click="remove(index,'13')" style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  515. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  516. </image>
  517. </view>
  518. </view>
  519. </view>
  520. </view>
  521. </view>
  522. <view class="action-btn" v-show="reviewStatus!='1'">
  523. <button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
  524. </view>
  525. <!-- <bottom-sheet ref="refShare" :data="historyList"></bottom-sheet> -->
  526. <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name" subtitleKey="id" v-model="name"></SelectPicker>
  527. <SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict" titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
  528. <!-- <bottom-sheet ref="refShare" :data="historyList"></bottom-sheet> -->
  529. </scroll-view>
  530. </template>
  531. <script>
  532. import SelectPicker from '../../components/selectPicker/select_picker.vue'
  533. import bottomSheet from '../../components/bottomSheet/bottomSheet.vue'
  534. import {
  535. getDicts
  536. } from "@/api/system/dict/data";
  537. import {
  538. getAreaList,
  539. getBuildingList,
  540. getUnitList,
  541. getHousesList,
  542. openBolt,
  543. getRoomProjectList,
  544. getRoomProjectId,
  545. AddOpenBolt,
  546. getOpenBoltHistoryDetails
  547. } from '@/api/common';
  548. import {
  549. getToken
  550. } from '../../utils/auth';
  551. export default {
  552. components: {
  553. SelectPicker,
  554. bottomSheet,
  555. },
  556. data() {
  557. return {
  558. RadioArr: [{
  559. value: '老旧改造开栓',
  560. }, {
  561. value: '报警器、切断阀安装开栓',
  562. }],
  563. radioIndex: 0,
  564. radioValue: '老旧改造开栓',
  565. checkItems: [],
  566. checkedValues: [],
  567. title: '',
  568. name: '开栓',
  569. headers: {
  570. Authorization: "Bearer " + getToken()
  571. },
  572. projectValue: {
  573. 'dictValue': '0'
  574. },
  575. //1
  576. openBoltKey: '',
  577. openBoltValue: '',
  578. barClamptKey: '',
  579. barClamptValue: '',
  580. imgArr: [],
  581. //2
  582. barTestValue: '',
  583. singleValue: '',
  584. imgArr2: [],
  585. //3
  586. tableNumber: '',
  587. tableCharacters: '',
  588. brankValue: '',
  589. tableModel: '',
  590. direction: '',
  591. imgArr3: [],
  592. //4
  593. isFixationValue: '',
  594. isFixationId: '',
  595. imgArr4: [],
  596. //5
  597. isPipeChangeValue: '',
  598. isPipeChangeId: '',
  599. PipeType: '',
  600. imgArr5: [],
  601. //6
  602. imgArr6: [],
  603. //7
  604. isUseWindproofValue: '',
  605. isUseWindproofId: '',
  606. imgArr7: [],
  607. //8
  608. imgArr8: [],
  609. //9
  610. imgArr9: [],
  611. //10
  612. imgArr10: [],
  613. //11
  614. imgArr11: [],
  615. //12
  616. imgArr12: [],
  617. //13
  618. imgArr13: [],
  619. openBoltText: '',
  620. type: '',
  621. reviewStatus: '', //是否可以点击
  622. objValue: '', //上一页面传过来的值 新增接口用
  623. open: false,
  624. openDict: false,
  625. selectList: [],
  626. dictOptions: [],
  627. XQValue: {},
  628. XZQValue: {},
  629. remark: '',
  630. LDValue: {},
  631. DYValue: {},
  632. FJValue: {},
  633. XQList: '',
  634. LDList: '',
  635. DYList: '',
  636. FJList: '',
  637. progress: 0, //上传图片进度百分比
  638. loading: false,
  639. historyList: {}, //历史数据
  640. nodeId: '',
  641. nodeType: '',
  642. createTime: null,
  643. engineType: '',
  644. }
  645. },
  646. onLoad(options) {
  647. uni.setNavigationBarTitle({
  648. title: '开栓'
  649. })
  650. getDicts("vertical_bar").then(response => {
  651. response.data.forEach((obj, index) => {
  652. obj.checked = false;
  653. });
  654. this.checkItems = response.data;
  655. });
  656. if ('params' in options) {
  657. let e = JSON.parse(decodeURIComponent(options.params));
  658. this.nodeType = e.type;
  659. if (e.type == 'edit') {
  660. this.nodeId = e.id;
  661. getOpenBoltHistoryDetails(this.nodeId).then(res => {
  662. let response = res.data;
  663. this.engineType = response.engineType;
  664. this.radioIndex = this.engineType == 'old' ? 0 : 1;
  665. this.createTime = response.createTime;
  666. this.XZQValue.dictValue = response.district;
  667. this.XZQValue.dictLabel = response.districtName;
  668. this.XQValue.id = response.areaId;
  669. this.XQValue.name = response.areaName;
  670. this.LDValue.id = response.buildingId;
  671. this.LDValue.name = response.buildingName;
  672. this.DYValue.id = response.unitId;
  673. this.DYValue.name = response.unitName;
  674. this.FJValue.id = response.houseId;
  675. this.FJValue.name = response.houseName;
  676. this.openBoltKey = response.isAntiCorrosionPaint;
  677. this.openBoltValue = response.isAntiCorrosionPaint == 'Y' ? '是' : '否';
  678. this.barClamptKey = response.isVerticalBarClamp;
  679. this.barClamptValue = response.isVerticalBarClamp == 'Y' ? '是' : '否';
  680. this.imgArr = response.gasCylinderPic;
  681. // this.barTestValue = response.verticalBarTest;
  682. // this.singleValue = response.householdTest;
  683. var arr = response.verticalBarTest.split(",");
  684. arr.forEach((obj, index) => {
  685. this.checkItems.forEach((item, index2) => {
  686. if (obj == item.dictLabel) {
  687. this.checkItems[index2].checked = true;
  688. }
  689. });
  690. });
  691. this.checkedValues = response.verticalBarTest;
  692. this.imgArr2 = response.pressureTestPic;
  693. this.tableNumber = response.gasMeterNumber;
  694. this.tableCharacters = response.gasMeterCount;
  695. this.brankValue = {
  696. dictValue: response.gasMeterBrand,
  697. dictLabel: response.gasMeterBrand
  698. };
  699. this.tableModel = {
  700. dictValue: response.gasMeterType,
  701. dictLabel: response.gasMeterType
  702. };
  703. this.direction = {
  704. dictValue: response.gasMeterDirection,
  705. dictLabel: response.gasMeterDirectionName
  706. };
  707. this.imgArr3 = response.gasMeterPic;
  708. this.isFixationId = response.isRearPipeClamp;
  709. this.isFixationValue = response.isRearPipeClamp == 'Y' ? '是' : '否';
  710. this.imgArr4 = response.rearPipePic;
  711. this.isPipeChangeId = response.isGasChangeType;
  712. this.isPipeChangeValue = response.isGasChangeType == 'Y' ? '是' : '否';
  713. this.PipeType = {
  714. dictValue: response.gasChangeType,
  715. dictLabel: response.gasChangeTypeName
  716. };
  717. this.imgArr5 = response.gasChangePic;
  718. this.imgArr6 = response.softPipePic;
  719. this.isUseWindproofId = response.isWindproofCircle;
  720. this.isUseWindproofValue = response.isWindproofCircle == 'Y' ? '是' : '否';
  721. this.imgArr7 = response.windproofCirclePic;
  722. this.imgArr8 = response.gasEnvironmentPic;
  723. this.imgArr9 = response.receiptFormPic;
  724. this.imgArr10 = response.frontPipePic;
  725. this.imgArr11 = response.cutOverPipePic;
  726. this.imgArr12 = response.cutUnderPipePic;
  727. this.imgArr13 = response.alarmPositionPic;
  728. getAreaList(this.XZQValue.dictValue).then(res => {
  729. this.XQList = res.data;
  730. })
  731. getBuildingList(this.XQValue.id).then(res => {
  732. this.LDList = res.data
  733. })
  734. getUnitList(this.LDValue.id).then(res => {
  735. this.DYList = res.data
  736. })
  737. getHousesList(this.DYValue.id).then(res => {
  738. this.FJList = res.data
  739. })
  740. });
  741. }
  742. }
  743. },
  744. methods: {
  745. //判断是否选择
  746. isEmpty(str) {
  747. return (!str || 0 === str.length);
  748. },
  749. RadioChange(e) {
  750. this.radioIndex = e.detail.value;
  751. this.radioValue = this.RadioArr[this.radioIndex].value;
  752. },
  753. checkboxChange(e) {
  754. this.checkedValues = e.detail.value;
  755. },
  756. submit() {
  757. if (this.isEmpty(this.XZQValue.dictValue)) {
  758. this.$modal.msg("请选择行政区")
  759. return
  760. }
  761. if (this.isEmpty(this.XQValue.id)) {
  762. this.$modal.msg("请选择小区")
  763. return
  764. }
  765. if (this.isEmpty(this.LDValue.id)) {
  766. this.$modal.msg("请选择楼栋")
  767. return
  768. }
  769. if (this.isEmpty(this.DYValue.id)) {
  770. this.$modal.msg("请选择单元")
  771. return
  772. }
  773. if (this.isEmpty(this.FJValue.id)) {
  774. this.$modal.msg("请选择房间")
  775. return
  776. }
  777. if (this.isPipeChangeValue == '是' && this.isEmpty(this.PipeType.dictValue)) {
  778. this.$modal.msg("请选择阀管改造类型")
  779. return
  780. }
  781. if (this.imgArr5.length <= 0) {
  782. this.$modal.msg("请上传灶前阀门照片")
  783. return
  784. }
  785. if (this.isEmpty(this.checkedValues)) {
  786. this.$modal.msg("请选择气密测试")
  787. return
  788. }
  789. if (this.imgArr2.length <= 0) {
  790. this.$modal.msg("请上传气密测试照片")
  791. return
  792. }
  793. if (this.radioIndex == 0) {
  794. if (this.isEmpty(this.openBoltKey)) {
  795. this.$modal.msg("请选择立杠是否刷涂防腐漆")
  796. return
  797. }
  798. if (this.isEmpty(this.barClamptKey)) {
  799. this.$modal.msg("请选择是否有立杠卡子")
  800. return
  801. }
  802. if (this.imgArr.length <= 0) {
  803. this.$modal.msg("请上传燃气立杠照片")
  804. return
  805. }
  806. if (this.imgArr3.length <= 0) {
  807. this.$modal.msg("请上传燃气表照片")
  808. return
  809. }
  810. if (this.imgArr4.length <= 0) {
  811. this.$modal.msg("请上传表后管照片")
  812. return
  813. }
  814. if (this.imgArr6.length <= 0) {
  815. this.$modal.msg("请上传软管照片")
  816. return
  817. }
  818. if (this.imgArr7.length <= 0) {
  819. this.$modal.msg("请上传灶具照片")
  820. return
  821. }
  822. if (this.imgArr8.length <= 0) {
  823. this.$modal.msg("请上传用气环境照片")
  824. return
  825. }
  826. if (this.imgArr9.length <= 0) {
  827. this.$modal.msg("请上传回执单照片")
  828. return
  829. }
  830. }
  831. // else {
  832. // if (this.imgArr10.length <= 0) {
  833. // this.$modal.msg("请上传表前阀前口检测照片")
  834. // return
  835. // }
  836. // if (this.imgArr11.length <= 0) {
  837. // this.$modal.msg("请上传切断阀上口检测照片")
  838. // return
  839. // }
  840. // if (this.imgArr12.length <= 0) {
  841. // this.$modal.msg("请上传切断阀下口检测照片")
  842. // return
  843. // }
  844. // if (this.imgArr13.length <= 0) {
  845. // this.$modal.msg("请上传报警器安装位置照片")
  846. // return
  847. // }
  848. // }
  849. uni.showLoading()
  850. let param = {
  851. district: this.XZQValue.dictValue,
  852. areaId: this.XQValue.id,
  853. buildingId: this.LDValue.id,
  854. unitId: this.DYValue.id,
  855. houseId: this.FJValue.id,
  856. isAntiCorrosionPaint: this.openBoltKey,
  857. isVerticalBarClamp: this.barClamptKey,
  858. gasCylinderPic: this.imgArr,
  859. verticalBarTest: this.checkedValues.toString(),
  860. //householdTest: this.singleValue,
  861. pressureTestPic: this.imgArr2,
  862. gasMeterNumber: this.tableNumber,
  863. gasMeterCount: this.tableCharacters,
  864. gasMeterBrand: this.brankValue.dictValue,
  865. gasMeterType: this.tableModel.dictValue,
  866. gasMeterDirection: this.direction.dictValue,
  867. gasMeterPic: this.imgArr3,
  868. isRearPipeClamp: this.isFixationId,
  869. rearPipePic: this.imgArr4,
  870. isGasChangeType: this.isPipeChangeId,
  871. gasChangeType: this.PipeType.dictValue,
  872. gasChangePic: this.imgArr5,
  873. softPipePic: this.imgArr6,
  874. isWindproofCircle: this.isUseWindproofId,
  875. windproofCirclePic: this.imgArr7,
  876. gasEnvironmentPic: this.imgArr8,
  877. receiptFormPic: this.imgArr9,
  878. engineType: this.radioIndex == 0 ? 'old' : 'new',
  879. frontPipePic: this.imgArr10, //表前阀前口检测图片
  880. cutOverPipePic: this.imgArr11, //切断阀上口检测图片
  881. cutUnderPipePic: this.imgArr12, //切断阀下口检测图片
  882. alarmPositionPic: this.imgArr13, //报警器安装位置图片
  883. createTime: this.createTime,
  884. }
  885. AddOpenBolt(this.nodeType, param, this.nodeId).then(res => {
  886. uni.hideLoading()
  887. if (res.code == '200') {
  888. uni.showToast({
  889. title: res.msg,
  890. icon: 'none',
  891. //显示持续时间为 3秒
  892. duration: 2000
  893. });
  894. setTimeout(function() {
  895. uni.navigateBack();
  896. }, 1000)
  897. }
  898. })
  899. //提交接口执行逻辑
  900. },
  901. showActionsheet(type) {
  902. //是否
  903. getDicts("sys_yes_no").then(response => {
  904. this.dictOptions = response.data;
  905. let array = [];
  906. this.dictOptions.forEach((item, index) => {
  907. array.push(item.dictLabel)
  908. });
  909. uni.showActionSheet({
  910. itemList: array,
  911. success: (res) => {
  912. // this.openBoltKey = this.dictOptions[res.tapIndex].dictValue;
  913. // this.openBoltValue = this.dictOptions[res.tapIndex].dictLabel;
  914. if (type == 'openBoltKey') {
  915. this.openBoltKey = this.dictOptions[res.tapIndex].dictValue;
  916. this.openBoltValue = this.dictOptions[res.tapIndex].dictLabel;
  917. } else if (type == 'barClamptKey') {
  918. this.barClamptKey = this.dictOptions[res.tapIndex].dictValue;
  919. this.barClamptValue = this.dictOptions[res.tapIndex]
  920. .dictLabel;
  921. } else if (type == 'isFixationId') {
  922. this.isFixationId = this.dictOptions[res.tapIndex].dictValue;
  923. this.isFixationValue = this.dictOptions[res.tapIndex]
  924. .dictLabel;
  925. } else if (type == 'isPipeChangeId') {
  926. this.isPipeChangeId = this.dictOptions[res.tapIndex]
  927. .dictValue;
  928. this.isPipeChangeValue = this.dictOptions[res.tapIndex]
  929. .dictLabel;
  930. } else if (type == 'isUseWindproofId') {
  931. this.isUseWindproofId = this.dictOptions[res.tapIndex]
  932. .dictValue;
  933. this.isUseWindproofValue = this.dictOptions[res.tapIndex]
  934. .dictLabel;
  935. }
  936. },
  937. fail: (err) => {
  938. console.log('弹窗取消');
  939. }
  940. });
  941. });
  942. },
  943. showPhoto(index, type) {
  944. let typeArr = [];
  945. let newArr = [];
  946. if (type == '1') {
  947. typeArr = this.imgArr;
  948. } else if (type == '2') {
  949. typeArr = this.imgArr2;
  950. } else if (type == '3') {
  951. typeArr = this.imgArr3;
  952. } else if (type == '4') {
  953. typeArr = this.imgArr4;
  954. } else if (type == '5') {
  955. typeArr = this.imgArr5;
  956. } else if (type == '6') {
  957. typeArr = this.imgArr6;
  958. } else if (type == '7') {
  959. typeArr = this.imgArr7;
  960. } else if (type == '8') {
  961. typeArr = this.imgArr8;
  962. } else if (type == '9') {
  963. typeArr = this.imgArr9;
  964. } else if (type == '10') {
  965. typeArr = this.imgArr10;
  966. } else if (type == '11') {
  967. typeArr = this.imgArr11;
  968. } else if (type == '12') {
  969. typeArr = this.imgArr12;
  970. } else if (type == '13') {
  971. typeArr = this.imgArr13;
  972. }
  973. typeArr.forEach((item, index) => {
  974. if (item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) ==
  975. 'jpg' ||
  976. item.substring(item.length - 4) == 'jpeg') {
  977. newArr.push(item)
  978. }
  979. });
  980. uni.previewImage({
  981. current: index,
  982. urls: newArr,
  983. })
  984. },
  985. remove(index, e) {
  986. uni.showModal({
  987. title: '提示',
  988. content: '是否删除该图片或视频?',
  989. success: (res) => {
  990. if (res.confirm) {
  991. if (e == '1') {
  992. this.imgArr.splice(index, 1)
  993. } else if (e == '2') {
  994. this.imgArr2.splice(index, 1)
  995. } else if (e == '3') {
  996. this.imgArr3.splice(index, 1)
  997. } else if (e == '4') {
  998. this.imgArr4.splice(index, 1)
  999. } else if (e == '5') {
  1000. this.imgArr5.splice(index, 1)
  1001. } else if (e == '6') {
  1002. this.imgArr6.splice(index, 1)
  1003. } else if (e == '7') {
  1004. this.imgArr7.splice(index, 1)
  1005. } else if (e == '8') {
  1006. this.imgArr8.splice(index, 1)
  1007. } else if (e == '9') {
  1008. this.imgArr9.splice(index, 1)
  1009. } else if (e == '10') {
  1010. this.imgArr10.splice(index, 1)
  1011. } else if (e == '11') {
  1012. this.imgArr11.splice(index, 1)
  1013. } else if (e == '12') {
  1014. this.imgArr12.splice(index, 1)
  1015. } else if (e == '13') {
  1016. this.imgArr13.splice(index, 1)
  1017. }
  1018. }
  1019. }
  1020. })
  1021. },
  1022. choose(e) {
  1023. let _this = this;
  1024. uni.showActionSheet({
  1025. title: '上传',
  1026. itemList: ['图片', '视频'],
  1027. success: (res) => {
  1028. if (res.tapIndex == 0) {
  1029. this.chooseimage(e)
  1030. } else {
  1031. this.choosevideo(e)
  1032. }
  1033. }
  1034. })
  1035. },
  1036. chooseimage(e) {
  1037. let _this = this;
  1038. uni.chooseImage({
  1039. sizeType: ['album', 'camera'],
  1040. success(resp) {
  1041. resp.tempFiles.forEach((item, index) => {
  1042. const task = uni.uploadFile({
  1043. url: _this.$HTTP + `/obs`,
  1044. filePath: item.path,
  1045. name: 'file',
  1046. formData: {},
  1047. header: _this.headers,
  1048. success: res => {
  1049. // 判断是否json字符串,将其转为json格式
  1050. let data = JSON.parse(res.data);
  1051. if (![200].includes(data.code)) {
  1052. _this.$modal.msg(data.msg)
  1053. } else {
  1054. if (_this.progress === 100) {
  1055. if (e == '1') {
  1056. _this.imgArr.push(data.data.url)
  1057. } else if (e == '2') {
  1058. _this.imgArr2.push(data.data.url)
  1059. } else if (e == '3') {
  1060. _this.imgArr3.push(data.data.url)
  1061. } else if (e == '4') {
  1062. _this.imgArr4.push(data.data.url)
  1063. } else if (e == '5') {
  1064. _this.imgArr5.push(data.data.url)
  1065. } else if (e == '6') {
  1066. _this.imgArr6.push(data.data.url)
  1067. } else if (e == '7') {
  1068. _this.imgArr7.push(data.data.url)
  1069. } else if (e == '8') {
  1070. _this.imgArr8.push(data.data.url)
  1071. } else if (e == '9') {
  1072. _this.imgArr9.push(data.data.url)
  1073. } else if (e == '10') {
  1074. _this.imgArr10.push(data.data.url)
  1075. } else if (e == '11') {
  1076. _this.imgArr11.push(data.data.url)
  1077. } else if (e == '12') {
  1078. _this.imgArr12.push(data.data.url)
  1079. } else if (e == '13') {
  1080. _this.imgArr13.push(data.data.url)
  1081. }
  1082. _this.$modal.msg('上传成功!')
  1083. }
  1084. }
  1085. },
  1086. fail: e => {
  1087. _this.$modal.msg('上传失败!')
  1088. },
  1089. complete: res => {
  1090. uni.hideLoading();
  1091. _this.uploading = false;
  1092. }
  1093. });
  1094. task.onProgressUpdate(res => {
  1095. _this.progress = res.progress;
  1096. uni.showLoading({
  1097. title: '上传中'
  1098. })
  1099. if (_this.progress != 100) {
  1100. _this.loading = false
  1101. } else {
  1102. _this.loading = true
  1103. }
  1104. });
  1105. })
  1106. },
  1107. })
  1108. },
  1109. choosevideo(e) {
  1110. let _this = this;
  1111. uni.chooseVideo({
  1112. sourceType: ['album', 'camera'],
  1113. maxDuration: 60,
  1114. success(resp) {
  1115. const task = uni.uploadFile({
  1116. url: _this.$HTTP + `/obs`,
  1117. filePath: resp.tempFilePath,
  1118. name: 'file',
  1119. formData: {},
  1120. header: _this.headers,
  1121. success: res => {
  1122. // 判断是否json字符串,将其转为json格式
  1123. let data = JSON.parse(res.data);
  1124. if (![200].includes(res.statusCode)) {
  1125. this.uploadError(index, data);
  1126. } else {
  1127. //上传成功
  1128. if (_this.progress === 100) {
  1129. if (e == '1') {
  1130. _this.imgArr.push(data.data.url)
  1131. } else if (e == '2') {
  1132. _this.imgArr2.push(data.data.url)
  1133. } else if (e == '3') {
  1134. _this.imgArr3.push(data.data.url)
  1135. } else if (e == '4') {
  1136. _this.imgArr4.push(data.data.url)
  1137. } else if (e == '5') {
  1138. _this.imgArr5.push(data.data.url)
  1139. } else if (e == '6') {
  1140. _this.imgArr6.push(data.data.url)
  1141. } else if (e == '7') {
  1142. _this.imgArr7.push(data.data.url)
  1143. } else if (e == '8') {
  1144. _this.imgArr8.push(data.data.url)
  1145. } else if (e == '9') {
  1146. _this.imgArr9.push(data.data.url)
  1147. } else if (e == '10') {
  1148. _this.imgArr10.push(data.data.url)
  1149. } else if (e == '11') {
  1150. _this.imgArr11.push(data.data.url)
  1151. } else if (e == '12') {
  1152. _this.imgArr12.push(data.data.url)
  1153. } else if (e == '13') {
  1154. _this.imgArr13.push(data.data.url)
  1155. }
  1156. _this.$modal.msg('上传成功!')
  1157. }
  1158. }
  1159. },
  1160. fail: e => {
  1161. _this.$modal.msg('上传失败!')
  1162. this.uploadError(index, e);
  1163. },
  1164. complete: res => {
  1165. uni.hideLoading();
  1166. _this.uploading = false;
  1167. }
  1168. });
  1169. task.onProgressUpdate(res => {
  1170. _this.progress = res.progress;
  1171. uni.showLoading({
  1172. title: '上传中'
  1173. })
  1174. if (_this.progress != 100) {
  1175. _this.loading = false
  1176. } else {
  1177. _this.loading = true
  1178. }
  1179. });
  1180. },
  1181. })
  1182. },
  1183. pickerShow(e) {
  1184. this.type = e; //赋值类型
  1185. if (e == 'Model') {
  1186. this.openDict = true;
  1187. getDicts("gas_meter_type").then(response => {
  1188. this.dictOptions = response.data;
  1189. });
  1190. } else if (e == 'brank') {
  1191. this.openDict = true;
  1192. getDicts("gas_meter_brand").then(response => {
  1193. this.dictOptions = response.data;
  1194. });
  1195. } else if (e == 'fglx') {
  1196. this.openDict = true;
  1197. getDicts("gas_change_type").then(response => {
  1198. this.dictOptions = response.data;
  1199. });
  1200. } else if (e == 'jqfx') {
  1201. this.openDict = true;
  1202. getDicts("gas_meter_direction").then(response => {
  1203. this.dictOptions = response.data;
  1204. });
  1205. } else if (e == 'xzq') { //行政区
  1206. if (this.isEmpty(this.projectValue.dictValue)) {
  1207. this.$modal.msg('请选择工程周期')
  1208. } else {
  1209. this.openDict = true;
  1210. getDicts("district").then(response => {
  1211. this.dictOptions = response.data;
  1212. });
  1213. }
  1214. } else if (e == 'xq') { //小区
  1215. if (this.isEmpty(this.XZQValue.dictValue)) {
  1216. getAreaList('').then(res => {
  1217. this.XQList = res.data;
  1218. this.open = true;
  1219. this.selectList = this.XQList;
  1220. })
  1221. } else {
  1222. getAreaList(this.XZQValue.dictValue).then(res => {
  1223. this.XQList = res.data;
  1224. this.selectList = this.XQList;
  1225. this.open = true;
  1226. })
  1227. }
  1228. } else if (e == 'ld') { //楼栋
  1229. if (this.isEmpty(this.XQValue.id)) {
  1230. this.$modal.msg('请选择小区')
  1231. } else {
  1232. getBuildingList(this.XQValue.id).then(res => {
  1233. this.LDList = res.data
  1234. this.selectList = this.LDList;
  1235. this.open = true;
  1236. })
  1237. }
  1238. } else if (e == 'dy') { //单元
  1239. if (this.isEmpty(this.LDValue.id)) {
  1240. this.$modal.msg('请选择楼栋')
  1241. } else {
  1242. getUnitList(this.LDValue.id).then(res => {
  1243. this.DYList = res.data
  1244. this.selectList = this.DYList;
  1245. this.open = true;
  1246. })
  1247. }
  1248. } else if (e == 'fj') { //房间
  1249. if (this.isEmpty(this.DYValue.id)) {
  1250. this.$modal.msg('请选择单元')
  1251. } else {
  1252. getHousesList(this.DYValue.id).then(res => {
  1253. this.FJList = res.data
  1254. this.selectList = this.FJList;
  1255. this.open = true;
  1256. })
  1257. }
  1258. }
  1259. },
  1260. changeSelectDict(item, index) {
  1261. this.openDict = false;
  1262. if (this.type == 'fglx') {
  1263. this.PipeType = item;
  1264. } else if (this.type == 'jqfx') {
  1265. this.direction = item;
  1266. } else if (this.type == 'xzq') {
  1267. this.XZQValue = item;
  1268. //根据行政区id获取小区数据
  1269. this.XQValue = '';
  1270. this.LDValue = '';
  1271. this.DYValue = '';
  1272. this.FJValue = '';
  1273. } else if (this.type == 'brank') {
  1274. this.brankValue = item;
  1275. } else if (this.type == 'Model') {
  1276. this.tableModel = item
  1277. }
  1278. },
  1279. changeSelect(item, index) {
  1280. this.open = false;
  1281. if (this.type == 'xq') {
  1282. this.XZQValue = {
  1283. dictValue: item.district,
  1284. dictLabel: item.districtName
  1285. };
  1286. this.XQValue = item;
  1287. //根据小区id 获取楼栋数据
  1288. this.LDValue = '';
  1289. this.DYValue = '';
  1290. this.FJValue = '';
  1291. } else if (this.type == 'ld') {
  1292. this.LDValue = item;
  1293. this.DYValue = '';
  1294. this.FJValue = '';
  1295. } else if (this.type == 'dy') {
  1296. this.DYValue = item; //根据单元数据 获取房间数据
  1297. this.FJValue = ''; //重置房间数据
  1298. } else if (this.type == 'fj') {
  1299. this.FJValue = item;
  1300. }
  1301. },
  1302. //关闭弹窗
  1303. close(e) {
  1304. this.open = false
  1305. },
  1306. //关闭弹窗
  1307. closeDict(e) {
  1308. this.openDict = false
  1309. },
  1310. }
  1311. }
  1312. </script>
  1313. <style lang="scss">
  1314. .container {
  1315. display: flex;
  1316. align-items: center;
  1317. justify-content: space-between;
  1318. padding: 10px;
  1319. position: relative;
  1320. }
  1321. .uni-list {
  1322. border: 1xp solid #eee;
  1323. }
  1324. .to-right-icon {
  1325. width: 15px;
  1326. height: 15px;
  1327. position: absolute;
  1328. top: 50%;
  1329. transform: translateY(-50%);
  1330. }
  1331. .text {
  1332. font-size: 16px;
  1333. color: #333;
  1334. }
  1335. .background {
  1336. // border: 15px solid hsla(0, 0%, 100%, .5);
  1337. background: white;
  1338. background-clip: padding-box;
  1339. padding: 20rpx;
  1340. border-radius: 20rpx;
  1341. margin: 20rpx;
  1342. /*从padding开始往外面裁剪背景*/
  1343. }
  1344. .btn {
  1345. width: 715rpx;
  1346. height: 69rpx;
  1347. background: #79A4F0;
  1348. border-radius: 6rpx;
  1349. font-size: 25rpx;
  1350. font-family: Microsoft YaHei;
  1351. font-weight: 400;
  1352. color: #FFFFFF;
  1353. line-height: 69rpx;
  1354. margin-top: 40rpx;
  1355. margin-bottom: 100rpx;
  1356. }
  1357. .number {
  1358. display: flex;
  1359. /* 水平居中显示子元素 */
  1360. align-items: flex-start;
  1361. /* 垂直居中显示子元素 */
  1362. justify-content: space-between;
  1363. /* 左右间距等于间距大小 */
  1364. padding: 10px;
  1365. /* 设置padding以提高视觉效果 */
  1366. }
  1367. .textarea {
  1368. margin-top: 10upx;
  1369. width: 100%;
  1370. border: 1rpx solid red;
  1371. min-height: 100upx;
  1372. line-height: 20px;
  1373. }
  1374. checkbox .wx-checkbox-input {
  1375. // border-radius: 50%;
  1376. border-color: #AAAAAA !important;
  1377. width: 30rpx;
  1378. height: 30rpx;
  1379. }
  1380. checkbox .wx-checkbox-input.wx-checkbox-input-checked {
  1381. background: #2D6EFC;
  1382. border-color: #2D6EFC !important;
  1383. color: #fff;
  1384. }
  1385. </style>