indoor.vue 46 KB

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