indoor.vue 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517
  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 v-for="(user,index) in currentResidentsPhoe" :key="index" class="num-style">
  84. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  85. <spane>现住人电话</spane>
  86. <view style="display: flex; justify-content: flex-end; ">
  87. <input class="uni-input" type="tel" v-model="user.phone" maxlength="11"
  88. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx; "></input>
  89. </view>
  90. </view>
  91. <button v-if="index!=0" @click="this.currentResidentsPhoe.splice(index,1)"
  92. class="sc-btn">删除</button>
  93. </view>
  94. <button @click="this.currentResidentsPhoe.push({phone:''})" class="tj-btn">添加</button>
  95. </view>
  96. </view>
  97. <SelectPicker :list="selectList" @change="changeSelect" v-if="open" @close="close" titleKey="name"
  98. subtitleKey="id" v-model="name"></SelectPicker>
  99. <SelectPicker :list="dictOptions" @change="changeSelectDict" v-if="openDict" @close="closeDict"
  100. titleKey="dictLabel" subtitleKey="dictValue" v-model="dictLabel"></SelectPicker>
  101. </view>
  102. <view class="background">
  103. <view>
  104. <view
  105. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  106. 户主信息
  107. <image v-if="change==false" src="../../../static/images/icon_open.png" @click='change1'
  108. style="display: flex;justify-content:flex-end; margin-right: 10px;width: 15px;height: 15px;">
  109. </image>
  110. <image v-if="change==true" src="../../../static/images/icon_close.png" @click='change1'
  111. style="display: flex;justify-content:flex-end; margin-right: 10px;width: 15px;height: 15px;">
  112. </image>
  113. </view>
  114. </view>
  115. <view v-show="change">
  116. <view class="uni-list">
  117. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  118. <view class="uni-list-cell-left">
  119. 户主姓名
  120. </view>
  121. <view class="uni-list-cell-db" style="margin-top: 10;">
  122. <span style="color: darkgray;" v-model="houseHeadName">{{houseHeadName}}</span>
  123. </view>
  124. </view>
  125. </view>
  126. <view class="uni-list">
  127. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  128. <view class="uni-list-cell-left">
  129. 户主电话
  130. </view>
  131. <view class="uni-list-cell-db" style="margin-top: 10;">
  132. <span style="color: darkgray;" v-model="houseHeadPhone">{{houseHeadPhone}}</span>
  133. </view>
  134. </view>
  135. </view>
  136. <view class="uni-list">
  137. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  138. <view class="uni-list-cell-left">
  139. 户主身份证号码
  140. </view>
  141. <view class="uni-list-cell-db" style="margin-top: 10;">
  142. <span style="color: darkgray;"
  143. v-model="houseHeadIDcardNumber">{{houseHeadIDcardNumber}}</span>
  144. </view>
  145. </view>
  146. </view>
  147. </view>
  148. </view>
  149. <!--报警器切断阀-->
  150. <view class="background">
  151. <view v-if="objValue.enginClassValue=='报警器'||objValue.enginClassValue=='切断阀'">
  152. <view class="uni-list">
  153. <view
  154. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between; margin-bottom: 10px;">
  155. {{objValue.enginClassValue}}
  156. <span
  157. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  158. @click="history">历史</span>
  159. </view>
  160. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  161. <text>厂 家</text>
  162. <view v-if="this.isEmpty(this.brandValue.dictValue)" style="margin-top: 10;"
  163. @click="pickerShow('brand')">
  164. <span style="color: darkgray;">请选择厂家</span>
  165. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  166. </view>
  167. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('brand')">
  168. <span style="color: black;">{{brandValue.dictLabel}}</span>
  169. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  170. </view>
  171. </view>
  172. </view>
  173. </view>
  174. <!--拆旧管-->
  175. <view v-if="objValue.enginClassValue=='拆旧管'">
  176. <view class="uni-list">
  177. <view
  178. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  179. 拆旧管
  180. <span
  181. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  182. @click="history">历史</span>
  183. </view>
  184. <view class="container" style="margin-bottom: 20PX;border-bottom: 1px solid #f8f8f8;">
  185. <view>
  186. 腐蚀等级
  187. </view>
  188. <view v-if="this.isEmpty(this.LevelValue.dictValue)" style="margin-top: 10;"
  189. @click="pickerShow('fsdj')">
  190. <span style="color: darkgray;">请选择腐蚀等级</span>
  191. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  192. </view>
  193. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('fsdj')">
  194. <span style="color: black;">{{LevelValue.dictLabel}}</span>
  195. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  196. </view>
  197. </view>
  198. </view>
  199. </view>
  200. <view v-if="objValue.enginClassValue=='打孔'">
  201. <view class="uni-list">
  202. <view
  203. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  204. 打孔
  205. <span
  206. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  207. @click="history">历史</span>
  208. </view>
  209. <view class="container" style="margin-bottom: 20PX;border-bottom: 1px solid #f8f8f8;">
  210. <view>
  211. 孔距
  212. </view>
  213. <view v-if="this.isEmpty(this.LevelValue.dictValue)" style="margin-top: 10;"
  214. @click="pickerShow('kj')">
  215. <span style="color: darkgray;">请选择孔距</span>
  216. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  217. </view>
  218. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('kj')">
  219. <span style="color: black;">{{LevelValue.dictLabel}}</span>
  220. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. <!--立杠-->
  226. <view v-else-if="objValue.enginClassValue=='立杠'">
  227. <view class="uni-list" style="margin-bottom: 20px;">
  228. <view
  229. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  230. 立杠
  231. <span
  232. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  233. @click="history">历史</span>
  234. </view>
  235. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  236. <view>
  237. 材 质
  238. </view>
  239. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;"
  240. @click="pickerShow('cz')">
  241. <span style="color: darkgray;">请选择材质</span>
  242. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  243. </view>
  244. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  245. <span style="color: black;">{{materialValue.name}}</span>
  246. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  247. </view>
  248. </view>
  249. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  250. <view>
  251. 规 格
  252. </view>
  253. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;"
  254. @click="pickerShow('gg')">
  255. <span style="color: darkgray;">请选择规格</span>
  256. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  257. </view>
  258. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  259. <span style="color: black;">{{specificationValue.name}}</span>
  260. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  261. </view>
  262. </view>
  263. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  264. <text>米 数</text>
  265. <!-- style="margin-left: 10px;text-align: right;" -->
  266. <view style="display: flex; justify-content: right; width: 70%;">
  267. <input class="uni-input" type="number" v-model="inputIntegerNumberValue" maxlength="6"
  268. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  269. <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
  270. <input class="uni-input" type="number" v-model="inputDecimalNumberValue" maxlength="1"
  271. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  272. </view>
  273. </view>
  274. </view>
  275. </view>
  276. <!--挂表-->
  277. <view v-else-if="objValue.enginClassValue=='挂表'">
  278. <view class="uni-list" style="margin-bottom: 20px;">
  279. <view
  280. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  281. 挂表
  282. <span
  283. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  284. @click="history">历史</span>
  285. </view>
  286. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  287. <view>
  288. 品 牌
  289. </view>
  290. <view v-if="this.isEmpty(this.brandValue.dictValue)" style="margin-top: 10;"
  291. @click="pickerShow('brand')">
  292. <span style="color: darkgray;">请选择品牌</span>
  293. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  294. </view>
  295. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('brand')">
  296. <span style="color: black;">{{brandValue.dictLabel}}</span>
  297. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  298. </view>
  299. </view>
  300. </view>
  301. </view>
  302. <!--表后管-->
  303. <view v-else-if="objValue.enginClassValue=='表后管'">
  304. <view class="uni-list" style="margin-bottom: 20px;">
  305. <view
  306. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  307. 表后管
  308. <span
  309. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  310. @click="history">历史</span>
  311. </view>
  312. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  313. <view>
  314. 材 质
  315. </view>
  316. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;"
  317. @click="pickerShow('cz')">
  318. <span style="color: darkgray;">请选择材质</span>
  319. </view>
  320. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  321. <span style="color: black;">{{materialValue.name}}</span>
  322. </view>
  323. </view>
  324. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  325. <view>
  326. 规 格
  327. </view>
  328. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;"
  329. @click="pickerShow('gg')">
  330. <span style="color: darkgray;">请选择规格</span>
  331. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  332. </view>
  333. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  334. <span style="color: black;">{{specificationValue.name}}</span>
  335. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  336. </view>
  337. </view>
  338. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  339. <text>米 数</text>
  340. <!-- style="margin-left: 10px;text-align: right;" -->
  341. <view style="display: flex; justify-content: right; width: 70%;">
  342. <input class="uni-input" type="number" v-model="inputIntegerNumberValue" maxlength="6"
  343. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  344. <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
  345. <input class="uni-input" type="number" v-model="inputDecimalNumberValue" maxlength="1"
  346. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  347. </view>
  348. </view>
  349. </view>
  350. </view>
  351. <!--阀管-->
  352. <view v-else-if="objValue.enginClassValue=='阀管'">
  353. <view class="uni-list" style="margin-bottom: 20px;">
  354. <view
  355. style="font-size: 16px;margin-left: 10px;margin-top: 10px;display: flex; justify-content: space-between;margin-bottom: 10px;">
  356. 阀管
  357. <span
  358. style="color: blue;font-size: 14px; display: flex;justify-content:flex-end; margin-right: 10px;"
  359. @click="history">历史</span>
  360. </view>
  361. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  362. <view>
  363. 上门类型
  364. </view>
  365. <view v-if="this.isEmpty(this.doorValue.dictValue)" style="margin-top: 10;"
  366. @click="pickerShow('door')">
  367. <span style="color: darkgray;">请选择上门类型</span>
  368. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  369. </view>
  370. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('door')">
  371. <span style="color: black;">{{doorValue.dictLabel}}</span>
  372. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  373. </view>
  374. </view>
  375. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  376. <view>
  377. 自闭阀厂家
  378. </view>
  379. <view v-if="this.isEmpty(this.SelfClosValve.dictValue)" style="margin-top: 10;"
  380. @click="pickerShow('zbf')">
  381. <span style="color: darkgray;">请选择自闭阀厂家</span>
  382. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  383. </view>
  384. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('zbf')">
  385. <span style="color: black;">{{SelfClosValve.dictLabel}}</span>
  386. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  387. </view>
  388. </view>
  389. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  390. <view>
  391. 灶具管厂家
  392. </view>
  393. <view v-if="this.isEmpty(this.materialValue.id)" style="margin-top: 10;"
  394. @click="pickerShow('cz')">
  395. <span style="color: darkgray;">请选择灶具管厂家</span>
  396. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  397. </view>
  398. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('cz')">
  399. <span style="color: black;">{{materialValue.name}}</span>
  400. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  401. </view>
  402. </view>
  403. <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  404. <view>
  405. 规 格
  406. </view>
  407. <view v-if="this.isEmpty(this.specificationValue.id)" style="margin-top: 10;"
  408. @click="pickerShow('gg')">
  409. <span style="color: darkgray;">请选择规格</span>
  410. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  411. </view>
  412. <view v-else class="uni-list-cell-db" style="margin-top: 10;" @click="pickerShow('gg')">
  413. <span style="color: black;">{{specificationValue.name}}</span>
  414. <image :src="loadImgSrc('icon_right.png')" class="to-right-icon"></image>
  415. </view>
  416. </view>
  417. <!-- <view class="container" style="border-bottom: 1px solid #f8f8f8;">
  418. <text>米 数</text>
  419. <view style="display: flex; justify-content: right; width: 70%;">
  420. <input class="uni-input" type="number" v-model="inputIntegerNumberValue" maxlength="6"
  421. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  422. <text style="font-weight:bold;margin-left: 10px;margin-right: 10px;">.</text>
  423. <input class="uni-input" type="number" v-model="inputDecimalNumberValue" maxlength="1"
  424. style="text-align: center; border: 1px solid #00aaff; border-radius: 20rpx;"></input>
  425. </view>
  426. </view> -->
  427. </view>
  428. </view>
  429. <view class="align-items" style="margin-top: 20px;margin-bottom: 20px;">
  430. <view class="container" style="color: #b2b2b2;">*请上传照片</view>
  431. <view class="" style="display: flex; flex-wrap: wrap;margin-top: 10px; margin-left: 10px;">
  432. <image :src="loadImgSrc('updateimg.png')" mode=""
  433. style="width: 200rpx; height: 150rpx; margin: 0 12rpx;; " @click="choose()"
  434. v-show="reviewStatus!='1'"></image>
  435. <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
  436. <view
  437. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  438. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  439. @click="showPhoto(index)">
  440. </image>
  441. </view>
  442. <view v-else>
  443. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  444. </view>
  445. <view @click="remove(index)"
  446. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  447. <image :src="loadImgSrc('icon_close.png')" style=" width: 15px; height: 15px;">
  448. </image>
  449. </view>
  450. </view>
  451. </view>
  452. </view>
  453. </view>
  454. <view class="action-btn" v-show="reviewStatus!='1'">
  455. <button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
  456. </view>
  457. <bottom-sheet ref="refShare" :data="historyList"></bottom-sheet>
  458. </scroll-view>
  459. </template>
  460. <script>
  461. import SelectPicker from '../../../components/selectPicker/select_picker.vue'
  462. import bottomSheet from '../../../components/bottomSheet/bottomSheet.vue'
  463. import {
  464. getDicts
  465. } from "@/api/system/dict/data";
  466. import {
  467. getAreaList,
  468. getBuildingList,
  469. getUnitList,
  470. getHousesList,
  471. addTearOldPipe,
  472. getEnginMaterialQualityList,
  473. getEnginSpecificationsList,
  474. getRoomProjectList,
  475. getRoomProjectId,
  476. } from '@/api/common'
  477. import {
  478. getToken
  479. } from '../../../utils/auth';
  480. import {
  481. showConfirm
  482. } from '../../../utils/common';
  483. export default {
  484. components: {
  485. SelectPicker,
  486. bottomSheet
  487. },
  488. data() {
  489. return {
  490. headers: {
  491. Authorization: "Bearer " + getToken()
  492. },
  493. houseHeadName: '',
  494. houseHeadPhone: '',
  495. houseHeadIDcardNumber: '',
  496. type: '',
  497. change: false,
  498. open: false,
  499. reviewStatus: '', //是否可以点击
  500. objValue: '', //上一页面传过来的值 新增接口用
  501. openDict: false,
  502. selectList: [],
  503. dictOptions: [],
  504. imgArr: [],
  505. XQValue: {},
  506. XZQValue: {},
  507. projectValue: {
  508. 'dictValue': '0'
  509. },
  510. currentResidentsPhoe: [{
  511. phone: ''
  512. }],
  513. LevelValue: {},
  514. LDValue: {},
  515. DYValue: {},
  516. FJValue: {},
  517. FSValue: {},
  518. specificationValue: {}, //规格
  519. materialValue: {}, //材质
  520. brandValue: {}, //品牌
  521. doorValue: {}, //上门类型
  522. SelfClosValve: {}, //自闭阀类型
  523. materialList: '', //材质list
  524. XQList: '',
  525. LDList: '',
  526. DYList: '',
  527. FJList: '',
  528. progress: 0, //上传图片进度百分比
  529. loading: false,
  530. isCheck: true, //是否按照施工图纸施工
  531. inputNumberValue: '',
  532. inputIntegerNumberValue: '',
  533. inputDecimalNumberValue: '',
  534. title: '',
  535. historyList: {} //历史数据
  536. }
  537. },
  538. created() {
  539. },
  540. onLoad(options) {
  541. if ('params' in options) {
  542. this.objValue = JSON.parse(decodeURIComponent(options.params));
  543. if (this.objValue.enginType == `old_renovation`) {
  544. this.title = '旧改工程-室内'
  545. } else if (this.objValue.enginType == `new_built`) {
  546. this.title = '新建工程-室内'
  547. }
  548. uni.setNavigationBarTitle({
  549. title: this.title
  550. })
  551. }
  552. },
  553. methods: {
  554. //判断是否选择
  555. isEmpty(str) {
  556. return (!str || 0 === str.length);
  557. },
  558. change1() {
  559. this.change = !this.change
  560. },
  561. // 显示历史弹窗
  562. handleShowSheet() {
  563. this.shareState = true;
  564. },
  565. // 隐藏历史弹窗
  566. handleHiddenShare() {
  567. this.shareState = false;
  568. },
  569. showPhoto(index) {
  570. uni.previewImage({
  571. current: index,
  572. urls: this.imgArr,
  573. })
  574. },
  575. remove(index) {
  576. uni.showModal({
  577. title: '提示',
  578. content: '是否删除该图片或视频?',
  579. success: (res) => {
  580. if (res.confirm) {
  581. this.imgArr.splice(index, 1)
  582. if (this.imgArr.length <= 0) {
  583. this.photo = true;
  584. }
  585. }
  586. }
  587. })
  588. },
  589. choose() {
  590. let _this = this;
  591. uni.showActionSheet({
  592. title: '上传',
  593. itemList: ['图片', '视频'],
  594. success: (res) => {
  595. if (res.tapIndex == 0) {
  596. this.chooseimage()
  597. } else {
  598. this.choosevideo()
  599. }
  600. }
  601. })
  602. },
  603. chooseimage() {
  604. let _this = this;
  605. uni.chooseImage({
  606. sizeType: ['album', 'camera'],
  607. success(resp) {
  608. resp.tempFiles.forEach((item, index) => {
  609. const task = uni.uploadFile({
  610. url: _this.$HTTP + `/obs`,
  611. filePath: item.path,
  612. name: 'file',
  613. formData: {},
  614. header: _this.headers,
  615. success: res => {
  616. // 判断是否json字符串,将其转为json格式
  617. // let data = _this.$u.test.jsonString(res
  618. // .data) ? JSON.parse(res.data) : res.data;
  619. let data = JSON.parse(res.data);
  620. if (![200].includes(data.code)) {
  621. // this.uploadError(index, data);
  622. _this.$modal.msg(data.msg)
  623. } else {
  624. if (_this.progress === 100) {
  625. _this.imgArr.push(data.data.url)
  626. _this.$modal.msg('上传成功!')
  627. _this.photo = false;
  628. }
  629. }
  630. },
  631. fail: e => {
  632. _this.$modal.msg('上传失败!')
  633. //_this.uploadError(index, e);
  634. },
  635. complete: res => {
  636. uni.hideLoading();
  637. _this.uploading = false;
  638. }
  639. });
  640. task.onProgressUpdate(res => {
  641. _this.progress = res.progress;
  642. uni.showLoading({
  643. title: '上传中'
  644. })
  645. if (_this.progress != 100) {
  646. _this.loading = false
  647. } else {
  648. _this.loading = true
  649. }
  650. });
  651. })
  652. },
  653. })
  654. },
  655. choosevideo() {
  656. let _this = this;
  657. uni.chooseVideo({
  658. sourceType: ['album', 'camera'],
  659. maxDuration: 30,
  660. success(resp) {
  661. const task = uni.uploadFile({
  662. url: _this.$HTTP + `/obs`,
  663. filePath: resp.tempFilePath,
  664. name: 'file',
  665. formData: {},
  666. header: _this.headers,
  667. success: res => {
  668. // 判断是否json字符串,将其转为json格式
  669. let data = JSON.parse(res.data);
  670. if (![200].includes(res.statusCode)) {
  671. this.uploadError(index, data);
  672. } else {
  673. //上传成功
  674. if (_this.progress === 100) {
  675. _this.imgArr.push(data.data.url)
  676. _this.$modal.msg('上传成功!')
  677. _this.photo = false;
  678. }
  679. }
  680. },
  681. fail: e => {
  682. _this.$modal.msg('上传失败!')
  683. this.uploadError(index, e);
  684. },
  685. complete: res => {
  686. uni.hideLoading();
  687. _this.uploading = false;
  688. }
  689. });
  690. task.onProgressUpdate(res => {
  691. _this.progress = res.progress;
  692. uni.showLoading({
  693. title: '上传中'
  694. })
  695. if (_this.progress != 100) {
  696. _this.loading = false
  697. } else {
  698. _this.loading = true
  699. }
  700. });
  701. },
  702. })
  703. },
  704. pickerShow(e) {
  705. this.type = e; //赋值类型
  706. if (e == 'door') { //上门类型
  707. this.openDict = true;
  708. getDicts("visit_type").then(response => {
  709. this.dictOptions = response.data;
  710. });
  711. } else if (e == 'zbf') { //自闭阀类型
  712. this.openDict = true;
  713. getDicts("self_closing_valve_type").then(response => {
  714. this.dictOptions = response.data;
  715. });
  716. } else if (e == 'brand') { //品牌
  717. this.openDict = true;
  718. getDicts("brand").then(response => {
  719. this.dictOptions = response.data;
  720. });
  721. } else if (e == 'cz') { //材质
  722. this.open = true;
  723. getEnginMaterialQualityList("民用工程").then(response => {
  724. this.selectList = response.data;
  725. });
  726. } else if (e == 'gg') { //规格
  727. if (this.isEmpty(this.materialValue.id)) {
  728. if (this.objValue.enginClassValue == '阀管') {
  729. this.$modal.msg('请选择灶具管厂家')
  730. } else {
  731. this.$modal.msg('请选择材质')
  732. }
  733. } else {
  734. this.open = true;
  735. this.selectList = this.materialList;
  736. }
  737. } else if (e == 'fsdj') {
  738. //腐蚀等级
  739. this.openDict = true;
  740. //腐蚀等级
  741. getDicts("corrosion_level").then(response => {
  742. this.dictOptions = response.data;
  743. });
  744. } else if (e == 'kj') {
  745. //孔距
  746. this.openDict = true;
  747. getDicts("perforated_pipe_diameter").then(response => {
  748. this.dictOptions = response.data;
  749. });
  750. } else if (e == 'gczq') { //工程周期
  751. this.openDict = true;
  752. getDicts("engin_cycle").then(response => {
  753. this.dictOptions = response.data;
  754. });
  755. } else if (e == 'xzq') { //行政区
  756. if (this.isEmpty(this.projectValue.dictValue)) {
  757. this.$modal.msg('请选择工程周期')
  758. } else {
  759. this.openDict = true;
  760. getDicts("district").then(response => {
  761. this.dictOptions = response.data;
  762. });
  763. }
  764. //this.selectList = this.dictOptions;
  765. } else if (e == 'xq') { //小区
  766. if (this.isEmpty(this.XZQValue.dictValue)) {
  767. this.$modal.msg('请选择行政区')
  768. } else {
  769. this.open = true;
  770. this.selectList = this.XQList;
  771. }
  772. } else if (e == 'ld') { //楼栋
  773. if (this.isEmpty(this.XQValue.id)) {
  774. this.$modal.msg('请选择小区')
  775. } else {
  776. this.open = true;
  777. this.selectList = this.LDList;
  778. }
  779. } else if (e == 'dy') { //单元
  780. if (this.isEmpty(this.LDValue.id)) {
  781. this.$modal.msg('请选择楼栋')
  782. } else {
  783. this.open = true;
  784. this.selectList = this.DYList;
  785. }
  786. } else if (e == 'fj') { //房间
  787. if (this.isEmpty(this.DYValue.id)) {
  788. this.$modal.msg('请选择单元')
  789. } else {
  790. this.open = true;
  791. this.selectList = this.FJList;
  792. }
  793. }
  794. },
  795. switchChange(e) {
  796. //'switch 发生 change 事件,携带值为', e.detail.value)
  797. this.isCheck = e.detail.value;
  798. },
  799. changeSelectDict(item, index) {
  800. this.openDict = false;
  801. if (this.type == 'door') {
  802. this.doorValue = item
  803. } else if (this.type == 'zbf') {
  804. this.SelfClosValve = item
  805. } else if (this.type == 'brand') {
  806. this.brandValue = item
  807. } else if (this.type == 'gczq') {
  808. this.projectValue = item
  809. if (!this.isEmpty(this.FJValue.id)) {
  810. //房间选完 判断 工程周期 工程周期切换
  811. this.getStatus();
  812. }
  813. } else if (this.type == 'xzq') {
  814. this.XZQValue = item;
  815. //根据行政区id获取小区数据
  816. this.XQValue = ''; //重置小区数据
  817. this.LDValue = ''; //重置楼栋数据
  818. this.DYValue = ''; //重置单元数据
  819. this.FJValue = ''; //重置房间数据
  820. getAreaList(item.dictValue).then(res => {
  821. this.XQList = res.data;
  822. })
  823. } else {
  824. this.LevelValue = item;
  825. }
  826. },
  827. changeSelect(item, index) {
  828. // this.index = index;
  829. // this.address = item.communityName;
  830. this.open = false;
  831. if (this.type == 'cz') {
  832. this.materialValue = item;
  833. this.specificationValue = ''; //重置规格
  834. //根据材质ID 获取规格数据
  835. getEnginSpecificationsList(item.id).then(res => {
  836. this.materialList = res.data
  837. })
  838. } else if (this.type == 'gg') {
  839. this.specificationValue = item;
  840. var onlyNumbers = item.name.replace(/[^\d.]/g, '');
  841. console.log(onlyNumbers); // 输出: "123456"
  842. } else if (this.type == 'xq') {
  843. this.XQValue = item;
  844. //根据小区id 获取楼栋数据
  845. this.LDValue = ''; //重置楼栋数据
  846. this.DYValue = ''; //重置单元数据
  847. this.FJValue = ''; //重置房间数据
  848. getBuildingList(item.id).then(res => {
  849. this.LDList = res.data
  850. })
  851. } else if (this.type == 'ld') {
  852. this.LDValue = item;
  853. //根据楼栋ID 获取单元数据
  854. this.DYValue = ''; //重置单元数据
  855. this.FJValue = ''; //重置房间数据
  856. getUnitList(item.id).then(res => {
  857. this.DYList = res.data
  858. })
  859. } else if (this.type == 'dy') {
  860. this.DYValue = item;
  861. //根据单元数据 获取房间数据
  862. this.FJValue = ''; //重置房间数据
  863. getHousesList(item.id).then(res => {
  864. this.FJList = res.data
  865. })
  866. } else if (this.type == 'fj') {
  867. this.FJValue = item;
  868. this.houseHeadName = 'dda';
  869. this.houseHeadPhone = '125';
  870. this.houseHeadIDcardNumber = '335';
  871. if (!this.isEmpty(this.projectValue.dictValue)) {
  872. //房间选完 判断 工程周期
  873. this.getStatus();
  874. }
  875. }
  876. },
  877. //关闭弹窗
  878. close(e) {
  879. this.open = false
  880. },
  881. //关闭弹窗
  882. closeDict(e) {
  883. this.openDict = false
  884. },
  885. getStatus() {
  886. let param = {
  887. areaId: this.XQValue.id, // 小区id
  888. buildingId: this.LDValue.id, // 楼宇id
  889. unitId: this.DYValue.id, // 单元id
  890. houseId: this.FJValue.id, // 房间id
  891. enginCycle: this.projectValue.dictValue, // 工程周期
  892. enginType: this.objValue.enginType, //写死 上一页面传过来的
  893. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  894. }
  895. getRoomProjectId(param).then(res => {
  896. if (res.code == '200') {
  897. if (res.data != null && res.data.zEngineeringNodeBoList != null) {
  898. res.data.zEngineeringNodeBoList.forEach((item, index) => {
  899. if (this.objValue.enginClassValue == item.type) {
  900. this.reviewStatus = item.reviewStatus;
  901. if (item.reviewStatus == '1')
  902. this.$modal.msg('当前工程已结束')
  903. }
  904. })
  905. } else {
  906. this.reviewStatus = '' //置空
  907. }
  908. } else {
  909. this.$modal.msg(res.msg)
  910. this.reviewStatus = '' //置空
  911. }
  912. })
  913. },
  914. //提交数据
  915. submit() {
  916. if (this.isEmpty(this.projectValue.dictValue)) {
  917. this.$modal.msg("请选择工程周期")
  918. return
  919. }
  920. if (this.isEmpty(this.XZQValue.dictValue)) {
  921. this.$modal.msg("请选择行政区")
  922. return
  923. }
  924. if (this.isEmpty(this.XQValue.id)) {
  925. this.$modal.msg("请选择小区")
  926. return
  927. }
  928. if (this.isEmpty(this.LDValue.id)) {
  929. this.$modal.msg("请选择楼栋")
  930. return
  931. }
  932. if (this.isEmpty(this.DYValue.id)) {
  933. this.$modal.msg("请选择单元")
  934. return
  935. }
  936. if (this.isEmpty(this.FJValue.id)) {
  937. this.$modal.msg("请选择房间")
  938. return
  939. }
  940. try {
  941. this.currentResidentsPhoe.forEach((list) => {
  942. if (this.isEmpty(list.phone)) {
  943. this.$modal.msg('现住人电话不能为空')
  944. throw new Error('End Loop')
  945. }
  946. })
  947. } catch (e) {
  948. if (e.message === 'End Loop') throw e
  949. }
  950. if (this.objValue.enginClassValue == '报警器' || this.objValue.enginClassValue == '切断阀') {
  951. if (this.isEmpty(this.brandValue.dictValue)) {
  952. this.$modal.msg("请选择厂家")
  953. } else {
  954. this.onsubmit();
  955. }
  956. } else if (this.objValue.enginClassValue == '打孔') {
  957. if (this.isEmpty(this.LevelValue.dictValue)) {
  958. this.$modal.msg("请选择孔距") //打孔 判断孔距
  959. } else {
  960. this.onsubmit();
  961. }
  962. } else if (this.objValue.enginClassValue == '拆旧管') {
  963. if (this.isEmpty(this.LevelValue.dictValue)) {
  964. this.$modal.msg("请选择腐蚀等级") //拆旧管 判断腐蚀等级
  965. } else {
  966. this.onsubmit();
  967. }
  968. } else if (this.objValue.enginClassValue == '立杠') {
  969. //立杠 判断 材质 规格 米数
  970. if (this.isEmpty(this.materialValue.id)) {
  971. this.$modal.msg("请选择材质")
  972. } else if (this.isEmpty(this.specificationValue.id)) {
  973. this.$modal.msg("请选择规格")
  974. } else if (this.isEmpty(this.inputIntegerNumberValue)) {
  975. this.$modal.msg("请输入米数")
  976. } else {
  977. if (this.isEmpty(this.inputDecimalNumberValue)) {
  978. this.inputNumberValue = this.inputIntegerNumberValue;
  979. } else {
  980. this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
  981. }
  982. this.onsubmit();
  983. }
  984. } else if (this.objValue.enginClassValue == '挂表') {
  985. //挂表 判断 品牌
  986. if (this.isEmpty(this.brandValue.dictValue)) {
  987. this.$modal.msg("请选择品牌")
  988. } else {
  989. this.onsubmit();
  990. }
  991. } else if (this.objValue.enginClassValue == '表后管') {
  992. //表后管 判断 材质 规格 米数 (为必须有一张照片和一个视频)
  993. if (this.isEmpty(this.materialValue.id)) {
  994. this.$modal.msg("请选择材质")
  995. } else if (this.isEmpty(this.specificationValue.id)) {
  996. this.$modal.msg("请选择规格")
  997. } else if (this.isEmpty(this.inputIntegerNumberValue)) {
  998. this.$modal.msg("请输入米数")
  999. } else if (this.imgArr.length <= 0) {
  1000. this.$modal.msg('请上传照片或视频')
  1001. } else if (this.loading == false) {
  1002. this.$modal.msg('照片或视频未上传完毕,无法提交!')
  1003. } else {
  1004. const hasImage = this.imgArr.some(item => item.endsWith('.jpg') || item.endsWith(
  1005. '.png') || item
  1006. .endsWith('.jpeg') || item.endsWith('.JPG') || item.endsWith('.PNG') || item
  1007. .endsWith('.JPEG'));
  1008. const hasVideo = this.imgArr.some(item => item.endsWith('.mp4') || item.endsWith('.MP4'));
  1009. if (hasImage && hasVideo) {
  1010. //表后管 特殊 提交
  1011. if (this.isEmpty(this.inputDecimalNumberValue)) {
  1012. this.inputNumberValue = this.inputIntegerNumberValue;
  1013. } else {
  1014. this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
  1015. }
  1016. let param = {
  1017. district: this.XZQValue.dictValue,
  1018. areaId: this.XQValue.id,
  1019. buildingId: this.LDValue.id,
  1020. unitId: this.DYValue.id,
  1021. houseId: this.FJValue.id,
  1022. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1023. enginClassification: this.objValue
  1024. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1025. enginCycle: this.projectValue.dictValue, //工程周期
  1026. zEngineeringNodeBo: {
  1027. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1028. zEngineeringInfoBo: {
  1029. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1030. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1031. zEngineeringMaterialBo: [{
  1032. materialQuality: this.materialValue.id, //材质
  1033. specifications: this.specificationValue.id, //规格
  1034. number: this.inputNumberValue //米数
  1035. }]
  1036. }
  1037. }
  1038. }
  1039. uni.showLoading()
  1040. addTearOldPipe(param).then(res => {
  1041. if (res.code == '200') {
  1042. uni.hideLoading()
  1043. uni.showToast({
  1044. title: res.msg,
  1045. icon: 'none',
  1046. //显示持续时间为 1秒
  1047. duration: 1000
  1048. });
  1049. uni.navigateBack();
  1050. }
  1051. })
  1052. } else {
  1053. this.$modal.msg('请至少上传一张照片和一个视频')
  1054. }
  1055. }
  1056. } else if (this.objValue.enginClassValue == '阀管') {
  1057. //阀管 判断 材质 规格 米数
  1058. if (this.isEmpty(this.doorValue.dictValue)) {
  1059. this.$modal.msg("请选择上门类型")
  1060. } else if (this.isEmpty(this.SelfClosValve.dictValue)) {
  1061. this.$modal.msg("请选择自闭阀厂家")
  1062. } else if (this.isEmpty(this.materialValue.id)) {
  1063. this.$modal.msg("请选择材质")
  1064. } else if (this.isEmpty(this.specificationValue.id)) {
  1065. this.$modal.msg("请选择规格")
  1066. } else if (this.isEmpty(this.inputIntegerNumberValue)) {
  1067. this.$modal.msg("请输入米数")
  1068. } else {
  1069. if (this.isEmpty(this.inputDecimalNumberValue)) {
  1070. this.inputNumberValue = this.inputIntegerNumberValue;
  1071. } else {
  1072. this.inputNumberValue = this.inputIntegerNumberValue + "." + this.inputDecimalNumberValue;
  1073. }
  1074. this.onsubmit();
  1075. }
  1076. }
  1077. },
  1078. onsubmit() {
  1079. if (this.imgArr.length <= 0) {
  1080. this.$modal.msg('请上传照片或视频')
  1081. } else if (this.loading == false) {
  1082. this.$modal.msg('照片或视频未上传完毕,无法提交!')
  1083. } else {
  1084. //提交
  1085. let param = ';'
  1086. if (this.objValue.enginClassValue == '拆旧管' || this.objValue.enginClassValue ==
  1087. '打孔') { //拆旧管 打孔
  1088. param = {
  1089. district: this.XZQValue.dictValue,
  1090. areaId: this.XQValue.id,
  1091. buildingId: this.LDValue.id,
  1092. unitId: this.DYValue.id,
  1093. houseId: this.FJValue.id,
  1094. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1095. enginClassification: this.objValue
  1096. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1097. enginCycle: this.projectValue.dictValue, //工程周期
  1098. zEngineeringNodeBo: {
  1099. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1100. zEngineeringInfoBo: {
  1101. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1102. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1103. zEngineeringMaterialBo: [{
  1104. corrosionLevel: this.LevelValue.dictValue //腐蚀等级 //孔距
  1105. }]
  1106. }
  1107. }
  1108. }
  1109. //this.onsubmit(param)
  1110. } else if (this.objValue.enginClassValue == '报警器' || this.objValue.enginClassValue ==
  1111. '切断阀') { //报警器切断阀
  1112. param = {
  1113. district: this.XZQValue.dictValue,
  1114. areaId: this.XQValue.id,
  1115. buildingId: this.LDValue.id,
  1116. unitId: this.DYValue.id,
  1117. houseId: this.FJValue.id,
  1118. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1119. enginClassification: this.objValue
  1120. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1121. enginCycle: this.projectValue.dictValue, //工程周期
  1122. zEngineeringNodeBo: {
  1123. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1124. zEngineeringInfoBo: {
  1125. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1126. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1127. zEngineeringMaterialBo: [{
  1128. brand: this.brandValue.dictValue, //品牌
  1129. // number: this.inputNumberValue //米数
  1130. }]
  1131. }
  1132. }
  1133. }
  1134. } else if (this.objValue.enginClassValue == '立杠') { //立杠
  1135. param = {
  1136. district: this.XZQValue.dictValue,
  1137. areaId: this.XQValue.id,
  1138. buildingId: this.LDValue.id,
  1139. unitId: this.DYValue.id,
  1140. houseId: this.FJValue.id,
  1141. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1142. enginClassification: this.objValue
  1143. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1144. enginCycle: this.projectValue.dictValue, //工程周期
  1145. zEngineeringNodeBo: {
  1146. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1147. zEngineeringInfoBo: {
  1148. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1149. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1150. zEngineeringMaterialBo: [{
  1151. materialQuality: this.materialValue.id, //材质
  1152. specifications: this.specificationValue.id, //规格
  1153. number: this.inputNumberValue //米数
  1154. }]
  1155. }
  1156. }
  1157. }
  1158. } else if (this.objValue.enginClassValue == '挂表') { //挂表
  1159. param = {
  1160. district: this.XZQValue.dictValue,
  1161. areaId: this.XQValue.id,
  1162. buildingId: this.LDValue.id,
  1163. unitId: this.DYValue.id,
  1164. houseId: this.FJValue.id,
  1165. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1166. enginClassification: this.objValue
  1167. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1168. enginCycle: this.projectValue.dictValue, //工程周期
  1169. zEngineeringNodeBo: {
  1170. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1171. zEngineeringInfoBo: {
  1172. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1173. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1174. zEngineeringMaterialBo: [{
  1175. brand: this.brandValue.dictValue, //品牌
  1176. //number: this.inputNumberValue //米数
  1177. }]
  1178. }
  1179. }
  1180. }
  1181. } else if (this.objValue.enginClassValue == '阀管') { //自闭阀
  1182. param = {
  1183. district: this.XZQValue.dictValue,
  1184. areaId: this.XQValue.id,
  1185. buildingId: this.LDValue.id,
  1186. unitId: this.DYValue.id,
  1187. houseId: this.FJValue.id,
  1188. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1189. enginClassification: this.objValue
  1190. .enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1191. enginCycle: this.projectValue.dictValue, //工程周期
  1192. zEngineeringNodeBo: {
  1193. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1194. zEngineeringInfoBo: {
  1195. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1196. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1197. zEngineeringMaterialBo: [{
  1198. visitType: this.doorValue.dictValue, //上门类型
  1199. selfClosingValveType: this.SelfClosValve.dictValue, //自闭阀类型
  1200. materialQuality: this.materialValue.id, //材质
  1201. specifications: this.specificationValue.id, //规格
  1202. number: this.inputNumberValue //米数
  1203. }]
  1204. }
  1205. }
  1206. }
  1207. }
  1208. uni.showLoading()
  1209. addTearOldPipe(param).then(res => {
  1210. if (res.code == '200') {
  1211. uni.hideLoading()
  1212. uni.showToast({
  1213. title: res.msg,
  1214. icon: 'none',
  1215. //显示持续时间为 3秒
  1216. duration: 2000
  1217. });
  1218. setTimeout(function() {
  1219. uni.navigateBack();
  1220. }, 1000)
  1221. }
  1222. })
  1223. }
  1224. },
  1225. history() {
  1226. if (this.isEmpty(this.projectValue.dictValue)) {
  1227. this.$modal.msg("请选择工程周期")
  1228. return
  1229. }
  1230. if (this.isEmpty(this.XZQValue.dictValue)) {
  1231. this.$modal.msg("请选择行政区")
  1232. return
  1233. }
  1234. if (this.isEmpty(this.XQValue.id)) {
  1235. this.$modal.msg("请选择小区")
  1236. return
  1237. }
  1238. if (this.isEmpty(this.LDValue.id)) {
  1239. this.$modal.msg("请选择楼栋")
  1240. return
  1241. }
  1242. if (this.isEmpty(this.DYValue.id)) {
  1243. this.$modal.msg("请选择单元")
  1244. return
  1245. }
  1246. if (this.isEmpty(this.FJValue.id)) {
  1247. this.$modal.msg("请选择房间")
  1248. return
  1249. }
  1250. let param = {
  1251. areaId: this.XQValue.id, // 小区id
  1252. buildingId: this.LDValue.id, // 楼宇id
  1253. unitId: this.DYValue.id, // 单元id
  1254. houseId: this.FJValue.id, // 房间id
  1255. enginCycle: this.projectValue.dictValue, // 工程周期
  1256. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1257. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1258. }
  1259. getRoomProjectId(param).then(res => {
  1260. if (res.code == '200') {
  1261. if (res.data != null) {
  1262. getRoomProjectList(res.data.id, this.objValue.enginClassValue).then(res => {
  1263. this.historyList = res.data
  1264. if (res.data.zEngineeringNodeBo != null) {
  1265. this.showHistoryList();
  1266. } else {
  1267. this.$modal.msg("暂无历史信息")
  1268. }
  1269. })
  1270. } else {
  1271. this.$modal.msg("暂无工程信息")
  1272. }
  1273. } else {
  1274. this.$modal.msg(res.msg)
  1275. }
  1276. })
  1277. },
  1278. showHistoryList() {
  1279. this.$refs.refShare.handleShowShare();
  1280. }
  1281. }
  1282. }
  1283. </script>
  1284. <style lang="scss">
  1285. .container {
  1286. display: flex;
  1287. align-items: center;
  1288. justify-content: space-between;
  1289. padding: 10px;
  1290. position: relative;
  1291. }
  1292. .uni-list {
  1293. border: 1xp solid #eee;
  1294. }
  1295. .to-right-icon {
  1296. width: 15px;
  1297. height: 15px;
  1298. position: absolute;
  1299. top: 50%;
  1300. transform: translateY(-50%);
  1301. }
  1302. .text {
  1303. font-size: 16px;
  1304. color: #333;
  1305. }
  1306. .background {
  1307. // border: 15px solid hsla(0, 0%, 100%, .5);
  1308. background: white;
  1309. background-clip: padding-box;
  1310. padding: 20rpx;
  1311. border-radius: 20rpx;
  1312. margin: 20rpx;
  1313. /*从padding开始往外面裁剪背景*/
  1314. }
  1315. .btn {
  1316. width: 715rpx;
  1317. height: 69rpx;
  1318. background: #79A4F0;
  1319. border-radius: 6rpx;
  1320. font-size: 25rpx;
  1321. font-family: Microsoft YaHei;
  1322. font-weight: 400;
  1323. color: #FFFFFF;
  1324. line-height: 69rpx;
  1325. margin-top: 40rpx;
  1326. margin-bottom: 100rpx;
  1327. }
  1328. .number {
  1329. display: flex;
  1330. /* 水平居中显示子元素 */
  1331. align-items: flex-start;
  1332. /* 垂直居中显示子元素 */
  1333. justify-content: space-between;
  1334. /* 左右间距等于间距大小 */
  1335. padding: 10px;
  1336. /* 设置padding以提高视觉效果 */
  1337. }
  1338. .textarea {
  1339. margin-top: 10upx;
  1340. width: 100%;
  1341. border: 1rpx solid red;
  1342. min-height: 100upx;
  1343. line-height: 20px;
  1344. }
  1345. </style>