indoor.vue 55 KB

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