indoor.vue 46 KB

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