open_bolt.vue 46 KB

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