indoor.vue 46 KB

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