indoor.vue 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350
  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. 拆旧管111
  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()"></image>
  386. <view v-for="(item,index) in imgArr" :key="index" style="position: relative;">
  387. <view
  388. v-if="item.substring(item.length - 3) == 'png' || item.substring(item.length - 3) == 'jpg'||item.substring(item.length-4)=='jpeg' ">
  389. <image :src="item" mode="" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"
  390. @click="showPhoto(index)">
  391. </image>
  392. </view>
  393. <view v-else>
  394. <video :src="item" style="width: 100rpx; height: 100rpx; margin: 0 12rpx;"></video>
  395. </view>
  396. <view @click="remove(index)"
  397. style="position: absolute; top: 0; right: 14rpx; border-radius: 50%;">
  398. <image src="../../../static/images/icon_close.png" style=" width: 15px; height: 15px;">
  399. </image>
  400. </view>
  401. </view>
  402. </view>
  403. </view>
  404. </view>
  405. <view class="action-btn">
  406. <button @click="submit" class="btn cu-btn block bg-blue lg round">确认上传</button>
  407. </view>
  408. <bottom-sheet ref="refShare" :data="historyList"></bottom-sheet>
  409. </scroll-view>
  410. </template>
  411. <script>
  412. import SelectPicker from '../../../components/selectPicker/select_picker.vue'
  413. import bottomSheet from '../../../components/bottomSheet/bottomSheet.vue'
  414. import {
  415. getDicts
  416. } from "@/api/system/dict/data";
  417. import {
  418. getAreaList,
  419. getBuildingList,
  420. getUnitList,
  421. getHousesList,
  422. addTearOldPipe,
  423. getEnginMaterialQualityList,
  424. getEnginSpecificationsList,
  425. getRoomProjectList,
  426. getRoomProjectId,
  427. } from '@/api/common'
  428. import {
  429. getToken
  430. } from '../../../utils/auth';
  431. export default {
  432. components: {
  433. SelectPicker,
  434. bottomSheet
  435. },
  436. data() {
  437. return {
  438. headers: {
  439. Authorization: "Bearer " + getToken()
  440. },
  441. type: '',
  442. open: false,
  443. objValue: '', //上一页面传过来的值 新增接口用
  444. openDict: false,
  445. selectList: [],
  446. dictOptions: [],
  447. imgArr: [],
  448. XQValue: {},
  449. XZQValue: {},
  450. projectValue: {},
  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. } else if (this.type == 'xzq') {
  758. this.XZQValue = item;
  759. //根据行政区id获取小区数据
  760. this.XQValue = ''; //重置小区数据
  761. this.LDValue = ''; //重置楼栋数据
  762. this.DYValue = ''; //重置单元数据
  763. this.FJValue = ''; //重置房间数据
  764. getAreaList(item.dictValue).then(res => {
  765. this.XQList = res.data;
  766. })
  767. } else {
  768. this.LevelValue = item;
  769. }
  770. },
  771. changeSelect(item, index) {
  772. // this.index = index;
  773. // this.address = item.communityName;
  774. this.open = false;
  775. if (this.type == 'cz') {
  776. this.materialValue = item;
  777. this.specificationValue = ''; //重置规格
  778. //根据材质ID 获取规格数据
  779. getEnginSpecificationsList(item.id).then(res => {
  780. this.materialList = res.data
  781. })
  782. } else if (this.type == 'gg') {
  783. this.specificationValue = item;
  784. } else if (this.type == 'xq') {
  785. this.XQValue = item;
  786. //根据小区id 获取楼栋数据
  787. this.LDValue = ''; //重置楼栋数据
  788. this.DYValue = ''; //重置单元数据
  789. this.FJValue = ''; //重置房间数据
  790. getBuildingList(item.id).then(res => {
  791. this.LDList = res.data
  792. // console.log("楼栋=", res)
  793. })
  794. } else if (this.type == 'ld') {
  795. this.LDValue = item;
  796. //根据楼栋ID 获取单元数据
  797. this.DYValue = ''; //重置单元数据
  798. this.FJValue = ''; //重置房间数据
  799. getUnitList(item.id).then(res => {
  800. this.DYList = res.data
  801. // console.log("单元=", res)
  802. })
  803. } else if (this.type == 'dy') {
  804. this.DYValue = item;
  805. //根据单元数据 获取房间数据
  806. this.FJValue = ''; //重置房间数据
  807. getHousesList(item.id).then(res => {
  808. this.FJList = res.data
  809. // console.log("房间=", res)
  810. })
  811. } else if (this.type == 'fj') {
  812. this.FJValue = item;
  813. }
  814. },
  815. //关闭弹窗
  816. close(e) {
  817. this.open = false
  818. },
  819. //关闭弹窗
  820. closeDict(e) {
  821. this.openDict = false
  822. },
  823. //提交数据
  824. submit() {
  825. if (this.isEmpty(this.projectValue.dictValue)) {
  826. this.$modal.msg("请选择工程周期")
  827. } else if (this.isEmpty(this.XZQValue.dictValue)) {
  828. this.$modal.msg("请选择行政区")
  829. } else if (this.isEmpty(this.XQValue.id)) {
  830. this.$modal.msg("请选择小区")
  831. } else if (this.isEmpty(this.LDValue.id)) {
  832. this.$modal.msg("请选择楼栋")
  833. } else if (this.isEmpty(this.DYValue.id)) {
  834. this.$modal.msg("请选择单元")
  835. } else if (this.isEmpty(this.FJValue.id)) {
  836. this.$modal.msg("请选择房间")
  837. } else if (this.objValue.enginClassValue == '报警器切断阀') {
  838. if (this.isEmpty(this.brandValue.dictValue)) {
  839. this.$modal.msg("请选择厂家")
  840. } else {
  841. this.onsubmit();
  842. }
  843. } else if (this.objValue.enginClassValue == '打孔') {
  844. if (this.isEmpty(this.LevelValue.dictValue)) {
  845. this.$modal.msg("请选择孔距") //打孔 判断孔距
  846. } else {
  847. this.onsubmit();
  848. }
  849. } else if (this.objValue.enginClassValue == '拆旧管') {
  850. if (this.isEmpty(this.LevelValue.dictValue)) {
  851. this.$modal.msg("请选择腐蚀等级") //拆旧管 判断腐蚀等级
  852. } else {
  853. this.onsubmit();
  854. }
  855. } else if (this.objValue.enginClassValue == '立杠') {
  856. //立杠 判断 材质 规格 数量
  857. if (this.isEmpty(this.materialValue.id)) {
  858. this.$modal.msg("请选择材质")
  859. } else if (this.isEmpty(this.specificationValue.id)) {
  860. this.$modal.msg("请选择规格")
  861. } else if (this.isEmpty(this.inputNumberValue)) {
  862. this.$modal.msg("请输入数量")
  863. } else {
  864. this.onsubmit();
  865. }
  866. } else if (this.objValue.enginClassValue == '挂表') {
  867. //挂表 判断 品牌 数量
  868. if (this.isEmpty(this.brandValue.dictValue)) {
  869. this.$modal.msg("请选择品牌")
  870. } else if (this.isEmpty(this.inputNumberValue)) {
  871. this.$modal.msg("请输入数量")
  872. } else {
  873. this.onsubmit();
  874. }
  875. } else if (this.objValue.enginClassValue == '表后管') {
  876. //表后管 判断 材质 规格 数量 (为必须有一张照片和一个视频)
  877. if (this.isEmpty(this.materialValue.id)) {
  878. this.$modal.msg("请选择材质")
  879. } else if (this.isEmpty(this.specificationValue.id)) {
  880. this.$modal.msg("请选择规格")
  881. } else if (this.isEmpty(this.inputNumberValue)) {
  882. this.$modal.msg("请输入数量")
  883. } else if (this.imgArr.length <= 0) {
  884. this.$modal.msg('请上传照片或视频')
  885. } else if (this.loading == false) {
  886. this.$modal.msg('照片或视频未上传完毕,无法提交!')
  887. } else {
  888. const hasImage = this.imgArr.some(item => item.endsWith('.jpg') || item.endsWith('.png') || item
  889. .endsWith('.jpeg') || item.endsWith('.JPG') || item.endsWith('.PNG') || item
  890. .endsWith('.JPEG'));
  891. const hasVideo = this.imgArr.some(item => item.endsWith('.mp4') || item.endsWith('.MP4'));
  892. if (hasImage && hasVideo) {
  893. //表后管 特殊 提交
  894. let param = {
  895. district: this.XZQValue.dictValue,
  896. areaId: this.XQValue.id,
  897. buildingId: this.LDValue.id,
  898. unitId: this.DYValue.id,
  899. houseId: this.FJValue.id,
  900. enginType: this.objValue.enginType, //写死 上一页面传过来的
  901. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  902. enginCycle: this.projectValue.dictValue, //工程周期
  903. zEngineeringNodeBo: {
  904. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  905. zEngineeringInfoBo: {
  906. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  907. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  908. zEngineeringMaterialBo: [{
  909. materialQuality: this.materialValue.id, //材质
  910. specifications: this.specificationValue.id, //规格
  911. number: this.inputNumberValue //数量
  912. }]
  913. }
  914. }
  915. }
  916. addTearOldPipe(param).then(res => {
  917. if (res.code == '200') {
  918. uni.showToast({
  919. title: res.msg,
  920. icon: 'none',
  921. //显示持续时间为 1秒
  922. duration: 1000
  923. });
  924. uni.navigateBack();
  925. }
  926. })
  927. } else {
  928. this.$modal.msg('请至少上传一张照片和一个视频')
  929. }
  930. }
  931. } else if (this.objValue.enginClassValue == '阀管') {
  932. //阀管 判断 材质 规格 数量
  933. if (this.isEmpty(this.doorValue.dictValue)) {
  934. this.$modal.msg("请选择上门类型")
  935. } else if (this.isEmpty(this.SelfClosValve.dictValue)) {
  936. this.$modal.msg("请选择自闭阀类型")
  937. } else if (this.isEmpty(this.materialValue.id)) {
  938. this.$modal.msg("请选择材质")
  939. } else if (this.isEmpty(this.specificationValue.id)) {
  940. this.$modal.msg("请选择规格")
  941. } else if (this.isEmpty(this.inputNumberValue)) {
  942. this.$modal.msg("请输入数量")
  943. } else {
  944. this.onsubmit();
  945. }
  946. }
  947. },
  948. onsubmit() {
  949. if (this.imgArr.length <= 0) {
  950. this.$modal.msg('请上传照片或视频')
  951. } else if (this.loading == false) {
  952. this.$modal.msg('照片或视频未上传完毕,无法提交!')
  953. } else {
  954. //提交
  955. let param = ';'
  956. if (this.objValue.enginClassValue == '拆旧管' || this.objValue.enginClassValue == '打孔') { //拆旧管 打孔
  957. param = {
  958. district: this.XZQValue.dictValue,
  959. areaId: this.XQValue.id,
  960. buildingId: this.LDValue.id,
  961. unitId: this.DYValue.id,
  962. houseId: this.FJValue.id,
  963. enginType: this.objValue.enginType, //写死 上一页面传过来的
  964. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  965. enginCycle: this.projectValue.dictValue, //工程周期
  966. zEngineeringNodeBo: {
  967. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  968. zEngineeringInfoBo: {
  969. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  970. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  971. zEngineeringMaterialBo: [{
  972. corrosionLevel: this.LevelValue.dictValue //腐蚀等级 //孔距
  973. }]
  974. }
  975. }
  976. }
  977. //this.onsubmit(param)
  978. } else if (this.objValue.enginClassValue == '报警器切断阀') { //报警器切断阀
  979. param = {
  980. district: this.XZQValue.dictValue,
  981. areaId: this.XQValue.id,
  982. buildingId: this.LDValue.id,
  983. unitId: this.DYValue.id,
  984. houseId: this.FJValue.id,
  985. enginType: this.objValue.enginType, //写死 上一页面传过来的
  986. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  987. enginCycle: this.projectValue.dictValue, //工程周期
  988. zEngineeringNodeBo: {
  989. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  990. zEngineeringInfoBo: {
  991. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  992. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  993. zEngineeringMaterialBo: [{
  994. brand: this.brandValue.dictValue, //品牌
  995. // number: this.inputNumberValue //数量
  996. }]
  997. }
  998. }
  999. }
  1000. } else if (this.objValue.enginClassValue == '立杠') { //立杠
  1001. param = {
  1002. district: this.XZQValue.dictValue,
  1003. areaId: this.XQValue.id,
  1004. buildingId: this.LDValue.id,
  1005. unitId: this.DYValue.id,
  1006. houseId: this.FJValue.id,
  1007. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1008. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1009. enginCycle: this.projectValue.dictValue, //工程周期
  1010. zEngineeringNodeBo: {
  1011. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1012. zEngineeringInfoBo: {
  1013. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1014. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1015. zEngineeringMaterialBo: [{
  1016. materialQuality: this.materialValue.id, //材质
  1017. specifications: this.specificationValue.id, //规格
  1018. number: this.inputNumberValue //数量
  1019. }]
  1020. }
  1021. }
  1022. }
  1023. } else if (this.objValue.enginClassValue == '挂表') { //挂表
  1024. param = {
  1025. district: this.XZQValue.dictValue,
  1026. areaId: this.XQValue.id,
  1027. buildingId: this.LDValue.id,
  1028. unitId: this.DYValue.id,
  1029. houseId: this.FJValue.id,
  1030. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1031. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1032. enginCycle: this.projectValue.dictValue, //工程周期
  1033. zEngineeringNodeBo: {
  1034. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1035. zEngineeringInfoBo: {
  1036. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1037. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1038. zEngineeringMaterialBo: [{
  1039. brand: this.brandValue.dictValue, //品牌
  1040. number: this.inputNumberValue //数量
  1041. }]
  1042. }
  1043. }
  1044. }
  1045. } else if (this.objValue.enginClassValue == '阀管') { //自闭阀
  1046. param = {
  1047. district: this.XZQValue.dictValue,
  1048. areaId: this.XQValue.id,
  1049. buildingId: this.LDValue.id,
  1050. unitId: this.DYValue.id,
  1051. houseId: this.FJValue.id,
  1052. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1053. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1054. enginCycle: this.projectValue.dictValue, //工程周期
  1055. zEngineeringNodeBo: {
  1056. type: this.objValue.enginClassValue, //写死 上一页面传过来的 (拆旧管等 字典值)
  1057. zEngineeringInfoBo: {
  1058. constructAccordingDrawings: this.isCheck, //是否按图纸施工
  1059. zEngiineeringPhotoBoList: this.imgArr, //照片集合
  1060. zEngineeringMaterialBo: [{
  1061. visitType: this.doorValue.dictValue, //上门类型
  1062. selfClosingValveType: this.SelfClosValve.dictValue, //自闭阀类型
  1063. materialQuality: this.materialValue.id, //材质
  1064. specifications: this.specificationValue.id, //规格
  1065. number: this.inputNumberValue //数量
  1066. }]
  1067. }
  1068. }
  1069. }
  1070. }
  1071. addTearOldPipe(param).then(res => {
  1072. if (res.code == '200') {
  1073. uni.showToast({
  1074. title: res.msg,
  1075. icon: 'none',
  1076. //显示持续时间为 3秒
  1077. duration: 2000
  1078. });
  1079. setTimeout(function() {
  1080. uni.navigateBack();
  1081. }, 1000)
  1082. }
  1083. })
  1084. }
  1085. },
  1086. history() {
  1087. if (this.isEmpty(this.projectValue.dictValue)) {
  1088. this.$modal.msg("请选择工程周期")
  1089. return
  1090. }
  1091. if (this.isEmpty(this.XZQValue.dictValue)) {
  1092. this.$modal.msg("请选择行政区")
  1093. return
  1094. }
  1095. if (this.isEmpty(this.XQValue.id)) {
  1096. this.$modal.msg("请选择小区")
  1097. return
  1098. }
  1099. if (this.isEmpty(this.LDValue.id)) {
  1100. this.$modal.msg("请选择楼栋")
  1101. return
  1102. }
  1103. if (this.isEmpty(this.DYValue.id)) {
  1104. this.$modal.msg("请选择单元")
  1105. return
  1106. }
  1107. if (this.isEmpty(this.FJValue.id)) {
  1108. this.$modal.msg("请选择房间")
  1109. return
  1110. }
  1111. let param = {
  1112. areaId: this.XQValue.id, // 小区id
  1113. buildingId: this.LDValue.id, // 楼宇id
  1114. unitId: this.DYValue.id, // 单元id
  1115. houseId: this.FJValue.id, // 房间id
  1116. enginCycle: this.projectValue.dictValue, // 工程周期
  1117. enginType: this.objValue.enginType, //写死 上一页面传过来的
  1118. enginClassification: this.objValue.enginClassification, //写死 上一页面传过来的 //室内 - 庭院 - 架空
  1119. }
  1120. getRoomProjectId(param).then(res => {
  1121. if (res.code == '200') {
  1122. if (res.data != null) {
  1123. getRoomProjectList(res.data.id, this.objValue.enginClassValue).then(res => {
  1124. this.historyList = res.data
  1125. if (res.data.zEngineeringNodeBo != null) {
  1126. this.showHistoryList();
  1127. } else {
  1128. this.$modal.msg("暂无历史信息")
  1129. }
  1130. })
  1131. } else {
  1132. this.$modal.msg("暂无工程信息")
  1133. }
  1134. } else {
  1135. this.$modal.msg(res.msg)
  1136. }
  1137. })
  1138. },
  1139. showHistoryList() {
  1140. this.$refs.refShare.handleShowShare();
  1141. }
  1142. }
  1143. }
  1144. </script>
  1145. <style lang="scss">
  1146. .container {
  1147. display: flex;
  1148. align-items: center;
  1149. justify-content: space-between;
  1150. padding: 10px;
  1151. position: relative;
  1152. }
  1153. .uni-list {
  1154. border: 1xp solid #eee;
  1155. }
  1156. .to-right-icon {
  1157. width: 15px;
  1158. height: 15px;
  1159. position: absolute;
  1160. top: 50%;
  1161. transform: translateY(-50%);
  1162. }
  1163. .text {
  1164. font-size: 16px;
  1165. color: #333;
  1166. }
  1167. .background {
  1168. // border: 15px solid hsla(0, 0%, 100%, .5);
  1169. background: white;
  1170. background-clip: padding-box;
  1171. padding: 20rpx;
  1172. border-radius: 20rpx;
  1173. margin: 20rpx;
  1174. /*从padding开始往外面裁剪背景*/
  1175. }
  1176. .btn {
  1177. width: 715rpx;
  1178. height: 69rpx;
  1179. background: #79A4F0;
  1180. border-radius: 6rpx;
  1181. font-size: 25rpx;
  1182. font-family: Microsoft YaHei;
  1183. font-weight: 400;
  1184. color: #FFFFFF;
  1185. line-height: 69rpx;
  1186. margin-top: 40rpx;
  1187. margin-bottom: 100rpx;
  1188. }
  1189. .number {
  1190. display: flex;
  1191. /* 水平居中显示子元素 */
  1192. align-items: flex-start;
  1193. /* 垂直居中显示子元素 */
  1194. justify-content: space-between;
  1195. /* 左右间距等于间距大小 */
  1196. padding: 10px;
  1197. /* 设置padding以提高视觉效果 */
  1198. }
  1199. .textarea {
  1200. margin-top: 10upx;
  1201. width: 100%;
  1202. border: 1rpx solid red;
  1203. min-height: 100upx;
  1204. line-height: 20px;
  1205. }
  1206. </style>