indoor.vue 44 KB

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