open_bolt.vue 44 KB

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