open_bolt.vue 46 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377
  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: 200rpx; height: 200rpx; margin: 0 12rpx;"
  127. @click="showPhoto(index,'1')">
  128. </image>
  129. </view>
  130. <view v-else>
  131. <video :src="item" style="width: 200rpx; height: 200rpx; 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: 200rpx; height: 200rpx; margin: 0 12rpx;"
  165. @click="showPhoto(index,'2')">
  166. </image>
  167. </view>
  168. <view v-else>
  169. <video :src="item" style="width: 200rpx; height: 200rpx; 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: 200rpx; height: 200rpx; margin: 0 12rpx;"
  253. @click="showPhoto(index,'3')">
  254. </image>
  255. </view>
  256. <view v-else>
  257. <video :src="item" style="width: 200rpx; height: 200rpx; 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: 200rpx; height: 200rpx; margin: 0 12rpx;"
  295. @click="showPhoto(index,'4')">
  296. </image>
  297. </view>
  298. <view v-else>
  299. <video :src="item" style="width: 200rpx; height: 200rpx; 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: 200rpx; height: 200rpx; margin: 0 12rpx;"
  352. @click="showPhoto(index,'5')">
  353. </image>
  354. </view>
  355. <view v-else>
  356. <video :src="item" style="width: 200rpx; height: 200rpx; 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: 200rpx; height: 200rpx; margin: 0 12rpx;"
  380. @click="showPhoto(index,'6')">
  381. </image>
  382. </view>
  383. <view v-else>
  384. <video :src="item" style="width: 200rpx; height: 200rpx; 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: 200rpx; height: 200rpx; margin: 0 12rpx;"
  423. @click="showPhoto(index,'7')">
  424. </image>
  425. </view>
  426. <view v-else>
  427. <video :src="item" style="width: 200rpx; height: 200rpx; 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: 200rpx; height: 200rpx; margin: 0 12rpx;"
  451. @click="showPhoto(index,'8')">
  452. </image>
  453. </view>
  454. <view v-else>
  455. <video :src="item" style="width: 200rpx; height: 200rpx; 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: 200rpx; height: 200rpx; margin: 0 12rpx;"
  479. @click="showPhoto(index,'9')">
  480. </image>
  481. </view>
  482. <view v-else>
  483. <video :src="item" style="width: 200rpx; height: 200rpx; 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. getAreaList('').then(res => {
  1078. this.XQList = res.data;
  1079. this.open = true;
  1080. this.selectList = this.XQList;
  1081. })
  1082. } else {
  1083. this.open = true;
  1084. this.selectList = this.XQList;
  1085. }
  1086. } else if (e == 'ld') { //楼栋
  1087. if (this.isEmpty(this.XQValue.id)) {
  1088. this.$modal.msg('请选择小区')
  1089. } else {
  1090. this.open = true;
  1091. this.selectList = this.LDList;
  1092. }
  1093. } else if (e == 'dy') { //单元
  1094. if (this.isEmpty(this.LDValue.id)) {
  1095. this.$modal.msg('请选择楼栋')
  1096. } else {
  1097. this.open = true;
  1098. this.selectList = this.DYList;
  1099. }
  1100. } else if (e == 'fj') { //房间
  1101. if (this.isEmpty(this.DYValue.id)) {
  1102. this.$modal.msg('请选择单元')
  1103. } else {
  1104. this.open = true;
  1105. this.selectList = this.FJList;
  1106. }
  1107. }
  1108. },
  1109. changeSelectDict(item, index) {
  1110. this.openDict = false;
  1111. if (this.type == 'fglx') {
  1112. this.PipeType = item;
  1113. } else if (this.type == 'jqfx') {
  1114. this.direction = item;
  1115. } else if (this.type == 'xzq') {
  1116. this.XZQValue = item;
  1117. //根据行政区id获取小区数据
  1118. this.XQValue = '';
  1119. this.LDValue = '';
  1120. this.DYValue = '';
  1121. this.FJValue = '';
  1122. getAreaList(item.dictValue).then(res => {
  1123. this.XQList = res.data;
  1124. })
  1125. } else if (this.type == 'brank') {
  1126. this.brankValue = item;
  1127. } else if (this.type == 'Model') {
  1128. this.tableModel = item
  1129. }
  1130. },
  1131. changeSelect(item, index) {
  1132. this.open = false;
  1133. if (this.type == 'xq') {
  1134. this.XZQValue = {
  1135. dictValue: item.district,
  1136. dictLabel: item.districtName
  1137. };
  1138. this.XQValue = item;
  1139. //根据小区id 获取楼栋数据
  1140. this.LDValue = '';
  1141. this.DYValue = '';
  1142. this.FJValue = '';
  1143. getBuildingList(item.id).then(res => {
  1144. this.LDList = res.data
  1145. })
  1146. } else if (this.type == 'ld') {
  1147. this.LDValue = item;
  1148. this.DYValue = '';
  1149. this.FJValue = '';
  1150. getUnitList(item.id).then(res => {
  1151. this.DYList = res.data
  1152. })
  1153. } else if (this.type == 'dy') {
  1154. this.DYValue = item; //根据单元数据 获取房间数据
  1155. this.FJValue = ''; //重置房间数据
  1156. getHousesList(item.id).then(res => {
  1157. this.FJList = res.data
  1158. })
  1159. } else if (this.type == 'fj') {
  1160. this.FJValue = item;
  1161. }
  1162. },
  1163. //关闭弹窗
  1164. close(e) {
  1165. this.open = false
  1166. },
  1167. //关闭弹窗
  1168. closeDict(e) {
  1169. this.openDict = false
  1170. },
  1171. }
  1172. }
  1173. </script>
  1174. <style lang="scss">
  1175. .container {
  1176. display: flex;
  1177. align-items: center;
  1178. justify-content: space-between;
  1179. padding: 10px;
  1180. position: relative;
  1181. }
  1182. .uni-list {
  1183. border: 1xp solid #eee;
  1184. }
  1185. .to-right-icon {
  1186. width: 15px;
  1187. height: 15px;
  1188. position: absolute;
  1189. top: 50%;
  1190. transform: translateY(-50%);
  1191. }
  1192. .text {
  1193. font-size: 16px;
  1194. color: #333;
  1195. }
  1196. .background {
  1197. // border: 15px solid hsla(0, 0%, 100%, .5);
  1198. background: white;
  1199. background-clip: padding-box;
  1200. padding: 20rpx;
  1201. border-radius: 20rpx;
  1202. margin: 20rpx;
  1203. /*从padding开始往外面裁剪背景*/
  1204. }
  1205. .btn {
  1206. width: 715rpx;
  1207. height: 69rpx;
  1208. background: #79A4F0;
  1209. border-radius: 6rpx;
  1210. font-size: 25rpx;
  1211. font-family: Microsoft YaHei;
  1212. font-weight: 400;
  1213. color: #FFFFFF;
  1214. line-height: 69rpx;
  1215. margin-top: 40rpx;
  1216. margin-bottom: 100rpx;
  1217. }
  1218. .number {
  1219. display: flex;
  1220. /* 水平居中显示子元素 */
  1221. align-items: flex-start;
  1222. /* 垂直居中显示子元素 */
  1223. justify-content: space-between;
  1224. /* 左右间距等于间距大小 */
  1225. padding: 10px;
  1226. /* 设置padding以提高视觉效果 */
  1227. }
  1228. .textarea {
  1229. margin-top: 10upx;
  1230. width: 100%;
  1231. border: 1rpx solid red;
  1232. min-height: 100upx;
  1233. line-height: 20px;
  1234. }
  1235. checkbox .wx-checkbox-input {
  1236. // border-radius: 50%;
  1237. border-color: #AAAAAA !important;
  1238. width: 30rpx;
  1239. height: 30rpx;
  1240. }
  1241. checkbox .wx-checkbox-input.wx-checkbox-input-checked {
  1242. background: #2D6EFC;
  1243. border-color: #2D6EFC !important;
  1244. color: #fff;
  1245. }
  1246. </style>