indoor.vue 43 KB

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